Project

General

Profile

« Previous | Next » 

Revision ad01d4d2

Added by Walden Raines over 10 years ago

fixes #3984 - use __ instead of _ for i18n to avoid conflict with underscore.js

View differences:

app/assets/javascripts/i18n.js
// Add normal gettext aliases with gettext_i18n_rails_js to enable extraction
// when SETTINGS[:mark_translated] is enabled, wrap all strings
if (typeof(I18N_MARK) != 'undefined' && I18N_MARK) {
window._ = function() { return 'X' + i18n.gettext.apply(i18n, arguments) + 'X' };
window.n_ = function() { return 'X' + i18n.ngettext.apply(i18n, arguments) + 'X' };
} else {
window._ = window.__;
window.n_ = window.n__;
window.__ = function() { return 'X' + i18n.gettext.apply(i18n, arguments) + 'X' };
window.n__ = function() { return 'X' + i18n.ngettext.apply(i18n, arguments) + 'X' };
}
});

Also available in: Unified diff