From 7c5e974ae5115b8bf6fc83949283645d6feb973e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 26 May 2021 14:41:18 +1000 Subject: [PATCH] hook up some missing translations in deck options screen --- ftl/core/deck-config.ftl | 22 ++++++++++++---------- qt/aqt/utils.py | 1 - ts/deckoptions/ConfigSelector.svelte | 8 ++++---- ts/deckoptions/SaveButton.svelte | 28 ++++++++++++++++++---------- ts/lib/i18n_helpers.ts | 6 ++++++ 5 files changed, 40 insertions(+), 25 deletions(-) diff --git a/ftl/core/deck-config.ftl b/ftl/core/deck-config.ftl index 4142019e7..480f95c97 100644 --- a/ftl/core/deck-config.ftl +++ b/ftl/core/deck-config.ftl @@ -170,24 +170,26 @@ deck-config-minimum-interval-tooltip = The minimum interval given to a review ca ## Adding/renaming -deck-config-add-group = Add Group -deck-config-name-prompt = Name: -deck-config-rename-group = Rename Group +deck-config-add-group = Add Preset +deck-config-name-prompt = Name +deck-config-rename-group = Rename Preset +deck-config-clone-group = Clone Preset ## Removing -deck-config-remove-group = Remove Group +deck-config-remove-group = Remove Preset deck-config-confirm-normal = Remove { $name }? --deck-config-will-require-full-sync = This will require a one-way sync. -# You don't need to translate this -deck-config-confirm-full = - { deck-config-confirm-normal } - { -deck-config-will-require-full-sync } +deck-config-will-require-full-sync = + The requested change will require a full upload of the database when you + next synchronize your collection. If you have reviews or other changes + waiting on another device that haven't been synchronized here yet, they will + be lost. +deck-config-confirm-remove-name = Remove { $name }? ## Other Buttons deck-config-save-button = Save -deck-config-save-to-all-children = Save to All Children +deck-config-save-to-all-subdecks = Save to All Subdecks deck-config-revert-button-tooltip = Restore this setting to its default value. ## These strings are shown via the Description button at the bottom of the diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py index 7533e4566..5d5ddbcdf 100644 --- a/qt/aqt/utils.py +++ b/qt/aqt/utils.py @@ -274,7 +274,6 @@ def askUser( default = QMessageBox.Yes r = msgfunc(parent, title, text, cast(QMessageBox.StandardButtons, sb), default) if r == QMessageBox.Help: - openHelp(help) else: break diff --git a/ts/deckoptions/ConfigSelector.svelte b/ts/deckoptions/ConfigSelector.svelte index 60e8e81e2..6a81b47e9 100644 --- a/ts/deckoptions/ConfigSelector.svelte +++ b/ts/deckoptions/ConfigSelector.svelte @@ -59,21 +59,21 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html let modalSuccess = (_text: string) => {}; function promptToAdd() { - modalTitle = "Add Config"; + modalTitle = tr.deckConfigAddGroup(); modalSuccess = onAddConfig; modalStartingValue = ""; modals.get(modalKey)!.show(); } function promptToClone() { - modalTitle = "Clone Config"; + modalTitle = tr.deckConfigCloneGroup(); modalSuccess = onCloneConfig; modalStartingValue = state.getCurrentName(); modals.get(modalKey)!.show(); } function promptToRename() { - modalTitle = "Rename Config"; + modalTitle = tr.deckConfigRenameGroup(); modalSuccess = onRenameConfig; modalStartingValue = state.getCurrentName(); modals.get(modalKey)!.show(); @@ -82,7 +82,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html - save(false)}>Save + save(false)} + >{tr.deckConfigSaveButton()} - dispatch("add")}>Add Config + dispatch("add")} + >{tr.deckConfigAddGroup()} dispatch("clone")} - >Clone Config{tr.deckConfigCloneGroup()} dispatch("rename")}> - Rename Config + {tr.deckConfigRenameGroup()} - Remove Config + {tr.deckConfigRemoveGroup()} save(true)}> - Save to All Children + {tr.deckConfigSaveToAllSubdecks()} diff --git a/ts/lib/i18n_helpers.ts b/ts/lib/i18n_helpers.ts index 1852dffa5..9049c906b 100644 --- a/ts/lib/i18n_helpers.ts +++ b/ts/lib/i18n_helpers.ts @@ -65,6 +65,12 @@ export class I18n { weekday: "narrow", }); } + + /// Treat text like HTML, merging multiple spaces and converting + /// newlines to spaces. + withCollapsedWhitespace(s: string): string { + return s.replace(/\s+/g, " "); + } } // global singleton