Add I18n function for plugins to add translations

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2193/head
Alex Coles 10 years ago
parent d243fd30dc
commit 04c285ae56
  1. 5
      app/assets/javascripts/angular/openproject-app.js

@ -39,6 +39,11 @@ requireExtraLocale.keys().forEach(function(localeFile) {
I18n.translations[locale] = requireExtraLocale(localeFile)[locale]; I18n.translations[locale] = requireExtraLocale(localeFile)[locale];
}); });
I18n.addTranslations = function(locale, translations) {
I18n.translations[locale] = _.merge(I18n.translations[locale], translations);
};
var angular = require('angular'); var angular = require('angular');
require('angular-animate'); require('angular-animate');
require('angular-modal'); require('angular-modal');

Loading…
Cancel
Save