Skip to content

Commit

Permalink
Add a "fallbackLocale" field in ime.json so when the new RFC 4646 loc…
Browse files Browse the repository at this point in the history
…ale name is not recognized by Windows, we can fallback to the old RFC 1766 format.
  • Loading branch information
PCMan committed Sep 27, 2016
1 parent fb74b65 commit 125acd1
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion PIME/DllEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ static inline Ime::LangProfileInfo langProfileFromJson(std::wstring file, std::s
CLSIDFromString (guidStr.c_str(), &guid);
// convert locale name to lanid
auto locale = utf8ToUtf16(json["locale"].asCString());
auto fallbackLocale = utf8ToUtf16(json["fallbackLocale"].asCString());
// ::MessageBox(0, name.c_str(), 0, 0);
auto iconFile = utf8ToUtf16(json["icon"].asCString());
if (!iconFile.empty() && PathIsRelative(iconFile.c_str())) {
Expand All @@ -66,6 +67,7 @@ static inline Ime::LangProfileInfo langProfileFromJson(std::wstring file, std::s
name,
guid,
locale,
fallbackLocale,
iconFile
};
return langProfile;
Expand All @@ -74,7 +76,6 @@ static inline Ime::LangProfileInfo langProfileFromJson(std::wstring file, std::s
}

STDAPI DllRegisterServer(void) {
// ::LoadStringW(g_imeModule->hInstance(), IDS_CHEWING, name, 32);
int iconIndex = 0; // use classic icon
if(g_imeModule->isWindows8Above())
iconIndex = 1; // use Windows 8 style IME icon
Expand Down
2 changes: 1 addition & 1 deletion jsoncpp
2 changes: 1 addition & 1 deletion libIME
Submodule libIME updated 2 files
+20 −11 ImeModule.cpp
+2 −1 ImeModule.h
1 change: 1 addition & 0 deletions node/input_methods/emojime/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.3.0",
"guid": "{A381D463-9338-4FBD-B83D-66FFB03523B3}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "index",
Expand Down
1 change: 1 addition & 0 deletions node/input_methods/meow/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1",
"guid": "{C5F37DA0-274E-4837-9B7C-9BB79FE85D9D}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "index",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/chearray/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{BADFF6B6-0502-4F30-AEC2-BCCB92BCDDC6}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "chearray_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/checj/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.11",
"guid": "{F828D2DC-81BE-466E-9CFE-24BB03172693}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "checj_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/chedayi/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{E6943374-70F5-4540-AA0F-3205C7DCCA84}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "chedayi_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/cheeng/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0",
"guid": "{88BB09A8-4603-4D78-B052-DEE9EAE697EC}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "cheeng_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/cheez/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{1C26A656-3F2A-4A09-9CB0-12AC85100B86}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "cheez_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/cheliu/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{72844B94-5908-4674-8626-4353755BC5DB}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "cheliu_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/chephonetic/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{EC866AD1-A8F1-4845-858F-04942FFAF6CD}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "chephonetic_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/chepinyin/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{945765E9-9898-477B-B282-856FC3BA907E}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "chepinyin_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/chesimplex/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.00",
"guid": "{C7E3DA59-A9D8-4A3B-90DC-58700FAF20CD}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "chesimplex_ime",
Expand Down
3 changes: 2 additions & 1 deletion python/input_methods/chewing/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name":"新酷音輸入法.py",
"version": "0.1",
"guid": "{F80736AA-28DB-423A-92C9-5540F501C939}",
"locale": "zh-Hant-TW",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "chewing_ime",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/meow/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1",
"guid": "{C5F37DA0-274E-4837-9B7C-9BB79FE85D9D}",
"locale": "zh-Hant-TW",
"fallbackLocale": "zh-TW",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "ime_meow",
Expand Down
1 change: 1 addition & 0 deletions python/input_methods/rime/ime.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1",
"guid": "{9C2D6C68-9EA6-4CFB-A769-7E619DB7F267}",
"locale": "zh-Hans-CN",
"fallbackLocale": "zh-CN",
"icon": "icon.ico",
"win8_icon": "",
"moduleName": "rime_ime",
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.1
0.15.2

0 comments on commit 125acd1

Please sign in to comment.