mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #1793 from bear454/switch-transifex
Only include transifex JS if the ENV var is set
This commit is contained in:
commit
84dedb42c3
1 changed files with 9 additions and 8 deletions
|
|
@ -9,15 +9,16 @@
|
|||
= javascript_include_tag "application"
|
||||
|
||||
= csrf_meta_tags
|
||||
:javascript
|
||||
window.liveSettings = {
|
||||
api_key: "#{ENV['OSEM_TRANSIFEX_APIKEY']}",
|
||||
picker: "bottom-right",
|
||||
detectlang: true,
|
||||
autocollect: true
|
||||
};
|
||||
= content_for(:script_head)
|
||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
- if ENV['OSEM_TRANSIFEX_APIKEY']
|
||||
:javascript
|
||||
window.liveSettings = {
|
||||
api_key: "#{ENV['OSEM_TRANSIFEX_APIKEY']}",
|
||||
picker: "bottom-right",
|
||||
detectlang: true,
|
||||
autocollect: true
|
||||
};
|
||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
|
||||
= yield(:head)
|
||||
%body
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue