From 1598109bb68b14b8d38ec47b129f3e8069d8f48c Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Sun, 11 Jul 2021 15:35:05 +0200 Subject: [PATCH] #626 - added new hint transaction save hotkey --- .../java/de/deadlocker8/budgetmaster/hints/HintService.java | 2 +- src/main/resources/languages/hints_de.properties | 5 +++-- src/main/resources/languages/hints_en.properties | 5 +++-- .../templates/transactions/newTransactionNormal.ftl | 3 +++ .../templates/transactions/newTransactionRepeating.ftl | 3 +++ .../templates/transactions/newTransactionTransfer.ftl | 3 +++ 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java b/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java index 4fbb05541..77038df75 100644 --- a/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java +++ b/src/main/java/de/deadlocker8/budgetmaster/hints/HintService.java @@ -54,7 +54,7 @@ public class HintService implements Resettable @Override public void createDefaults() { - final List<String> hintKeys = List.of("hint.first.use.teaser", "hint.report.columns", "hint.template.arrow.keys"); + final List<String> hintKeys = List.of("hint.first.use.teaser", "hint.report.columns", "hint.template.arrow.keys", "hint.transaction.save"); for(String localizationKey : hintKeys) { diff --git a/src/main/resources/languages/hints_de.properties b/src/main/resources/languages/hints_de.properties index c9c7e1ca0..bd7fa57f2 100644 --- a/src/main/resources/languages/hints_de.properties +++ b/src/main/resources/languages/hints_de.properties @@ -3,5 +3,6 @@ button.hints.reset=Alle Tipps zurücksetzen notification.hints.reset=Alle Tipps zurückgesetzt hint.first.use.teaser=Neu im BudgetMaster? Sieh dir die Einführung an! -hint.report.columns=Hinweis: Du kannst die Reihenfolge der Spalten per Drag&Drop anpassen -hint.template.arrow.keys=Du kannst eine Vorlage mit den Pfeiltasten auswählen und mit Enter bestätigen +hint.report.columns=Tipp: Du kannst die Reihenfolge der Spalten per Drag&Drop anpassen +hint.template.arrow.keys=Tipp: Du kannst eine Vorlage mit den Pfeiltasten auswählen und mit Enter bestätigen +hint.transaction.save=Tipp: Nutze Strg+Enter zum Speichern der Buchung \ No newline at end of file diff --git a/src/main/resources/languages/hints_en.properties b/src/main/resources/languages/hints_en.properties index 31a3384fc..0fc3a6d0e 100644 --- a/src/main/resources/languages/hints_en.properties +++ b/src/main/resources/languages/hints_en.properties @@ -3,5 +3,6 @@ button.hints.reset=Reset all hints notification.hints.reset=All hints reset hint.first.use.teaser=New to BudgetMaster? Check out the first use guide! -hint.report.columns=Note: You can change the order of the columns by drag&drop -hint.template.arrow.keys=You can select a template by using the arrow keys and confirm with enter \ No newline at end of file +hint.report.columns=Hint: You can change the order of the columns by drag&drop +hint.template.arrow.keys=Hint: You can select a template by using the arrow keys and confirm with enter +hint.transaction.save=Hint: Use Ctrl+Enter to save the transaction \ No newline at end of file diff --git a/src/main/resources/templates/transactions/newTransactionNormal.ftl b/src/main/resources/templates/transactions/newTransactionNormal.ftl index aa8a182ee..82b800818 100644 --- a/src/main/resources/templates/transactions/newTransactionNormal.ftl +++ b/src/main/resources/templates/transactions/newTransactionNormal.ftl @@ -43,6 +43,9 @@ <#-- isPayment switch --> <@newTransactionMacros.isExpenditureSwitch transaction/> + <#assign hint=helpers.getHintByLocalizationKey("hint.transaction.save")/> + <@header.hint hint=hint/> + <#-- name --> <@newTransactionMacros.transactionName transaction suggestionsJSON/> diff --git a/src/main/resources/templates/transactions/newTransactionRepeating.ftl b/src/main/resources/templates/transactions/newTransactionRepeating.ftl index 1756b0f9f..5c9d47f7b 100644 --- a/src/main/resources/templates/transactions/newTransactionRepeating.ftl +++ b/src/main/resources/templates/transactions/newTransactionRepeating.ftl @@ -41,6 +41,9 @@ <#-- isPayment switch --> <@newTransactionMacros.isExpenditureSwitch transaction/> + <#assign hint=helpers.getHintByLocalizationKey("hint.transaction.save")/> + <@header.hint hint=hint/> + <#-- name --> <@newTransactionMacros.transactionName transaction suggestionsJSON/> diff --git a/src/main/resources/templates/transactions/newTransactionTransfer.ftl b/src/main/resources/templates/transactions/newTransactionTransfer.ftl index 4055fb273..96c3c21e6 100644 --- a/src/main/resources/templates/transactions/newTransactionTransfer.ftl +++ b/src/main/resources/templates/transactions/newTransactionTransfer.ftl @@ -41,6 +41,9 @@ <input type="hidden" name="isExpenditure" value="true"> <input type="hidden" name="previousType" value="<#if previousType??>${previousType.name()}</#if>"> + <#assign hint=helpers.getHintByLocalizationKey("hint.transaction.save")/> + <@header.hint hint=hint/> + <#-- name --> <@newTransactionMacros.transactionName transaction suggestionsJSON/> -- GitLab