PrefWindow // Warn when unchecking the fart suppressor.
This commit is contained in:
parent
0d3a727d9d
commit
33501ebba9
|
@ -238,6 +238,34 @@ class CtlPrefWindow: NSWindowController, NSWindowDelegate {
|
|||
}
|
||||
|
||||
@IBAction func clickedWhetherIMEShouldNotFartToggleAction(_: Any) {
|
||||
let content = String(
|
||||
format: NSLocalizedString(
|
||||
"You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas.",
|
||||
comment: ""
|
||||
))
|
||||
let alert = NSAlert(error: NSLocalizedString("Warning", comment: ""))
|
||||
alert.informativeText = content
|
||||
alert.addButton(withTitle: NSLocalizedString("Uncheck", comment: ""))
|
||||
if #available(macOS 11, *) {
|
||||
alert.buttons.forEach { button in
|
||||
button.hasDestructiveAction = true
|
||||
}
|
||||
}
|
||||
alert.addButton(withTitle: NSLocalizedString("Leave it checked", comment: ""))
|
||||
if let window = window, !PrefMgr.shared.shouldNotFartInLieuOfBeep {
|
||||
PrefMgr.shared.shouldNotFartInLieuOfBeep = true
|
||||
alert.beginSheetModal(for: window) { result in
|
||||
switch result {
|
||||
case .alertFirstButtonReturn:
|
||||
PrefMgr.shared.shouldNotFartInLieuOfBeep = false
|
||||
case .alertSecondButtonReturn:
|
||||
PrefMgr.shared.shouldNotFartInLieuOfBeep = true
|
||||
default: break
|
||||
}
|
||||
IMEApp.buzz()
|
||||
}
|
||||
return
|
||||
}
|
||||
IMEApp.buzz()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
"vChewing" = "vChewing";
|
||||
"You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas." = "You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas.";
|
||||
"Uncheck" = "Uncheck";
|
||||
"Leave it checked" = "Leave it checked";
|
||||
"Warning" = "Warning";
|
||||
"You may follow:" = "You may follow:";
|
||||
"Initial" = "Initial";
|
||||
"Phrase" = "Phrase";
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
"vChewing" = "vChewing";
|
||||
"You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas." = "You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas.";
|
||||
"Uncheck" = "Uncheck";
|
||||
"Leave it checked" = "Leave it checked";
|
||||
"Warning" = "Warning";
|
||||
"You may follow:" = "You may follow:";
|
||||
"Initial" = "Initial";
|
||||
"Phrase" = "Phrase";
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
"vChewing" = "威注音入力アプリ";
|
||||
"You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas." = "マナーモードのチェックの外すことになります。周りの人は貴殿のパソコンから屁音を聞いてしまい、それについての結果は全部貴殿の自己責任でございます。公的なる場所でこのチェックを外すのはお勧めできません。";
|
||||
"Uncheck" = "チェックの外す";
|
||||
"Leave it checked" = "チェックをそのままに";
|
||||
"Warning" = "警告";
|
||||
"You may follow:" = "このように:";
|
||||
"Initial" = "頭文字";
|
||||
"Phrase" = "語彙";
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
"vChewing" = "威注音输入法";
|
||||
"You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas." = "您即将取消对廉耻模式的勾选。周围的人会听到您的电脑传出放屁的声音,且您对此负全部责任。我们强烈建议您不要在任何公共场合取消对该模式的勾选。";
|
||||
"Uncheck" = "取消勾选";
|
||||
"Leave it checked" = "保持勾选";
|
||||
"Warning" = "警告";
|
||||
"You may follow:" = "你可以照这样:";
|
||||
"Initial" = "首字";
|
||||
"Phrase" = "词语";
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
"vChewing" = "威注音輸入法";
|
||||
"You are about to uncheck this fart suppressor. You are responsible for all consequences lead by letting people nearby hear the fart sound come from your computer. We strongly advise against unchecking this in any public circumstance that prohibits NSFW netas." = "您即將取消對廉恥模式的勾選。周圍的人會聽到您的電腦傳出放屁的聲音,且您對此負全部責任。我們強烈建議您不要在任何公共場合取消對該模式的勾選。";
|
||||
"Uncheck" = "取消勾選";
|
||||
"Leave it checked" = "保持勾選";
|
||||
"Warning" = "警告";
|
||||
"You may follow:" = "你可以照這樣:";
|
||||
"Initial" = "首字";
|
||||
"Phrase" = "詞語";
|
||||
|
|
Loading…
Reference in New Issue