Skip to content
Snippets Groups Projects
Commit 9a943ac7 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #126 - Add English localization

parent 1ca011d5
Branches
Tags
1 merge request!160merge v1_4_0 into master
...@@ -2,6 +2,9 @@ package de.deadlocker8.budgetmaster.logic; ...@@ -2,6 +2,9 @@ package de.deadlocker8.budgetmaster.logic;
import java.util.ArrayList; import java.util.ArrayList;
import de.deadlocker8.budgetmaster.logic.utils.Strings;
import tools.Localization;
public class CategoryHandler public class CategoryHandler
{ {
private ArrayList<Category> categories; private ArrayList<Category> categories;
...@@ -12,6 +15,15 @@ public class CategoryHandler ...@@ -12,6 +15,15 @@ public class CategoryHandler
if(categories != null) if(categories != null)
{ {
this.categories.addAll(categories); this.categories.addAll(categories);
//set correct localized name for category "rest"
for(Category currentCategory : categories)
{
if(currentCategory.getID() == 2)
{
currentCategory.setName(Localization.getString(Strings.CATEGORY_REST));
}
}
} }
} }
......
...@@ -29,7 +29,7 @@ public class Main extends Application ...@@ -29,7 +29,7 @@ public class Main extends Application
//load correct language //load correct language
Settings settings = FileHelper.loadSettings(); Settings settings = FileHelper.loadSettings();
if(settings.getLanguage() != null) if(settings != null && settings.getLanguage() != null)
{ {
Localization.loadLanguage(settings.getLanguage().getLocale()); Localization.loadLanguage(settings.getLanguage().getLocale());
} }
...@@ -61,7 +61,7 @@ public class Main extends Application ...@@ -61,7 +61,7 @@ public class Main extends Application
public void init() throws Exception public void init() throws Exception
{ {
Localization.init("de/deadlocker8/budgetmaster/resources/languages/"); Localization.init("de/deadlocker8/budgetmaster/resources/languages/");
Localization.loadLanguage(Locale.GERMANY); Localization.loadLanguage(Locale.ENGLISH);
Parameters params = getParameters(); Parameters params = getParameters();
String logLevelParam = params.getNamed().get("loglevel"); String logLevelParam = params.getNamed().get("loglevel");
......
# DEFAULT # DEFAULT
app.name=BudgetMaster app.name=BudgetMaster
version.code=7 version.code=7
version.name=1.4.0_alpha version.name=1.4.0
version.date=12.08.17 version.date=23.08.17
author=Robert Goldmann author=Robert Goldmann
credits=Länderflaggen von Freepik auf https://www.flaticon.com credits=Länderflaggen von Freepik auf https://www.flaticon.com
...@@ -125,8 +125,8 @@ info.header.text.database.delete=Soll die Datenbank wirklich gel ...@@ -125,8 +125,8 @@ info.header.text.database.delete=Soll die Datenbank wirklich gel
info.text.database.delete=Zur Bestätigung gib folgenden Code ein:\t{0} info.text.database.delete=Zur Bestätigung gib folgenden Code ein:\t{0}
info.title.welcome=Willkommen info.title.welcome=Willkommen
info.header.text.welcome=Willkommen beim BudgetMaster info.header.text.welcome=Willkommen beim BudgetMaster
info.text.welcome.first.start=Dies scheint dein erster Besuch zu sein, da noch keine Einstellungen existieren.\nDamit es losgehen kann, überlege dir ein Passwort und trage es in das Passwortfeld ein.\n\n(Hinweis: Das Passwort kann später jederzeit geändert werden.)\n " info.text.welcome.first.start=Dies scheint dein erster Besuch zu sein, da noch keine Einstellungen existieren.\nDamit es losgehen kann, überlege dir ein Passwort und trage es in das Passwortfeld ein.\n\n(Hinweis: Das Passwort kann später jederzeit geändert werden.)\n\n
info.text.welcome.compatibility=Deine Einstellungsdatei ist veraltet und muss aktualisert werden.\nSeit Version v1.3.0 wird ein Passwort benötigt, um BudgetMaster zu entsperren. Damit es losgehen kann, überlege dir ein Passwort und trage es in das Passwortfeld ein.\n\n(Hinweis: Das Passwort kann später jederzeit geändert werden.)\n " info.text.welcome.compatibility=Deine Einstellungsdatei ist veraltet und muss aktualisert werden.\nSeit Version v1.3.0 wird ein Passwort benötigt, um BudgetMaster zu entsperren. Damit es losgehen kann, überlege dir ein Passwort und trage es in das Passwortfeld ein.\n\n(Hinweis: Das Passwort kann später jederzeit geändert werden.)\n\n
info.title.language.changed=Neustarten info.title.language.changed=Neustarten
info.text.language.changed=Änderungen der Sprache werden erst nach einem Neustart des Programms wirksam. info.text.language.changed=Änderungen der Sprache werden erst nach einem Neustart des Programms wirksam.
...@@ -162,7 +162,7 @@ error.unknown.error=Unbekannter Fehler ({0}) ...@@ -162,7 +162,7 @@ error.unknown.error=Unbekannter Fehler ({0})
error.connection.refused=Server nicht erreichbar. error.connection.refused=Server nicht erreichbar.
error.https.hostname.wrong=Der Server verwendet ein selbst signiertes Zertifkat für die Verschlüsselung. Aus Sicherheitsgründen werden diese Zertifikate standardmäßig blockiert. Wenn du dem Zertifikat trotzdem vertrauen möchtest, dann füge den Hostnamen des Servers zur Liste der vertrauenswürdigen Hosts in den Einstellungen hinzu. error.https.hostname.wrong=Der Server verwendet ein selbst signiertes Zertifkat für die Verschlüsselung. Aus Sicherheitsgründen werden diese Zertifikate standardmäßig blockiert. Wenn du dem Zertifikat trotzdem vertrauen möchtest, dann füge den Hostnamen des Servers zur Liste der vertrauenswürdigen Hosts in den Einstellungen hinzu.
error.400=Der Server erhielt eine fehlerhafte Anfrage oder ungültige Parameter. error.400=Der Server erhielt eine fehlerhafte Anfrage oder ungültige Parameter.
error.401=Ungültiges Passwort. error.401=Ungültiges Server Passwort.
error.500=Beim Ausführen der Anfrage ist ein interner Serverfehler ist aufgetreten. error.500=Beim Ausführen der Anfrage ist ein interner Serverfehler ist aufgetreten.
error.create.ui=Beim Erstellen der Benutzeroberfläche ist ein Fehler aufgetreten. error.create.ui=Beim Erstellen der Benutzeroberfläche ist ein Fehler aufgetreten.
error.server.connection=Beim Herstellen der Verbindung zum Server ist ein Fehler aufgetreten. Bitte überprüfe deine Einstellungen. error.server.connection=Beim Herstellen der Verbindung zum Server ist ein Fehler aufgetreten. Bitte überprüfe deine Einstellungen.
......
# DEFAULT
app.name=BudgetMaster
version.code=7
version.name=1.4.0
version.date=23.08.17
author=Robert Goldmann
credits=Flags by Freepik on https://www.flaticon.com
folder=Deadlocker/BudgetMaster
# TITLE
title.incomes=Incomes
title.income=Income
title.payments=Payments
title.payment=Payment
title.categories=Categories
title.categorie=Category
title.category.budgets=Consumption by categories
title.amount=Amount
title.info=Information
title.warning=Warning
title.error=Error
title.category.new=New Category
title.category.edit=Edit Category
title.chart.export=Export Chart
title.modal=Process is running
title.payment.edit=Edit {0}
title.payment.new=New {0}
title.filter=Filter
title.report.save=Save Report
title.database.export=Export Database
title.database.import=Import Database
# LOAD
load.charts=Loading Charts...
load.data=Loading Data...
load.report=Please wait while the report is being generated...
load.database.export=Please wait while the database is being exported...
load.database.import=Please wait while the database is being imported...
load.database.delete=Please wait while the database is being deleted...
# MISC
category.none=No Category
category.rest=Rest
tooltip.chart.categories={0}\n{1} %\n{2}
chart.month.line.sum=Total in {0}
categories.placeholder=No categories available
chart.categories.title.incomes=Incomes by Categories
chart.categories.title.payments=Payments by Categories
ok=OK
cancel=Cancel
home.placeholder=No data available
home.budget=of {0} remaining
payments.placeholder=No data available
url.placeholder=e.g. https://yourdomain.de
currency.placeholder=e.g. \u20AC, CHF, $
trusted.hosts.placeholder=e.g. localhost
# REPORT
report.position=No.
report.date=Date
report.repeating=Repeating
report.category=Category
report.name=Name
report.description=Description
report.rating=+/-
report.amount=Amount
report.headline=Month Report - {0}
report.headline.payments.overview=Payments Overview
report.sum.total=Incomes: {0} / Payments: {1}
report.sum=Total: {0}
report.footer.left=BudgetMaster Month Report
report.footer.center=Page {0}
report.repeating.yes=Yes
report.repeating.no=No
report.initial.filename=BudgetMaster Month Report - {0}_{1}.pdf
# MONTH
month.january=January
month.february=February
month.march=March
month.april=April
month.may=May
month.june=June
month.july=July
month.august=August
month.september=September
month.october=October
month.november=November
month.december=December
# NOTIFICATION
notification.chart.export=Chart successfully exported.
notification.report.save=Report successfully saved.
notification.settings.save=Successfully saved.
# INFO
info.title.category.delete=Delete Category
info.text.category.delete=Do you really want to delete this category? This can't be undone.
info.title.payment.delete=Delete Entry
info.text.payment.delete=Do you really want to delete this entry? This can't be undone.
info.text.payment.repeating.delete=The entry you want to delete is a repeating entry. What entries should be deleted?
info.text.payment.repeating.delete.all=All Entries
info.text.payment.repeating.delete.futures=Future Entries
info.first.start=You must enter your server settings prior to first use.
info.title.chart.export=Successfully Exported
info.text.chart.export=The chart has been successfully exported.
info.text.chart.export.open.folder=Open Folder
info.text.chart.export.open.chart=Open Chart
info.title.report.save=Successfully Created
info.text.report.save=The month report has been successfully created.
info.text.report.save.open.folder=Open Folde
info.text.report.save.open.report=Open Report
info.title.database.export=Successfully Exported
info.text.database.export=The database has been successfully exported.
info.title.database.import=Successfully Imported
info.text.database.import=The database has been successfully imported.
info.title.database.import.dialog=Import Database
info.text.database.import.dialog=Do you want to delete the database before importing?
info.text.database.import.dialog.delete=Yes, delete database
info.text.database.import.dialog.append=No, append data
info.title.database.delete=Delete Database
info.header.text.database.delete=Do you really want to delete this entry? This can't be undone.
info.text.database.delete=Please enter the following code for verification:\t{0}
info.title.welcome=Welcome
info.header.text.welcome=Welcome to BudgetMaster
info.text.welcome.first.start=This seems to be your first visit because there are no settings yet.\nTo enter BudgetMaster consider yourself a password and enter it into the password field.\n\n(Note: the password can be changed at any time.)\n\n
info.text.welcome.compatibility=Your settings file is deprecated and needs to be updated.\nSince version v1.3.0, a password is required to unlock BudgetMaster. To enter BudgetMaster consider yourself a password and enter it into the password field.\n\n(Please note that the password can be changed at any time.)\n\n
info.title.language.changed=Restart
info.text.language.changed=Changes to the language will only take effect after a restart of the program.
info.text.language.changed.restart.now=Restart Now
info.text.language.changed.restart.later=Restart Later
# WARNING
warning.enddate.before.startdate=The end date can not be earlier than the start date.
warning.empty.width.in.pixels=Please enter a width in pixels.
warning.integer.width.in.pixels=Only integer values are allowed for the width field.
warning.empty.height.in.pixels=Please enter a height in pixels.
warning.integer.height.in.pixels=Only integer values are allowed for the height field.
warning.empty.savepath.chart=Please select a location where you want to save the chart.
warning.empty.category.name=The field for the name can not be empty.
warning.empty.payment.name=The field for the name can not be empty.
warning.name.character.limit.reached.45=The name must not exceed 45 characters in length.
warning.name.character.limit.reached.150=The name must not exceed 150 characters in length.
warning.description.character.limit.reached.150=The description must not exceed 150 characters in length.
warning.payment.amount=Please enter a valid number in the amount field.
warning.empty.payment.date=Please select a date.
warning.payment.repeating=If repeating is activated, both input fields may not be 0.\n(To deactivate the repeat, simply deselect the checkbox).
warning.empty.secret.client=The field for the client password can not be empty.
warning.empty.url=The field for the server URL can not be empty.
warning.empty.secret.server=The field for the server password can not be empty.
warning.empty.currency=Please enter your desired currency.
warning.wrong.verificationcode=The input does not match the verification code.
warning.empty.password=Please enter your password.
warning.wrong.password=The password is not correct.
# ERROR
error.unknown.host=Could not connect to the Internet.
error.unknown.error=Unknown Error ({0})
error.connection.refused=Server not available.
error.https.hostname.wrong=The server uses a self-signed certifier for encryption. For security reasons, these certificates are blocked by default. If you want to trust the certificate, add the hostname of the server to the list of trusted hosts in the settings.
error.400=The server received a bad request or invalid parameters.
error.401=Invalid Server Password.
error.500=An internal server error occurred while processing the request.
error.create.ui=An error occurred while creating the user interface.
error.server.connection=An error occurred while connecting to the server. Please check your settings.
error.server.connection.with.details=BAn error occurred while connecting to the server. Please check your settings.\n\nError details:\n{0}
error.open.folder=The folder couldn't be opened.\n\n{0}
error.open.chart=The chart couldn't be opened.\n\n{0}
error.open.report=The report couldn't be opened.\n\n{0}
error.chart.export=An error occurred while exporting the chart:\n\n{0}
error.report.save=An error occurred while creating the month report:\n\n{0}
error.settings.save=An error occurred while saving the settings.
error.database.import=An error occurred while reading the file.
error.database.import.wrong.file=The specified file does not contain a valid BudgetMaster data format thus can not be imported.
error.password.save=An error occurred while saving the password.
# UI
categorytab.button.category.new=\ New Category
charttab.titlepane.chart.categories=Incomes/Payments by Categories
charttab.titlepane.chart.months=Incomes/Payments per Month
charttab.label.start=From:
charttab.label.end=To:
charttab.checkbox.bars=Bars
charttab.checkbox.lines=Lines
export.chart.label.width=Width:
export.chart.label.height=Height:
export.chart.label.savepath=Location:
export.chart.button.change=Change
export.chart.button.export=Export
filter.headline=Filter by:
filter.type=Type
filter.type.income=Income
filter.type.payment=Payment
filter.repeating=Repeating
filter.repeating.none=no repeating
filter.repeating.monthday=monthly
filter.repeating.interval=every X days
filter.categories=Categories
filter.categories.button.all=All
filter.categories.button.none=None
filter.name=Name
filter.button.reset=Reset
filter.button.filter=Filter
gui.tab.home=Home
gui.tab.payments=Payments
gui.tab.categories=Categories
gui.tab.charts=Charts
gui.tab.report=Month Report
gui.tab.settings=Settings
hometab.categorybudgets=Consumption by categories
category.new.label.name=Name:
category.new.label.max.characters=(up to 45 characters)
category.new.label.color=Color:
category.new.button.save=Save
payment.new.label.name=Name:
payment.new.label.max.characters=(up to 150 characters)
payment.new.label.amount=Amount:
payment.new.label.category=Category:
payment.new.label.date=Date:
payment.new.label.description=Description:
payment.new.label.repeating=Repeating:
payment.new.label.repeating.all=every
payment.new.label.repeating.days=days
payment.new.label.repeating.monthday=every month at:
payment.new.label.enddate=Enddate
payment.new.button.save=Save
paymenttab.button.new.income=\ New Income
paymenttab.button.new.payment=\ New Payment
paymenttab.button.filter=Filter
paymenttab.label.filter.active=Filter active
paymenttab.label.incomes=Incomes:
paymenttab.label.payments=Payments:
reporttab.checkbox.include.budget=Include budget calculation
reporttab.checkbox.split.tables=Split incomes and payments into separate tables
reporttab.checkbox.inclue.categorybudgets=Include consumption by categories
reporttab.button.generate.report=Create Report
settingstab.label.secret.client=Client Password:
settingstab.label.url=Server URL:
settingstab.label.secret.server=Server Password:
settingstab.label.currency=Currency:
settingstab.label.rest=Rest:
settingstab.label.rest.activated=activated
settingstab.label.rest.deactivated=deactivated
settingstab.label.trusted.hosts=Trusted Hosts:
settingstab.label.trusted.hosts.info=(one per line)
settingstab.label.language=Language:
settingstab.label.database=Database:
settingstab.button.database.export=Export
settingstab.button.database.import=Import
settingstab.button.database.delete=Delete
settings.tab.button.save=Save
splashscreen.label.password=Password:
...@@ -82,8 +82,8 @@ public class SettingsController ...@@ -82,8 +82,8 @@ public class SettingsController
comboBoxLanguage.getItems().addAll(LanguageType.values()); comboBoxLanguage.getItems().addAll(LanguageType.values());
comboBoxLanguage.setButtonCell(new LanguageCell(false)); comboBoxLanguage.setButtonCell(new LanguageCell(false));
comboBoxLanguage.setValue(LanguageType.GERMAN); comboBoxLanguage.setValue(LanguageType.ENGLISH);
previousLanguage = LanguageType.GERMAN; previousLanguage = LanguageType.ENGLISH;
if(controller.getSettings().isComplete()) if(controller.getSettings().isComplete())
{ {
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<children> <children>
<HBox alignment="CENTER_RIGHT" spacing="10.0"> <HBox alignment="CENTER_RIGHT" spacing="10.0">
<children> <children>
<Label prefHeight="25.0" prefWidth="45.0" text="%charttab.label.end"> <Label prefHeight="25.0" prefWidth="45.0" text="%charttab.label.start">
<font> <font>
<Font name="System Bold" size="16.0" /> <Font name="System Bold" size="16.0" />
</font> </font>
......
...@@ -19,12 +19,14 @@ import tools.Localization; ...@@ -19,12 +19,14 @@ import tools.Localization;
public class Main public class Main
{ {
private static ResourceBundle bundle = ResourceBundle.getBundle("de/deadlocker8/budgetmasterserver/main/", Locale.GERMANY); //for server specific version information
private static ResourceBundle bundle = ResourceBundle.getBundle("de/deadlocker8/budgetmasterserver/main/", Locale.ENGLISH);
public static void main(String[] args) public static void main(String[] args)
{ {
Localization.init("de/deadlocker8/budgetmasterserver/main/"); //for category.none in class Category
Localization.loadLanguage(Locale.GERMANY); Localization.init("de/deadlocker8/budgetmaster/resources/languages/");
Localization.loadLanguage(Locale.ENGLISH);
Logger.setLevel(LogLevel.ALL); Logger.setLevel(LogLevel.ALL);
Logger.appInfo(bundle.getString("app.name"), bundle.getString("version.name"), bundle.getString("version.code"), bundle.getString("version.date")); Logger.appInfo(bundle.getString("app.name"), bundle.getString("version.name"), bundle.getString("version.code"), bundle.getString("version.date"));
......
app.name=BudgetMasterServer app.name=BudgetMasterServer
version.code=7 version.code=7
version.name=1.4.0_alpha version.name=1.4.0
version.date=12.08.17 version.date=23.08.17
author=Robert Goldmann author=Robert Goldmann
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment