From d2b96bc4365984199d46e232228543cbf59eee9e Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Sat, 2 Mar 2019 11:29:27 +0100
Subject: [PATCH] Fixed #413 - added localization; buttons no longer hiding
 text if browser is too small

---
 src/main/resources/languages/_de.properties  | 13 +++++++++++++
 src/main/resources/languages/_en.properties  | 16 ++++++++++++++++
 src/main/resources/static/css/dark/style.css |  7 ++++++-
 src/main/resources/static/css/style.css      |  7 ++++++-
 src/main/resources/templates/index.ftl       | 16 ++++++++--------
 5 files changed, 49 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/languages/_de.properties b/src/main/resources/languages/_de.properties
index 6f2d86497..a675f29dc 100644
--- a/src/main/resources/languages/_de.properties
+++ b/src/main/resources/languages/_de.properties
@@ -257,8 +257,21 @@ filter.tags.button.none=Keine
 
 # home menu
 home.menu.accounts=Konten erlauben es mehrere Buchungen zu gruppieren. Du kannst so viele Konten erstellen, wie du m�chtest.
+home.menu.accounts.action.manage=Kontoverwaltung
+home.menu.accounts.action.new=Neues Konto anlegen
+
 home.menu.transactions=Buchungen sind das zentrale Element von BudgetMaster. Gib ihnen einen Namen und eine Beschreibung, weise ihnen eine Kategorie und ein Konto zu, konfiguriere sie als wiederholend und markiere sie mit Tags.
+home.menu.transactions.action.manage=Buchungsverwaltung
+home.menu.transactions.action.new=Neue Buchung anlegen
+
 home.menu.charts=Diese Funktion wird in einer kommenden Version verf�gbar sein.
+
 home.menu.reports=Erstelle konfigurierbare Monatsberichte als PDF zum Ausdrucken und Archivieren. Du kannst den Inhalt der Berichte filtern und zum Beispiel nach Einnahmen und Ausgaben getrennt auflisten lassen.
+home.menu.reports.action.new=Neuen Bericht erstellen
+
 home.menu.categories=Kategorien k�nnen Buchungen zugeordnet werden, um diese als zusammengeh�rig zu kennzeichnen. Eine Kategorie besteht aus einem Namen und einer Farbe. Letztere kann aus einer vordefinierten Farbpalette oder mit Hilfe eines benutzerdefinierten Farbw�hlers ausgew�hlt werden.
+home.menu.categories.action.manage=Kategorieverwaltung
+home.menu.categories.action.new=Neue Kategorie anlegen
+
 home.menu.settings=Verwalte allgemeine Einstellungen wie dein Login-Passwort, deine bevorzugte Sprache und wie Updates verwaltet werden sollen. Dieser Bereich bietet zudem die M�glichkeit, deine Daten zu exportieren oder zu l�schen, sowie eine bestehende Datenbank zu importieren.
+home.menu.settings.action.manage=Einstellungen
diff --git a/src/main/resources/languages/_en.properties b/src/main/resources/languages/_en.properties
index 2e0c43f78..8c5cf0785 100644
--- a/src/main/resources/languages/_en.properties
+++ b/src/main/resources/languages/_en.properties
@@ -258,8 +258,24 @@ filter.tags.button.none=None
 
 # home menu
 home.menu.accounts=Accounts allow you to group multiple transactions. You can create as many accounts as you want.
+home.menu.accounts.action.manage=Manage accounts
+home.menu.accounts.action.new=Create an account
+
 home.menu.transactions=Transactions are the key element of BudgetMaster. Give them a name and description, assign a category and account to them, configure them as recurring, and mark them with tags.
+home.menu.transactions.action.manage=Manage transactions
+home.menu.transactions.action.new=Create a transaction
+
 home.menu.charts=This feature will be available in an upcoming release.
+
 home.menu.reports=Create configurable month reports in PDF format for printing and archiving. You can filter the content of the reports and, for example, list them separately to incomes and expenditures.
+home.menu.reports.action.new=Create a report
+
 home.menu.categories=Categories can be assigned to transactions in order to mark them as belonging together. They consists of a name an a color. Latter can be chosen from a predefined color palette or by using a custom color picker.
+home.menu.categories.action.manage=Manage Categories
+home.menu.categories.action.new=Create a category
+
 home.menu.settings=Manage general settings such as login password, your preferred language and how to handle updates. This section also offers the possibility to export or delete your data or importing an existing database.
