From 8686887695f263df778314c7c8b16bac874113e2 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Mon, 19 Jan 2015 18:37:07 +0200 Subject: [PATCH] read config var in js --- app/assets/javascripts/osem-translation.js | 2 +- config/config.yml.example | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/osem-translation.js b/app/assets/javascripts/osem-translation.js index 2fd48cc7..25fd36f5 100644 --- a/app/assets/javascripts/osem-translation.js +++ b/app/assets/javascripts/osem-translation.js @@ -1,5 +1,5 @@ window.liveSettings = { - api_key: '', + api_key: "CONFIG['transifex_live_api_key']", picker: "bottom-right", detectlang: true, autocollect: true diff --git a/config/config.yml.example b/config/config.yml.example index 89a18daa..903c455d 100644 --- a/config/config.yml.example +++ b/config/config.yml.example @@ -21,6 +21,9 @@ defaults: &defaults ichain: enabled: false + # Enter your key, provided by transifex live settings, in the quotes + transifex_live_api_key: '' + development: <<: *defaults