Fix several bugs
- Fix: when installing the extension, the default language was added
even if it didn't exist in isoLangs.
- Also, the default language now considers 'zh-CN' and 'zh-TW' as
possible candidates.
- Fix: minor CSS issue in the options page.
- Unknown languages are deleted (or replaced with a known replacement)
when updating the extension.
- Other minor changes.
Change-Id: Id6fc8233255cef2fc67185e1114ca86fdc56bc5a
diff --git a/src/js/common.js b/src/js/common.js
index 31914e8..fa8445c 100644
--- a/src/js/common.js
+++ b/src/js/common.js
@@ -107,5 +107,12 @@
'yo': {'name': 'Yoruba', 'nativeName': 'Yorùbá'},
'zh-CN': {'name': 'Chinese (Simplified)', 'nativeName': '汉语'},
'zh-TW': {'name': 'Chinese (Traditional)', 'nativeName': '漢語'},
- 'zu': {'name': 'Zulu', 'nativeName': 'isiZulu'}
+ 'zu': {'name': 'Zulu', 'nativeName': 'isiZulu'},
+};
+
+// Some languages were incorrectly set. This map serves as a conversion between
+// the previous wrong languages and the correct code.
+var convertLanguages = {
+ 'jv': 'jw',
+ 'zh': 'zh-CN',
};