[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [187] Merging localisations fixes from trunk
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [187] Merging localisations fixes from trunk |
Date: |
Sun, 07 Aug 2011 11:33:13 +0000 |
Revision: 187
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=187
Author: valkov
Date: 2011-08-07 11:33:13 +0000 (Sun, 07 Aug 2011)
Log Message:
-----------
Merging localisations fixes from trunk
Modified Paths:
--------------
branches/0.0.10/src/lm_config_options.js
branches/0.0.10/src/lm_localisation.js
Modified: branches/0.0.10/src/lm_config_options.js
===================================================================
--- branches/0.0.10/src/lm_config_options.js 2011-08-07 11:31:57 UTC (rev
186)
+++ branches/0.0.10/src/lm_config_options.js 2011-08-07 11:33:13 UTC (rev
187)
@@ -248,6 +248,11 @@
// See lm_localisation.js
this.set_env_lang();
+ if (/auto/i.test(locale))
+ {
+ locale = this.env_lang;
+ }
+
// In case the country code is lowercase and the language code is
// upper case
if (/.*_.*/.test(locale))
Modified: branches/0.0.10/src/lm_localisation.js
===================================================================
--- branches/0.0.10/src/lm_localisation.js 2011-08-07 11:31:57 UTC (rev
186)
+++ branches/0.0.10/src/lm_localisation.js 2011-08-07 11:33:13 UTC (rev
187)
@@ -57,6 +57,15 @@
// Same as GNU IceCat & Firefox without translation
env_lang = "en_US";
}
+
+ // Some versions of GNU IceCat & Firefox report only two letters
+ // for the language. In this case we have to manually force the
+ // language to something useful and deducted.
+ if(!/[a-zA-Z]{2}(_|-)[a-zA-Z]{2}/.test(env_lang))
+ {
+ env_lang = env_lang.toLowerCase()+"_"+
+ env_lang.toUpperCase();
+ }
// Epiphany uses only lowercase
env_lang = env_lang.split(/_/);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [187] Merging localisations fixes from trunk,
Ivaylo Valkov <=