Shiki: Installer // Tweaks in AlertPanel and Japanese Localization.

- The word "Warning" requires careful translation in Japanese since native Japanese users are sensitive to the choice of words.
This commit is contained in:
ShikiSuen 2022-02-01 20:06:23 +08:00
parent 2d444d174c
commit c4958799ad
2 changed files with 16 additions and 7 deletions

View File

@ -228,18 +228,27 @@ class AppDelegate: NSWindowController, NSApplicationDelegate {
NSLog("Failed to enable input method: \(imeIdentifier)"); NSLog("Failed to enable input method: \(imeIdentifier)");
} }
} }
// Alert Panel
let ntfPostInstall = NSAlert()
if warning { if warning {
runAlertPanel(title: NSLocalizedString("Attention", comment: ""), message: NSLocalizedString("vChewing is upgraded, but please log out or reboot for the new version to be fully functional.", comment: ""), buttonTitle: NSLocalizedString("OK", comment: "")) ntfPostInstall.messageText = NSLocalizedString("Attention", comment: "")
ntfPostInstall.informativeText = NSLocalizedString("vChewing is upgraded, but please log out or reboot for the new version to be fully functional.", comment: "")
ntfPostInstall.addButton(withTitle: NSLocalizedString("OK", comment: ""))
} else { } else {
if !mainInputSourceEnabled && !isMacOS12OrAbove { if !mainInputSourceEnabled && !isMacOS12OrAbove {
runAlertPanel(title: NSLocalizedString("Warning", comment: ""), message: NSLocalizedString("Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources.", comment: ""), buttonTitle: NSLocalizedString("Continue", comment: "")) ntfPostInstall.messageText = NSLocalizedString("Warning", comment: "")
ntfPostInstall.informativeText = NSLocalizedString("Input method may not be fully enabled. Please enable it through System Preferences > Keyboard > Input Sources.", comment: "")
ntfPostInstall.addButton(withTitle: NSLocalizedString("Continue", comment: ""))
} else { } else {
runAlertPanel(title: NSLocalizedString("Installation Successful", comment: ""), message: NSLocalizedString("vChewing is ready to use.", comment: ""), buttonTitle: NSLocalizedString("OK", comment: "")) ntfPostInstall.messageText = NSLocalizedString("Installation Successful", comment: "")
ntfPostInstall.informativeText = NSLocalizedString("vChewing is ready to use.", comment: "")
ntfPostInstall.addButton(withTitle: NSLocalizedString("OK", comment: ""))
} }
} }
ntfPostInstall.beginSheetModal(for: window!) { response in
endAppWithDelay() self.endAppWithDelay()
}
} }
func endAppWithDelay() { func endAppWithDelay() {

View File

@ -13,6 +13,6 @@
"Abort" = "中止"; "Abort" = "中止";
"Cannot register input source %@ at %@." = "「%2$@」で入力アプリ「\"%1$@\"」の実装は失敗しました。"; "Cannot register input source %@ at %@." = "「%2$@」で入力アプリ「\"%1$@\"」の実装は失敗しました。";
"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" = "続行";