Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94e90db

Browse files
authored
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
1 parent d8460d3 commit 94e90db

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ gnnoh <[email protected]>
9898
Sachin Govind <[email protected]>
9999
Bruce Harris <github.com/bruceharris>
100100
Patric Cunha <[email protected]>
101-
Brayan Oliveira <github.com/brayandso>
101+
Brayan Oliveira <[email protected].github.com>
102102
Luka Warren <github.com/lukawarren>
103103
wisherhxl <[email protected]>
104104

qt/aqt/about.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ def on_dialog_destroyed() -> None:
215215
"Danika_Dakika",
216216
"Marcelo Vasconcelos",
217217
"Mumtaz Hajjo Alrifai",
218+
"Brayan Oliveira",
218219
)
219220
)
220221

qt/aqt/deckbrowser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,9 @@ def _export(self, did: DeckId) -> None:
328328

329329
def _rename(self, did: DeckId) -> None:
330330
def prompt(name: str) -> None:
331-
new_name = getOnlyText(tr.decks_new_deck_name(), default=name)
331+
new_name = getOnlyText(
332+
tr.decks_new_deck_name(), default=name, title=tr.actions_rename()
333+
)
332334
if not new_name or new_name == name:
333335
return
334336
else:

qt/aqt/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def reject(self) -> None:
288288
self.webview = None
289289

290290
if self.change_tracker.changed():
291-
if not askUser("Discard changes?"):
291+
if not askUser(tr.card_templates_discard_changes()):
292292
return
293293

294294
QDialog.reject(self)

qt/aqt/operations/deck.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ def add_deck_dialog(
5959
default_text: str = "",
6060
) -> CollectionOp[OpChangesWithId] | None:
6161
if name := getOnlyText(
62-
tr.decks_new_deck_name(), default=default_text, parent=parent
62+
tr.decks_new_deck_name(),
63+
default=default_text,
64+
parent=parent,
65+
title=tr.decks_create_deck(),
6366
).strip():
6467
return add_deck(parent=parent, name=name)
6568
else:

0 commit comments

Comments
 (0)