+home.menu.settings.action.manage=Settings
+
+
+
diff --git a/src/main/resources/static/css/dark/style.css b/src/main/resources/static/css/dark/style.css
index 8b8529e8e..50525125a 100644
--- a/src/main/resources/static/css/dark/style.css
+++ b/src/main/resources/static/css/dark/style.css
@@ -493,13 +493,18 @@ input[type="radio"]:not(:checked) + span::before, [type="radio"]:not(:checked) +
     margin: auto
 }
 
+.btn-flat {
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
 .home-menu-flex {
     display: flex;
     flex-wrap: wrap;
 }
 
 .home-menu-flex .col {
-    margin-bottom: 2rem;
+    margin-bottom: 3rem;
 }
 
 .home-menu-link {
diff --git a/src/main/resources/static/css/style.css b/src/main/resources/static/css/style.css
index 2ba0cc0ab..31d310901 100644
--- a/src/main/resources/static/css/style.css
+++ b/src/main/resources/static/css/style.css
@@ -420,13 +420,18 @@ input[type="radio"]:checked + span::after, [type="radio"].with-gap:checked + spa
     margin: auto
 }
 
+.btn-flat {
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
 .home-menu-flex {
     display: flex;
     flex-wrap: wrap;
 }
 
 .home-menu-flex .col {
-    margin-bottom: 2rem;
+    margin-bottom: 3rem;
 }
 
 .home-menu-link {
diff --git a/src/main/resources/templates/index.ftl b/src/main/resources/templates/index.ftl
index f3f62f290..a51912e67 100644
--- a/src/main/resources/templates/index.ftl
+++ b/src/main/resources/templates/index.ftl
@@ -29,8 +29,8 @@
                             </a>
                             <p class="text-grey home-menu-text">${locale.getString("home.menu.accounts")}</p>
                             <div class="left-align">
-                                <a href="<@s.url '/accounts'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Kontoverwaltung</a>
-                                <a href="<@s.url '/accounts/newAccount'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Neues Konto anlegen</a>
+                                <a href="<@s.url '/accounts'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.accounts.action.manage")}</a>
+                                <a href="<@s.url '/accounts/newAccount'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.accounts.action.new")}</a>
                             </div>
                         </div>
                         <div class="col s12 m6 l4 home-menu-cell">
@@ -40,8 +40,8 @@
                             </a>
                             <p class="text-grey home-menu-text">${locale.getString("home.menu.transactions")}</p>
                             <div class="left-align">
-                                <a href="<@s.url '/transactions'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Buchungsverwaltung</a>
-                                <a href="<@s.url '/transactions/newTransaction'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Neue Buchung anlegen</a>
+                                <a href="<@s.url '/transactions'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.transactions.action.manage")}</a>
+                                <a href="<@s.url '/transactions/newTransaction'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.transactions.action.new")}n</a>
                             </div>
                         </div>
                 <div class="hide-on-small-only hide-on-large-only">
@@ -66,7 +66,7 @@
                             </a>
                             <p class="text-grey home-menu-text">${locale.getString("home.menu.reports")}</p>
                             <div class="left-align">
-                                <a href="<@s.url '/reports'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Neuen Report erstellen</a>
+                                <a href="<@s.url '/reports'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.reports.action.new")}</a>
                             </div>
                         </div>
                 <div class="hide-on-small-only hide-on-large-only">
@@ -80,8 +80,8 @@
                             </a>
                             <p class="text-grey home-menu-text">${locale.getString("home.menu.categories")}</p>
                             <div class="left-align">
-                                <a href="<@s.url '/categories'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Kategorieverwaltung</a>
-                                <a href="<@s.url '/categories/newCategory'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Neue Kategorie anlegen</a>
+                                <a href="<@s.url '/categories'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.categories.action.manage")}</a>
+                                <a href="<@s.url '/categories/newCategory'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.categories.action.new")}</a>
                             </div>
                         </div>
                         <div class="col s12 m6 l4 home-menu-cell">
@@ -91,7 +91,7 @@
                             </a>
                             <p class="text-grey home-menu-text">${locale.getString("home.menu.settings")}</p>
                             <div class="left-align">
-                                <a href="<@s.url '/settings'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>Einstellungen</a>
+                                <a href="<@s.url '/settings'/>" class="waves-effect btn-flat home-menu-link-item"><i class="material-icons left">play_arrow</i>${locale.getString("home.menu.settings.action.manage")}</a>
                             </div>
                         </div>
                     </div>
-- 
GitLab