Localize new strings

Also fine-tune the Chinese Conversion menu item text.
This commit is contained in:
Lukhnos Liu 2021-11-23 16:44:19 -08:00
parent 69e463958e
commit 75b4bfac31
5 changed files with 25 additions and 10 deletions

View File

@ -191,9 +191,8 @@ void RunAlertPanel(NSString *title, NSString *message, NSString *buttonTitle) {
BOOL status = [OVInputSourceHelper registerInputSource:imeBundleURL];
if (!status) {
// TODO: Localize.
NSString *message = [NSString stringWithFormat:@"Fatal error: Cannot register input source %@ at %@.", imeIdentifier, imeBundleURL.absoluteString];
RunAlertPanel(@"Fatal Error", message, @"Abort");
NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Cannot register input source %@ at %@.", nil), imeIdentifier, imeBundleURL.absoluteString];
RunAlertPanel(NSLocalizedString(@"Fatal Error", nil), message, NSLocalizedString(@"Abort", nil));
[self endAppWithDelay];
return;
}
@ -201,9 +200,8 @@ void RunAlertPanel(NSString *title, NSString *message, NSString *buttonTitle) {
inputSource = [OVInputSourceHelper inputSourceForInputSourceID:imeIdentifier];
// if it still doesn't register successfully, bail.
if (!inputSource) {
// TODO: Localize.
NSString *message = [NSString stringWithFormat:@"Fatal error: Cannot find input source %@ after registration.", imeIdentifier];
RunAlertPanel(@"Fatal Error", message, @"Abort");
NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Cannot find input source %@ after registration.", nil), imeIdentifier];
RunAlertPanel(NSLocalizedString(@"Fatal Error", nil), message, NSLocalizedString(@"Abort", nil));
[self endAppWithDelay];
return;
}
@ -237,8 +235,7 @@ void RunAlertPanel(NSString *title, NSString *message, NSString *buttonTitle) {
} else {
// Only prompt a warning if pre-macOS 12. The flag is not indicative of anything meaningful due to the need of user intervention in Prefernces.app on macOS 12.
if (!mainInputSourceEnabled && !isMacOS12OrAbove) {
// TODO: Localize
RunAlertPanel(@"Warning", @"Input method may not be fully enabled. Please check Preferences.app.", @"Continue");
RunAlertPanel(NSLocalizedString(@"Warning", nil), NSLocalizedString(@"Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources.", nil), NSLocalizedString(@"Continue", nil));
} else {
RunAlertPanel(NSLocalizedString(@"Installation Successful", nil), NSLocalizedString(@"McBopomofo is ready to use.", nil), NSLocalizedString(@"OK", nil));
}

View File

@ -28,3 +28,12 @@
"Stopping the old version. This may take up to one minute…" = "Stopping the old version. This may take up to one minute…";
"Attention" = "Attention";
"McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional." = "McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional.";
"Fatal Error" = "Fatal Error";
"Abort" = "Abort";
"Cannot register input source %@ at %@." = "Cannot register input source %@ at %@.";
"Cannot find input source %@ after registration." = "Cannot find input source %@ after registration.";
"Warning" = "Warning";
"Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources." = "Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources.";
"Continue" = "Continue";

View File

@ -28,3 +28,12 @@
"Finish" = "結束";
"Attention" = "請注意";
"McBopomofo is upgraded, but please log out or reboot for the new version to be fully functional." = "McBopomofo 安裝完成,但建議您登出或重新開機,以便順利使用新版。";
"Fatal Error" = "安裝錯誤";
"Abort" = "放棄安裝";
"Cannot register input source %@ at %@." = "無法從檔案位置 %2$@ 安裝輸入法 \"%1$@\"。";
"Cannot find input source %@ after registration." = "在註冊完輸入法 \"%@\" 仍然無法找到輸入法。";
"Warning" = "安裝不完整";
"Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources." = "輸入法已經安裝好,但可能沒有完全啟用。請從「系統偏好設定」 > 「鍵盤」 > 「輸入方式」分頁加入輸入法。";
"Continue" = "繼續";

View File

@ -49,4 +49,4 @@
/* No comment provided by engineer. */
"You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@" = "You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@";
"Chinese Conversion" = "Chinese Conversion";
"Chinese Conversion" = "Convert to Simplified Chinese";

View File

@ -49,4 +49,4 @@
/* No comment provided by engineer. */
"You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@" = "目前使用的小麥注音版本是 %1$@ (%2$@),網路上有更新版本 %3$@ (%4$@) 可供下載。是否要前往小麥注音網站下載新版來安裝?%5$@";
"Chinese Conversion" = "簡繁轉換";
"Chinese Conversion" = "輸出簡體中文";