Comparing version 0.4.35 to 0.4.37
@@ -94,2 +94,17 @@ /** | ||
/** | ||
* Checks if app is disabled | ||
* | ||
* @returns {boolean} | ||
*/ | ||
isDisabled: function() { | ||
return this.disabled; | ||
}, | ||
/** | ||
* Disables the app | ||
*/ | ||
disable: function() { | ||
this.disabled = true; | ||
}, | ||
/** | ||
* addLanguage | ||
@@ -96,0 +111,0 @@ * |
@@ -61,23 +61,28 @@ /** | ||
if ( | ||
(translation_key.application && translation_key.application.isFeatureEnabled("lock_original_content") && translation_key.language == target_language) || | ||
(translation_key.locked && !options.current_translator.manager) | ||
) return translated_label; | ||
var element = this.getDecorationElement('tml:label', options); | ||
var classes = ['tml_translatable']; | ||
var classes = []; | ||
if (options.locked) { | ||
if (options.current_translator && !options.current_translator.isFeatureEnabled("show_locked_keys")) | ||
return translated_label; | ||
if (translation_key.application && translation_key.application.isFeatureEnabled("lock_original_content") && translation_key.language == target_language) { | ||
classes.push('tml_original'); | ||
} else if (translation_key.locked && !options.current_translator.manager) { | ||
classes.push('tml_locked'); | ||
} else if (translation_language.locale === translation_key.locale) { | ||
if (options.pending) | ||
classes.push('tml_pending'); | ||
else | ||
classes.push('tml_not_translated'); | ||
} else if (translation_language.locale === target_language.locale) { | ||
classes.push('tml_translated'); | ||
} else { | ||
classes.push('tml_fallback'); | ||
classes.push('tml_translatable'); | ||
if (options.locked) { | ||
if (options.current_translator && !options.current_translator.isFeatureEnabled("show_locked_keys")) | ||
return translated_label; | ||
classes.push('tml_locked'); | ||
} else if (translation_language.locale === translation_key.locale) { | ||
if (options.pending) | ||
classes.push('tml_pending'); | ||
else | ||
classes.push('tml_not_translated'); | ||
} else if (translation_language.locale === target_language.locale) { | ||
classes.push('tml_translated'); | ||
} else { | ||
classes.push('tml_fallback'); | ||
} | ||
} | ||
@@ -84,0 +89,0 @@ |
@@ -145,2 +145,3 @@ /** | ||
getSourceName: function(source) { | ||
if (!source) return 'index'; | ||
var source_name = source.call && source() || source; | ||
@@ -147,0 +148,0 @@ return source_name; |
{ | ||
"name": "tml-js", | ||
"description": "Translation Markup Language for JavaScript", | ||
"version": "0.4.35", | ||
"version": "0.4.37", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Michael Berkovich", |
238372
6381