mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
Merge pull request #501 from differentreality/translation_live
add js code for live translation feature of transifex
This commit is contained in:
commit
a620132f7f
2 changed files with 13 additions and 0 deletions
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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: ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue