From a8aebfe14a2ffc80f0499ea6d3ace4a22b9e94ef Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Sun, 24 Aug 2014 02:45:10 -0300 Subject: [PATCH] multi language support --- public/src/js/app.js | 1 + public/src/js/config.js | 3 ++- public/src/js/translations.js | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 public/src/js/translations.js diff --git a/public/src/js/app.js b/public/src/js/app.js index 0fdc6c3..4636038 100644 --- a/public/src/js/app.js +++ b/public/src/js/app.js @@ -8,6 +8,7 @@ angular.module('insight',[ 'ui.bootstrap', 'ui.route', 'monospaced.qrcode', + 'gettext', 'insight.system', 'insight.socket', 'insight.blocks', diff --git a/public/src/js/config.js b/public/src/js/config.js index 3af0b02..92c5758 100644 --- a/public/src/js/config.js +++ b/public/src/js/config.js @@ -47,7 +47,8 @@ angular.module('insight') $locationProvider.html5Mode(true); $locationProvider.hashPrefix('!'); }) - .run(function($rootScope, $route, $location, $routeParams, $anchorScroll, ngProgress) { + .run(function($rootScope, $route, $location, $routeParams, $anchorScroll, ngProgress, gettextCatalog) { + gettextCatalog.currentLanguage = 'en'; $rootScope.$on('$routeChangeStart', function() { ngProgress.start(); }); diff --git a/public/src/js/translations.js b/public/src/js/translations.js new file mode 100644 index 0000000..0252f7b --- /dev/null +++ b/public/src/js/translations.js @@ -0,0 +1,4 @@ +angular.module('insight').run(['gettextCatalog', function (gettextCatalog) { +/* jshint -W100 */ +/* jshint +W100 */ +}]); \ No newline at end of file