Skip to content

Commit

Permalink
(InputMethod) Improve Localization for AppSettings.pressShiftOnce
Browse files Browse the repository at this point in the history
  • Loading branch information
bingzheung committed Oct 21, 2023
1 parent 9309974 commit 6d64eab
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Jyutping/InputMethod/EventHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension JyutpingInputController {
}

private func shouldSwitchInputMethodMode(with event: NSEvent) -> Bool {
guard AppSettings.pressShiftOnce == .switchCantoneseEnglish else {
guard AppSettings.pressShiftOnce == .switchInputMethodMode else {
ShiftKey.resetBuffer()
return false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"menu.title" = "Jyutping";
"menu.mode.cantonese" = "Jyutping Mode";
"menu.mode.cantonese" = "Cantonese Mode";
"menu.mode.abc" = "ABC Mode";
"menu.preferences" = "Settings…";
"menu.check4updates" = "Check for Updates…";
Expand Down Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "Press **Shift** Once To";
"Do Nothing" = "Do Nothing";
"Switch between Cantonese and ABC" = "Switch between Cantonese and ABC";
"Switch between Cantonese Mode and ABC Mode" = "Switch between Cantonese Mode and ABC Mode";

"Press **Shift** + **Space** To" = "Press **Shift** + **Space** To";
"Input a Full-width Space (U+3000)" = "Input a Full-width Space (U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// HotkeysView
"Press **Shift** Once To" = "撳一下 Shift 掣";
"Do Nothing" = "無";
"Switch between Cantonese and ABC" = "粵語 / ABC 模式切換";
"Switch between Cantonese Mode and ABC Mode" = "粵拼 / ABC 模式切換";

"Press **Shift** + **Space** To" = "撳 Shift + Space";
"Input a Full-width Space (U+3000)" = "輸入一個全寬空格(U+3000)";
Expand Down
6 changes: 3 additions & 3 deletions Jyutping/InputMethod/Preferences/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ enum FontMode: Int {

enum PressShiftOnce: Int {
case doNothing = 1
case switchCantoneseEnglish = 2
case switchInputMethodMode = 2
}

enum ShiftSpaceCombination: Int {
Expand Down Expand Up @@ -282,7 +282,7 @@ struct AppSettings {
case 0, 1:
return .doNothing
case 2:
return .switchCantoneseEnglish
return .switchInputMethodMode
default:
return .doNothing
}
Expand All @@ -293,7 +293,7 @@ struct AppSettings {
case 0, 1:
return .doNothing
case 2:
return .switchCantoneseEnglish
return .switchInputMethodMode
default:
return .doNothing
}
Expand Down
4 changes: 2 additions & 2 deletions Jyutping/InputMethod/Preferences/HotkeysView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct HotkeysView: View {
HStack {
Picker("Press **Shift** Once To", selection: $pressShiftOnce) {
Text("Do Nothing").tag(1)
Text("Switch between Cantonese and ABC").tag(2)
Text("Switch between Cantonese Mode and ABC Mode").tag(2)
}
.scaledToFit()
.pickerStyle(.radioGroup)
Expand All @@ -45,7 +45,7 @@ struct HotkeysView: View {
HStack {
Picker("Press **Shift** + **Space** To", selection: $shiftSpaceCombination) {
Text("Input a Full-width Space (U+3000)").tag(1)
Text("Switch between Cantonese and ABC").tag(2)
Text("Switch between Cantonese Mode and ABC Mode").tag(2)
}
.scaledToFit()
.pickerStyle(.radioGroup)
Expand Down

0 comments on commit 6d64eab

Please sign in to comment.