mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Add title for some dialogs and avoid hardcoding the text of the discard changes dialog (#3846)
* feat: add title to rename dialog * fix: localize hardcoded message * feat: add title to create deck dialog * refactor: formatting fixes * add name to about screen adding my name to contributors for the third time
This commit is contained in:
parent
d8460d354a
commit
94e90dbf85
5 changed files with 10 additions and 4 deletions
|
@ -98,7 +98,7 @@ gnnoh <gerongfenh@gmail.com>
|
|||
Sachin Govind <sachin.govind.too@gmail.com>
|
||||
Bruce Harris <github.com/bruceharris>
|
||||
Patric Cunha <patricc@agap2.pt>
|
||||
Brayan Oliveira <github.com/brayandso>
|
||||
Brayan Oliveira <69634269+BrayanDSO@users.noreply.github.com>
|
||||
Luka Warren <github.com/lukawarren>
|
||||
wisherhxl <wisherhxl@gmail.com>
|
||||
dobefore <1432338032@qq.com>
|
||||
|
|
|
@ -215,6 +215,7 @@ def show(mw: aqt.AnkiQt) -> QDialog:
|
|||
"Danika_Dakika",
|
||||
"Marcelo Vasconcelos",
|
||||
"Mumtaz Hajjo Alrifai",
|
||||
"Brayan Oliveira",
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -328,7 +328,9 @@ class DeckBrowser:
|
|||
|
||||
def _rename(self, did: DeckId) -> None:
|
||||
def prompt(name: str) -> None:
|
||||
new_name = getOnlyText(tr.decks_new_deck_name(), default=name)
|
||||
new_name = getOnlyText(
|
||||
tr.decks_new_deck_name(), default=name, title=tr.actions_rename()
|
||||
)
|
||||
if not new_name or new_name == name:
|
||||
return
|
||||
else:
|
||||
|
|
|
@ -288,7 +288,7 @@ class FieldDialog(QDialog):
|
|||
self.webview = None
|
||||
|
||||
if self.change_tracker.changed():
|
||||
if not askUser("Discard changes?"):
|
||||
if not askUser(tr.card_templates_discard_changes()):
|
||||
return
|
||||
|
||||
QDialog.reject(self)
|
||||
|
|
|
@ -59,7 +59,10 @@ def add_deck_dialog(
|
|||
default_text: str = "",
|
||||
) -> CollectionOp[OpChangesWithId] | None:
|
||||
if name := getOnlyText(
|
||||
tr.decks_new_deck_name(), default=default_text, parent=parent
|
||||
tr.decks_new_deck_name(),
|
||||
default=default_text,
|
||||
parent=parent,
|
||||
title=tr.decks_create_deck(),
|
||||
).strip():
|
||||
return add_deck(parent=parent, name=name)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue