Fix #6251
This commit is contained in:
parent
404f83a277
commit
23d7494e3a
@ -10,6 +10,7 @@ import sys
|
|||||||
from contextlib import contextmanager, suppress
|
from contextlib import contextmanager, suppress
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
from gettext import ngettext
|
||||||
from time import monotonic, sleep
|
from time import monotonic, sleep
|
||||||
from typing import (
|
from typing import (
|
||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
@ -1010,9 +1011,8 @@ class Boss:
|
|||||||
tm = tab.tab_manager_ref()
|
tm = tab.tab_manager_ref()
|
||||||
if tm is not None:
|
if tm is not None:
|
||||||
tm.set_active_tab(tab)
|
tm.set_active_tab(tab)
|
||||||
self.confirm(_(
|
self.confirm(ngettext('Are you sure you want to close this tab, it has one window running?',
|
||||||
'Are you sure you want to close this tab, it has {}'
|
'Are you sure you want to close this tab, it has {} windows running?', num).format(num),
|
||||||
' windows running?').format(num),
|
|
||||||
self.handle_close_tab_confirmation, tab.id,
|
self.handle_close_tab_confirmation, tab.id,
|
||||||
window=tab.active_window,
|
window=tab.active_window,
|
||||||
)
|
)
|
||||||
@ -1602,8 +1602,8 @@ class Boss:
|
|||||||
if tm is not None:
|
if tm is not None:
|
||||||
w = tm.active_window
|
w = tm.active_window
|
||||||
self.confirm(
|
self.confirm(
|
||||||
_('Are you sure you want to close this OS window, it has {}'
|
ngettext('Are you sure you want to close this OS window, it has one window running?',
|
||||||
' windows running?').format(num),
|
'Are you sure you want to close this OS window, it has {} windows running', num).format(num),
|
||||||
self.handle_close_os_window_confirmation, os_window_id,
|
self.handle_close_os_window_confirmation, os_window_id,
|
||||||
window=w,
|
window=w,
|
||||||
)
|
)
|
||||||
@ -1642,7 +1642,8 @@ class Boss:
|
|||||||
return
|
return
|
||||||
assert tm is not None
|
assert tm is not None
|
||||||
self.confirm(
|
self.confirm(
|
||||||
_('Are you sure you want to quit kitty, it has {} windows running?').format(num),
|
ngettext('Are you sure you want to quit kitty, it has one window running?',
|
||||||
|
'Are you sure you want to quit kitty, it has {} windows running?', num).format(num),
|
||||||
self.handle_quit_confirmation,
|
self.handle_quit_confirmation,
|
||||||
window=tm.active_window,
|
window=tm.active_window,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user