diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 06acac77..2567eaab 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -10,11 +10,20 @@ = javascript_include_tag "application" = csrf_meta_tags :javascript + window.liveSettings = { + api_key: "<%= CONFIG['transifex_live_api_key'] %>", + picker: "bottom-right", + detectlang: true, + autocollect: true + }; + $(function() { $('.dropdown input, .dropdown label').click(function(e) { e.stopPropagation(); }); }); + + = javascript_include_tag "//cdn.transifex.com/live.js" = yield(:head) %body{ data: (content_for?(:splash_nav) ? {spy: 'scroll', offset: 0, target: 'splash-nav'} : {} ) } = render 'layouts/navigation' diff --git a/config/config.yml.example b/config/config.yml.example index 787427bb..412e109a 100644 --- a/config/config.yml.example +++ b/config/config.yml.example @@ -29,3 +29,7 @@ test: production: <<: *defaults + + # If you add more providers that do not require a key, you still have to create the 2 variables with sample data + + transifex_live_api_key: ''