diff --git a/dev/Common/Translator.js b/dev/Common/Translator.js index cb64166c4..c63e6a741 100644 --- a/dev/Common/Translator.js +++ b/dev/Common/Translator.js @@ -66,29 +66,27 @@ $oEl = $(oElement) ; - sKey = $oEl.data('i18n-text'); + sKey = $oEl.data('i18n'); if (sKey) { - $oEl.text(this.i18n(sKey)); - } - else - { - sKey = $oEl.data('i18n-html'); - if (sKey) + if ('[' === sKey.substr(0, 1)) { - $oEl.html(this.i18n(sKey)); + switch (sKey.substr(0, 6)) + { + case '[html]': + $oEl.html(this.i18n(sKey.substr(6))); + break; + case '[place': + $oEl.attr('placeholder', this.i18n(sKey.substr(13))); + break; + case '[title': + $oEl.attr('title', this.i18n(sKey.substr(7))); + break; + } } - - sKey = $oEl.data('i18n-placeholder'); - if (sKey) + else { - $oEl.attr('placeholder', this.i18n(sKey)); - } - - sKey = $oEl.data('i18n-title'); - if (sKey) - { - $oEl.attr('title', this.i18n(sKey)); + $oEl.text(this.i18n(sKey)); } } }; @@ -102,13 +100,13 @@ var self = this; _.defer(function () { - $('.i18n', oElements).each(function () { + $('[data-i18n]', oElements).each(function () { self.i18nToNode(this); }); if (bAnimate && Globals.bAnimationSupported) { - $('.i18n-animation.i18n', oElements).letterfx({ + $('.i18n-animation[data-i18n]', oElements).letterfx({ 'fx': 'fall fade', 'backwards': false, 'timing': 50, 'fx_duration': '50ms', 'letter_end': 'restore', 'element_end': 'restore' }); } diff --git a/dev/View/Popup/Contacts.js b/dev/View/Popup/Contacts.js index cbe6863fb..08e7d2b80 100644 --- a/dev/View/Popup/Contacts.js +++ b/dev/View/Popup/Contacts.js @@ -405,7 +405,7 @@ kn.extendAsViewModel(['View/Popup/Contacts', 'PopupsContactsViewModel'], ContactsPopupView); _.extend(ContactsPopupView.prototype, AbstractView.prototype); - ContactsPopupView.prototype.getPropertyPlceholder = function (sType) + ContactsPopupView.prototype.getPropertyPlaceholder = function (sType) { var sResult = ''; switch (sType) @@ -426,7 +426,7 @@ ContactsPopupView.prototype.addNewProperty = function (sType, sTypeStr) { - this.viewProperties.push(new ContactPropertyModel(sType, sTypeStr || '', '', true, this.getPropertyPlceholder(sType))); + this.viewProperties.push(new ContactPropertyModel(sType, sTypeStr || '', '', true, this.getPropertyPlaceholder(sType))); }; ContactsPopupView.prototype.addNewOrFocusProperty = function (sType, sTypeStr) @@ -649,10 +649,10 @@ } aList.unshift(new ContactPropertyModel(Enums.ContactPropertyType.LastName, '', sLastName, false, - this.getPropertyPlceholder(Enums.ContactPropertyType.LastName))); + this.getPropertyPlaceholder(Enums.ContactPropertyType.LastName))); aList.unshift(new ContactPropertyModel(Enums.ContactPropertyType.FirstName, '', sFirstName, !oContact, - this.getPropertyPlceholder(Enums.ContactPropertyType.FirstName))); + this.getPropertyPlaceholder(Enums.ContactPropertyType.FirstName))); this.viewID(sId); diff --git a/rainloop/v/0.0.0/app/templates/Views/Admin/AdminMenu.html b/rainloop/v/0.0.0/app/templates/Views/Admin/AdminMenu.html index 13fdc3ece..673634bbb 100644 --- a/rainloop/v/0.0.0/app/templates/Views/Admin/AdminMenu.html +++ b/rainloop/v/0.0.0/app/templates/Views/Admin/AdminMenu.html @@ -10,12 +10,12 @@
diff --git a/rainloop/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html b/rainloop/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html index 22d4deb70..f027a6f4a 100644 --- a/rainloop/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html +++ b/rainloop/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html @@ -2,21 +2,21 @@ \ No newline at end of file diff --git a/rainloop/v/0.0.0/app/templates/Views/Components/Select.html b/rainloop/v/0.0.0/app/templates/Views/Components/Select.html index 84a524bf9..0cdcdf4dc 100644 --- a/rainloop/v/0.0.0/app/templates/Views/Components/Select.html +++ b/rainloop/v/0.0.0/app/templates/Views/Components/Select.html @@ -1,12 +1,12 @@ - + - + diff --git a/rainloop/v/0.0.0/app/templates/Views/Components/TextArea.html b/rainloop/v/0.0.0/app/templates/Views/Components/TextArea.html index e403fb2ea..3565e30b7 100644 --- a/rainloop/v/0.0.0/app/templates/Views/Components/TextArea.html +++ b/rainloop/v/0.0.0/app/templates/Views/Components/TextArea.html @@ -1,5 +1,5 @@ - +