Added option to enable/disable translation mode.
This commit is contained in:
parent
a5746d5d7c
commit
a5b7ea7d5f
1 changed files with 8 additions and 4 deletions
|
@ -209,6 +209,7 @@ class App.i18n extends App.Ajax
|
|||
# load translation collection
|
||||
for object in data
|
||||
|
||||
# set runtime lookup table
|
||||
@map[ object[1] ] = object[2]
|
||||
|
||||
# load in collection if needed
|
||||
|
@ -224,10 +225,13 @@ class App.i18n extends App.Ajax
|
|||
translate_content: (string, args...) =>
|
||||
translated = @translate(string, args...)
|
||||
# replace = '<span class="translation" contenteditable="true" data-text="' + @escape(string) + '">' + translated + '<span class="icon-edit"></span>'
|
||||
replace = '<span class="translation" contenteditable="true" data-text="' + @escape(string) + '">' + translated + ''
|
||||
# if !@_translated
|
||||
# replace += '<span class="missing">XX</span>'
|
||||
replace += '</span>'
|
||||
if window.Config['Translation']
|
||||
replace = '<span class="translation" contenteditable="true" data-text="' + @escape(string) + '">' + translated + ''
|
||||
# if !@_translated
|
||||
# replace += '<span class="missing">XX</span>'
|
||||
replace += '</span>'
|
||||
else
|
||||
translated
|
||||
|
||||
translate: (string, args...) =>
|
||||
|
||||
|
|
Loading…
Reference in a new issue