ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-13139. Implement multi-language support for Ambari Web user interface. (F. Canan Pembe Muhtaroglu via yusaku)
Date Fri, 18 Sep 2015 23:34:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 35ac6fbfc -> d40e669d1


AMBARI-13139. Implement multi-language support for Ambari Web user interface. (F. Canan Pembe
Muhtaroglu via yusaku)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d40e669d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d40e669d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d40e669d

Branch: refs/heads/branch-2.1
Commit: d40e669d16be53795c0022106361573a66577813
Parents: 35ac6fb
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Fri Sep 18 12:28:02 2015 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Fri Sep 18 16:34:10 2015 -0700

----------------------------------------------------------------------
 ambari-web/app/initialize.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d40e669d/ambari-web/app/initialize.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/initialize.js b/ambari-web/app/initialize.js
index 89d2967..e4bb171 100644
--- a/ambari-web/app/initialize.js
+++ b/ambari-web/app/initialize.js
@@ -21,7 +21,15 @@ window.App = require('app');
 
 require('config');
 
-require('messages');
+var browserLanguage = '';
+
+try {
+  browserLanguage = navigator.language.slice(0, 2);
+  require('locales/' + browserLanguage +'/messages');
+} catch (error) {
+  require('messages');
+}
+
 require('utils/base64');
 require('utils/db');
 require('utils/helper');


Mime
View raw message