Merge pull request #48 from ShikiSuen/dev/newlayout-shintsuu

MiTAC // Fix the Shintsuu to MiTAC layout, plus localizing this layout name.
This commit is contained in:
Shiki Suen 2022-02-11 22:37:16 +08:00 committed by GitHub
commit 8d99eee686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 11 deletions

View File

@ -1097,7 +1097,7 @@ static BopomofoKeyboardLayout* CreateIBMLayout() {
return new BopomofoKeyboardLayout(ktcm, "IBM"); return new BopomofoKeyboardLayout(ktcm, "IBM");
} }
static BopomofoKeyboardLayout* CreateShintsuuLayout() { static BopomofoKeyboardLayout* CreateMiTACLayout() {
std::vector<BPMF::Component> vec; std::vector<BPMF::Component> vec;
BopomofoKeyToComponentMap ktcm; BopomofoKeyToComponentMap ktcm;
@ -1143,7 +1143,7 @@ static BopomofoKeyboardLayout* CreateShintsuuLayout() {
ASSIGNKEY1(ktcm, vec, 'y', BPMF::I); ASSIGNKEY1(ktcm, vec, 'y', BPMF::I);
ASSIGNKEY1(ktcm, vec, 'z', BPMF::Z); ASSIGNKEY1(ktcm, vec, 'z', BPMF::Z);
return new BopomofoKeyboardLayout(ktcm, "Shintsuu"); return new BopomofoKeyboardLayout(ktcm, "MiTAC");
} }
static BopomofoKeyboardLayout* CreateETenLayout() { static BopomofoKeyboardLayout* CreateETenLayout() {
@ -1291,8 +1291,8 @@ const BopomofoKeyboardLayout* BopomofoKeyboardLayout::IBMLayout() {
return layout; return layout;
} }
const BopomofoKeyboardLayout* BopomofoKeyboardLayout::ShintsuuLayout() { const BopomofoKeyboardLayout* BopomofoKeyboardLayout::MiTACLayout() {
static BopomofoKeyboardLayout* layout = CreateShintsuuLayout(); static BopomofoKeyboardLayout* layout = CreateMiTACLayout();
return layout; return layout;
} }

View File

@ -213,7 +213,7 @@ public:
static const BopomofoKeyboardLayout* HsuLayout(); static const BopomofoKeyboardLayout* HsuLayout();
static const BopomofoKeyboardLayout* ETen26Layout(); static const BopomofoKeyboardLayout* ETen26Layout();
static const BopomofoKeyboardLayout* IBMLayout(); static const BopomofoKeyboardLayout* IBMLayout();
static const BopomofoKeyboardLayout* ShintsuuLayout(); static const BopomofoKeyboardLayout* MiTACLayout();
static const BopomofoKeyboardLayout* HanyuPinyinLayout(); static const BopomofoKeyboardLayout* HanyuPinyinLayout();
BopomofoKeyboardLayout(const BopomofoKeyToComponentMap& ktcm, BopomofoKeyboardLayout(const BopomofoKeyToComponentMap& ktcm,

View File

@ -182,8 +182,8 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot";
case KeyboardLayoutIBM: case KeyboardLayoutIBM:
_bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::IBMLayout()); _bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::IBMLayout());
break; break;
case KeyboardLayoutShintsuu: case KeyboardLayoutMiTAC:
_bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::ShintsuuLayout()); _bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::MiTACLayout());
break; break;
case KeyboardLayoutHanyuPinyin: case KeyboardLayoutHanyuPinyin:
_bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::HanyuPinyinLayout()); _bpmfReadingBuffer->setKeyboardLayout(BopomofoKeyboardLayout::HanyuPinyinLayout());

View File

@ -155,7 +155,7 @@ struct ComposingBufferSize {
case hsu = 2 case hsu = 2
case eten26 = 3 case eten26 = 3
case IBM = 4 case IBM = 4
case shintsuu = 5 case MiTAC = 5
case hanyuPinyin = 10 case hanyuPinyin = 10
var name: String { var name: String {
@ -170,8 +170,8 @@ struct ComposingBufferSize {
return "ETen26" return "ETen26"
case .IBM: case .IBM:
return "IBM" return "IBM"
case .shintsuu: case .MiTAC:
return "Shintsuu" return "MiTAC"
case .hanyuPinyin: case .hanyuPinyin:
return "HanyuPinyin" return "HanyuPinyin"
} }

View File

@ -595,7 +595,7 @@
<menuItem title="Hsu" tag="2" id="8"/> <menuItem title="Hsu" tag="2" id="8"/>
<menuItem title="ETen26" tag="3" id="9"/> <menuItem title="ETen26" tag="3" id="9"/>
<menuItem title="IBM" tag="4" id="137"/> <menuItem title="IBM" tag="4" id="137"/>
<menuItem title="Shintsuu" tag="5" id="7fV-x8-WHQ"/> <menuItem title="MiTAC" tag="5" id="7fV-x8-WHQ"/>
<menuItem title="Hanyu Pinyin" tag="10" id="10"/> <menuItem title="Hanyu Pinyin" tag="10" id="10"/>
</items> </items>
</menu> </menu>

View File

@ -89,6 +89,9 @@
/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ /* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */
"137.title" = "IBM"; "137.title" = "IBM";
/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */
"7fV-x8-WHQ.title" = "MiTAC";
/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ /* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */
"1AW-xf-c2f.label" = "Keyboard"; "1AW-xf-c2f.label" = "Keyboard";

View File

@ -89,6 +89,9 @@
/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ /* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */
"137.title" = "IBM"; "137.title" = "IBM";
/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */
"7fV-x8-WHQ.title" = "神通";
/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ /* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */
"1AW-xf-c2f.label" = "キーボード"; "1AW-xf-c2f.label" = "キーボード";

View File

@ -89,6 +89,9 @@
/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ /* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */
"137.title" = "IBM"; "137.title" = "IBM";
/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */
"7fV-x8-WHQ.title" = "神通";
/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ /* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */
"1AW-xf-c2f.label" = "键盘"; "1AW-xf-c2f.label" = "键盘";

View File

@ -89,6 +89,9 @@
/* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */ /* Class = "NSMenuItem"; title = "IBM"; ObjectID = "137"; */
"137.title" = "IBM"; "137.title" = "IBM";
/* Class = "NSMenuItem"; title = "MiTAC"; ObjectID = "7fV-x8-WHQ"; */
"7fV-x8-WHQ.title" = "神通";
/* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */ /* Class = "NSTabViewItem"; label = "Keyboard"; ObjectID = "1AW-xf-c2f"; */
"1AW-xf-c2f.label" = "鍵盤"; "1AW-xf-c2f.label" = "鍵盤";