Merge pull request #1793 from bear454/switch-transifex

Only include transifex JS if the ENV var is set
This commit is contained in:
James Mason 2017-11-14 12:36:02 -08:00 committed by GitHub
commit 84dedb42c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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