Replaced all locale str with ".UTF-8" to ".utf8" 69/18069/1
authorJimmy Huang <jimmy.huang@intel.com>
Fri, 14 Mar 2014 18:05:28 +0000 (11:05 -0700)
committerJimmy Huang <jimmy.huang@intel.com>
Fri, 14 Mar 2014 18:05:28 +0000 (11:05 -0700)
- Fixed compatibility with localed since the locale values end with .utf8 instead of .UTF-8.

Change-Id: If5e83b356cc03c29386a0cfd0f756482dd00578d
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
index.html
js/panel-locale.js

index e7f8f76..e12e0d5 100644 (file)
 
         <div data-role="content">
             <fieldset data-role="controlgroup">
 
         <div data-role="content">
             <fieldset data-role="controlgroup">
-                <input type="radio" name="radio_locale" id="radio_locale_english" value="en_US.UTF-8" checked="checked" />
+                <input type="radio" name="radio_locale" id="radio_locale_english" value="en_US.utf8" checked="checked" />
                 <label for="radio_locale_english">English</label>
 
                 <label for="radio_locale_english">English</label>
 
-                <input type="radio" name="radio_locale" id="radio_locale_german" value="de_DE.UTF-8" />
+                <input type="radio" name="radio_locale" id="radio_locale_german" value="de_DE.utf8" />
                 <label for="radio_locale_german">German (Deutsch)</label>
 
                 <label for="radio_locale_german">German (Deutsch)</label>
 
-                <input type="radio" name="radio_locale" id="radio_locale_japanese" value="ja_JP.UTF-8" />
+                <input type="radio" name="radio_locale" id="radio_locale_japanese" value="ja_JP.utf8" />
                 <label for="radio_locale_japanese">Japanese (日本語)</label>
 
                 <label for="radio_locale_japanese">Japanese (日本語)</label>
 
-                <input type="radio" name="radio_locale" id="radio_locale_simplified_chinese" value="zh_CN.UTF-8" />
+                <input type="radio" name="radio_locale" id="radio_locale_simplified_chinese" value="zh_CN.utf8" />
                 <label for="radio_locale_simplified_chinese">Simplified Chinese (简体中文)</label>
 
                 <label for="radio_locale_simplified_chinese">Simplified Chinese (简体中文)</label>
 
-                <input type="radio" name="radio_locale" id="radio_locale_traditional_chinese" value="zh_TW.UTF-8" />
+                <input type="radio" name="radio_locale" id="radio_locale_traditional_chinese" value="zh_TW.utf8" />
                 <label for="radio_locale_traditional_chinese">Traditional Chinese (繁體中文)</label>
             </fieldset>
             <div data-role="button" id="button_locale_apply">Apply</div>
                 <label for="radio_locale_traditional_chinese">Traditional Chinese (繁體中文)</label>
             </fieldset>
             <div data-role="button" id="button_locale_apply">Apply</div>
index b583b1c..6bea2fa 100644 (file)
@@ -97,10 +97,10 @@ function localeToLanguage(locale) {
         locale = locale.substr(5, locale.length);
     }
 
         locale = locale.substr(5, locale.length);
     }
 
-    if (locale === 'C' || locale === 'en_US.UTF-8') return 'english';
-    else if (locale === 'de_DE.UTF-8') return 'german';
-    else if (locale === 'ja_JP.UTF-8') return 'japanese';
-    else if (locale === 'zh_CN.UTF-8') return 'simplified_chinese';
-    else if (locale === 'zh_HK.UTF-8' || locale === 'zh_TW.UTF-8') return 'traditional_chinese';
+    if (locale === 'C' || locale === 'en_US.utf8') return 'english';
+    else if (locale === 'de_DE.utf8') return 'german';
+    else if (locale === 'ja_JP.utf8') return 'japanese';
+    else if (locale === 'zh_CN.utf8') return 'simplified_chinese';
+    else if (locale === 'zh_HK.utf8' || locale === 'zh_TW.utf8') return 'traditional_chinese';
     else return null;
 }
\ No newline at end of file
     else return null;
 }
\ No newline at end of file