From 009e6949d9ea0db07aaec509b013dc4c47009d40 Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:28:14 -0300 Subject: [PATCH 1/5] feat: add title to rename dialog --- qt/aqt/deckbrowser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/deckbrowser.py b/qt/aqt/deckbrowser.py index a3969cedfcd..6c19c99689a 100644 --- a/qt/aqt/deckbrowser.py +++ b/qt/aqt/deckbrowser.py @@ -328,7 +328,7 @@ def _export(self, did: DeckId) -> None: 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: From ce3b0d9cd87669b238e6b4cd626149067051a70d Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:28:35 -0300 Subject: [PATCH 2/5] fix: localize hardcoded message --- qt/aqt/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/fields.py b/qt/aqt/fields.py index 652e5f3a2a2..69e38f4466e 100644 --- a/qt/aqt/fields.py +++ b/qt/aqt/fields.py @@ -288,7 +288,7 @@ def reject(self) -> None: 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) From f357a194ed1c23bbc0533427eca3bb9a56ef1fb6 Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:29:51 -0300 Subject: [PATCH 3/5] feat: add title to create deck dialog --- qt/aqt/operations/deck.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt/aqt/operations/deck.py b/qt/aqt/operations/deck.py index 327f9ab5220..518beafafbb 100644 --- a/qt/aqt/operations/deck.py +++ b/qt/aqt/operations/deck.py @@ -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: From 6275599e91bf9f6f22fa8a6360c18ec3006f061f Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:30:02 -0300 Subject: [PATCH 4/5] refactor: formatting fixes --- qt/aqt/deckbrowser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt/aqt/deckbrowser.py b/qt/aqt/deckbrowser.py index 6c19c99689a..77bd8422086 100644 --- a/qt/aqt/deckbrowser.py +++ b/qt/aqt/deckbrowser.py @@ -328,7 +328,9 @@ def _export(self, did: DeckId) -> None: def _rename(self, did: DeckId) -> None: def prompt(name: str) -> None: - new_name = getOnlyText(tr.decks_new_deck_name(), default=name, title=tr.actions_rename()) + new_name = getOnlyText( + tr.decks_new_deck_name(), default=name, title=tr.actions_rename() + ) if not new_name or new_name == name: return else: From 7eb2d3ce4057a198890b6badfbb98111646785c5 Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Fri, 7 Mar 2025 10:32:15 -0300 Subject: [PATCH 5/5] add name to about screen adding my name to contributors for the third time --- CONTRIBUTORS | 2 +- qt/aqt/about.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 0fb4726d234..06b9aca6b74 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -98,7 +98,7 @@ gnnoh Sachin Govind Bruce Harris Patric Cunha -Brayan Oliveira +Brayan Oliveira <69634269+BrayanDSO@users.noreply.github.com> Luka Warren wisherhxl dobefore <1432338032@qq.com> diff --git a/qt/aqt/about.py b/qt/aqt/about.py index 1eef28b8a7b..ec5352c4d5b 100644 --- a/qt/aqt/about.py +++ b/qt/aqt/about.py @@ -215,6 +215,7 @@ def on_dialog_destroyed() -> None: "Danika_Dakika", "Marcelo Vasconcelos", "Mumtaz Hajjo Alrifai", + "Brayan Oliveira", ) )