From bc3a4fcf15aa71010bee76368572f6dc69fb8eff Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 24 Apr 2024 14:47:00 +0000 Subject: [PATCH] Rework finish key --- .../io/xpipe/app/browser/session/BrowserChooserComp.java | 5 +++++ app/src/main/java/io/xpipe/app/comp/base/DialogComp.java | 6 +++++- lang/app/strings/translations_da.properties | 1 + lang/app/strings/translations_de.properties | 2 ++ lang/app/strings/translations_en.properties | 2 ++ lang/app/strings/translations_es.properties | 1 + lang/app/strings/translations_fr.properties | 1 + lang/app/strings/translations_it.properties | 1 + lang/app/strings/translations_ja.properties | 1 + lang/app/strings/translations_nl.properties | 1 + lang/app/strings/translations_pt.properties | 1 + lang/app/strings/translations_ru.properties | 1 + lang/app/strings/translations_tr.properties | 1 + lang/app/strings/translations_zh.properties | 1 + 14 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/xpipe/app/browser/session/BrowserChooserComp.java b/app/src/main/java/io/xpipe/app/browser/session/BrowserChooserComp.java index 9d404c9c3..290d7df58 100644 --- a/app/src/main/java/io/xpipe/app/browser/session/BrowserChooserComp.java +++ b/app/src/main/java/io/xpipe/app/browser/session/BrowserChooserComp.java @@ -116,6 +116,11 @@ public class BrowserChooserComp extends SimpleComp { var dialogPane = new DialogComp() { + @Override + protected String finishKey() { + return "select"; + } + @Override protected Comp pane(Comp content) { return content; diff --git a/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java b/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java index 4af602f50..853a809c5 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/DialogComp.java @@ -60,7 +60,7 @@ public abstract class DialogComp extends Comp> { .addAll(customButtons().stream() .map(buttonComp -> buttonComp.createRegion()) .toList()); - var nextButton = new ButtonComp(AppI18n.observable("finishStep"), null, this::finish) + var nextButton = new ButtonComp(AppI18n.observable(finishKey()), null, this::finish) .apply(struc -> struc.get().setDefaultButton(true)) .styleClass(Styles.ACCENT) .styleClass("next"); @@ -68,6 +68,10 @@ public abstract class DialogComp extends Comp> { return buttons; } + protected String finishKey() { + return "finishStep"; + } + protected List> customButtons() { return List.of(); } diff --git a/lang/app/strings/translations_da.properties b/lang/app/strings/translations_da.properties index 8fb06444f..317d63680 100644 --- a/lang/app/strings/translations_da.properties +++ b/lang/app/strings/translations_da.properties @@ -165,6 +165,7 @@ stackTrace=Stakspor previousStep=< Forrige nextStep=Næste > finishStep=Afslutte +select=Vælg edit=Rediger browseInternal=Gennemse internt checkOutUpdate=Tjek ud-opdatering diff --git a/lang/app/strings/translations_de.properties b/lang/app/strings/translations_de.properties index cc2a2acfa..b60e5ca07 100644 --- a/lang/app/strings/translations_de.properties +++ b/lang/app/strings/translations_de.properties @@ -171,6 +171,8 @@ previousStep=< Vorherige nextStep=Weiter > #custom finishStep=Fertigstellen +#custom +select=Auswählen edit=Bearbeiten browseInternal=Intern durchsuchen checkOutUpdate=Update auschecken diff --git a/lang/app/strings/translations_en.properties b/lang/app/strings/translations_en.properties index b2561956c..242a0d9d5 100644 --- a/lang/app/strings/translations_en.properties +++ b/lang/app/strings/translations_en.properties @@ -170,6 +170,8 @@ previousStep=< Previous nextStep=Next > #context: verb, to complete a task finishStep=Finish +#context: to complete a selection +select=Select edit=Edit browseInternal=Browse Internal checkOutUpdate=Check out update diff --git a/lang/app/strings/translations_es.properties b/lang/app/strings/translations_es.properties index 10634e56d..14bdc863c 100644 --- a/lang/app/strings/translations_es.properties +++ b/lang/app/strings/translations_es.properties @@ -165,6 +165,7 @@ stackTrace=Rastreo de pila previousStep=< Anterior nextStep=Siguiente finishStep=Terminar +select=Selecciona edit=Edita browseInternal=Navegar internamente checkOutUpdate=Comprueba la actualización diff --git a/lang/app/strings/translations_fr.properties b/lang/app/strings/translations_fr.properties index a5f324d7d..9d3f3b7f2 100644 --- a/lang/app/strings/translations_fr.properties +++ b/lang/app/strings/translations_fr.properties @@ -165,6 +165,7 @@ stackTrace=Trace de pile previousStep=< Précédent nextStep=Suivant > finishStep=Finir +select=Sélectionne edit=Éditer browseInternal=Parcourir l'intérieur checkOutUpdate=Vérifier la mise à jour diff --git a/lang/app/strings/translations_it.properties b/lang/app/strings/translations_it.properties index b04c4a2c5..f42c24559 100644 --- a/lang/app/strings/translations_it.properties +++ b/lang/app/strings/translations_it.properties @@ -165,6 +165,7 @@ stackTrace=Traccia dello stack previousStep=< Precedente nextStep=Avanti > finishStep=Terminare +select=Seleziona edit=Modifica browseInternal=Sfogliare interno checkOutUpdate=Aggiornamento del check out diff --git a/lang/app/strings/translations_ja.properties b/lang/app/strings/translations_ja.properties index 0c190e063..dd63ef1d8 100644 --- a/lang/app/strings/translations_ja.properties +++ b/lang/app/strings/translations_ja.properties @@ -165,6 +165,7 @@ stackTrace=スタックトレース previousStep=< 前へ nextStep=次のページ finishStep=完了する +select=選択する edit=編集する browseInternal=内部をブラウズする checkOutUpdate=更新をチェックする diff --git a/lang/app/strings/translations_nl.properties b/lang/app/strings/translations_nl.properties index bbee0ff8d..ecace140e 100644 --- a/lang/app/strings/translations_nl.properties +++ b/lang/app/strings/translations_nl.properties @@ -165,6 +165,7 @@ stackTrace=Stacktrack previousStep=< Vorig nextStep=Volgende > finishStep=Afmaken +select=Selecteer edit=Bewerken browseInternal=Intern bladeren checkOutUpdate=Uitchecken update diff --git a/lang/app/strings/translations_pt.properties b/lang/app/strings/translations_pt.properties index c18853660..0d09f11a3 100644 --- a/lang/app/strings/translations_pt.properties +++ b/lang/app/strings/translations_pt.properties @@ -165,6 +165,7 @@ stackTrace=Rastreio de pilha previousStep=< Anterior nextStep=Seguinte > finishStep=Terminar +select=Selecciona edit=Edita browseInternal=Navega internamente checkOutUpdate=Verifica a atualização diff --git a/lang/app/strings/translations_ru.properties b/lang/app/strings/translations_ru.properties index 53f17db52..23c57fce3 100644 --- a/lang/app/strings/translations_ru.properties +++ b/lang/app/strings/translations_ru.properties @@ -165,6 +165,7 @@ stackTrace=Трассировка стека previousStep=< Предыдущий nextStep=Следующая > finishStep=Закончи +select=Выбери edit=Редактировать browseInternal=Обзор внутренних checkOutUpdate=Проверить обновление diff --git a/lang/app/strings/translations_tr.properties b/lang/app/strings/translations_tr.properties index 6ecb36e05..5f5af12fc 100644 --- a/lang/app/strings/translations_tr.properties +++ b/lang/app/strings/translations_tr.properties @@ -165,6 +165,7 @@ stackTrace=Yığın izi previousStep=< Önceki nextStep=Sonraki > finishStep=Bitirmek +select=Seçiniz edit=Düzenle browseInternal=Dahili Gözat checkOutUpdate=Güncellemeye göz atın diff --git a/lang/app/strings/translations_zh.properties b/lang/app/strings/translations_zh.properties index 2e8db629c..9e7a2f960 100644 --- a/lang/app/strings/translations_zh.properties +++ b/lang/app/strings/translations_zh.properties @@ -165,6 +165,7 @@ stackTrace=堆栈跟踪 previousStep=< 上一页 nextStep=下一页 > finishStep=完成 +select=选择 edit=编辑 browseInternal=内部浏览 checkOutUpdate=签出更新