updated translations
This commit is contained in:
parent
b6ec9ba52c
commit
e2882d8c5e
|
@ -3,6 +3,7 @@ package me.teridax.jcash;
|
||||||
import me.teridax.jcash.banking.management.BankingManagementSystem;
|
import me.teridax.jcash.banking.management.BankingManagementSystem;
|
||||||
import me.teridax.jcash.gui.IconProvider;
|
import me.teridax.jcash.gui.IconProvider;
|
||||||
import me.teridax.jcash.gui.Loader;
|
import me.teridax.jcash.gui.Loader;
|
||||||
|
import me.teridax.jcash.gui.Utils;
|
||||||
import me.teridax.jcash.gui.account.AccountController;
|
import me.teridax.jcash.gui.account.AccountController;
|
||||||
import me.teridax.jcash.gui.login.LoginController;
|
import me.teridax.jcash.gui.login.LoginController;
|
||||||
import me.teridax.jcash.lang.Locales;
|
import me.teridax.jcash.lang.Locales;
|
||||||
|
@ -21,6 +22,7 @@ public final class Main {
|
||||||
|
|
||||||
private static final String LOGIN_SCREEN_STRING_IDENT = "LoginScreen";
|
private static final String LOGIN_SCREEN_STRING_IDENT = "LoginScreen";
|
||||||
private static final String PROFILE_SCREEN_STRING_IDENT = "ProfileScreen";
|
private static final String PROFILE_SCREEN_STRING_IDENT = "ProfileScreen";
|
||||||
|
private static final String VERSION = "v1.0.0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main instance of this program. Contains the primary window.
|
* Main instance of this program. Contains the primary window.
|
||||||
|
@ -41,7 +43,7 @@ public final class Main {
|
||||||
private Main() {
|
private Main() {
|
||||||
// create main window and set defaults
|
// create main window and set defaults
|
||||||
this.window = new JFrame();
|
this.window = new JFrame();
|
||||||
this.window.setTitle(translate("Cashmachine"));
|
this.window.setTitle(translate("Cashmachine") + getInfoString());
|
||||||
this.window.setLocationByPlatform(true);
|
this.window.setLocationByPlatform(true);
|
||||||
this.window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
this.window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
this.window.setIconImage(IconProvider.getWindowIcon());
|
this.window.setIconImage(IconProvider.getWindowIcon());
|
||||||
|
@ -52,6 +54,10 @@ public final class Main {
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getInfoString() {
|
||||||
|
return " locale: [" + Locales.getDefaultLocale().toString() + "] " + VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
private void initialize() {
|
private void initialize() {
|
||||||
// create the login mask
|
// create the login mask
|
||||||
|
|
||||||
|
@ -73,7 +79,13 @@ public final class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadDatabase() {
|
public void loadDatabase() {
|
||||||
this.bms = Loader.load();
|
try {
|
||||||
|
this.bms = Loader.load();
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.severe("Failed to load database: " + e.getMessage());
|
||||||
|
Utils.error("Failed to load database");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
this.loginMask.setBankingManagementSystem(bms);
|
this.loginMask.setBankingManagementSystem(bms);
|
||||||
showLoginScreen();
|
showLoginScreen();
|
||||||
this.window.pack();
|
this.window.pack();
|
||||||
|
|
|
@ -5,6 +5,8 @@ import me.teridax.jcash.decode.StringDecoder;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static me.teridax.jcash.lang.Translator.translate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for bank accounts.
|
* Base class for bank accounts.
|
||||||
* Stores the iban, pin and balance.
|
* Stores the iban, pin and balance.
|
||||||
|
@ -111,7 +113,7 @@ public abstract class Account {
|
||||||
* @return a basic description of the account in form a string
|
* @return a basic description of the account in form a string
|
||||||
*/
|
*/
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return String.format("%s (%s)", iban, getClass().getSimpleName());
|
return String.format("%s (%s)", iban, translate(getClass().getSimpleName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class DepositView {
|
||||||
c.gridwidth = 1;
|
c.gridwidth = 1;
|
||||||
c.fill = GridBagConstraints.HORIZONTAL;
|
c.fill = GridBagConstraints.HORIZONTAL;
|
||||||
c.anchor = GridBagConstraints.LAST_LINE_END;
|
c.anchor = GridBagConstraints.LAST_LINE_END;
|
||||||
dialog.getContentPane().add(new JLabel("Value to deposit:", SwingConstants.RIGHT), c);
|
dialog.getContentPane().add(new JLabel(translate("Value to deposit:"), SwingConstants.RIGHT), c);
|
||||||
|
|
||||||
c.gridx = 1;
|
c.gridx = 1;
|
||||||
c.gridy = 1;
|
c.gridy = 1;
|
||||||
|
@ -84,7 +84,7 @@ public class DepositView {
|
||||||
c.gridwidth = 1;
|
c.gridwidth = 1;
|
||||||
c.fill = GridBagConstraints.HORIZONTAL;
|
c.fill = GridBagConstraints.HORIZONTAL;
|
||||||
c.anchor = GridBagConstraints.LAST_LINE_END;
|
c.anchor = GridBagConstraints.LAST_LINE_END;
|
||||||
dialog.getContentPane().add(new JLabel("Balance after deposit:", SwingConstants.RIGHT), c);
|
dialog.getContentPane().add(new JLabel(translate("Balance after deposit:"), SwingConstants.RIGHT), c);
|
||||||
|
|
||||||
c.gridx = 1;
|
c.gridx = 1;
|
||||||
c.gridy = 2;
|
c.gridy = 2;
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class TakeoffView {
|
||||||
c.gridwidth = 1;
|
c.gridwidth = 1;
|
||||||
c.fill = GridBagConstraints.HORIZONTAL;
|
c.fill = GridBagConstraints.HORIZONTAL;
|
||||||
c.anchor = GridBagConstraints.LAST_LINE_END;
|
c.anchor = GridBagConstraints.LAST_LINE_END;
|
||||||
dialog.getContentPane().add(new JLabel("Value to deposit:", SwingConstants.RIGHT), c);
|
dialog.getContentPane().add(new JLabel(translate("Value to takeoff:"), SwingConstants.RIGHT), c);
|
||||||
|
|
||||||
c.gridx = 1;
|
c.gridx = 1;
|
||||||
c.gridy = 1;
|
c.gridy = 1;
|
||||||
|
@ -82,7 +82,7 @@ public class TakeoffView {
|
||||||
c.gridwidth = 1;
|
c.gridwidth = 1;
|
||||||
c.fill = GridBagConstraints.HORIZONTAL;
|
c.fill = GridBagConstraints.HORIZONTAL;
|
||||||
c.anchor = GridBagConstraints.LAST_LINE_END;
|
c.anchor = GridBagConstraints.LAST_LINE_END;
|
||||||
dialog.getContentPane().add(new JLabel("Balance after takeoff:", SwingConstants.RIGHT), c);
|
dialog.getContentPane().add(new JLabel(translate("Balance after takeoff:"), SwingConstants.RIGHT), c);
|
||||||
|
|
||||||
c.gridx = 1;
|
c.gridx = 1;
|
||||||
c.gridy = 2;
|
c.gridy = 2;
|
||||||
|
|
|
@ -32,7 +32,8 @@ public class TransferController {
|
||||||
this.view = new TransferView(account.getBalance() + overdraft);
|
this.view = new TransferView(account.getBalance() + overdraft);
|
||||||
this.transferData = new TransferData(bms);
|
this.transferData = new TransferData(bms);
|
||||||
this.view.getTransfer().addActionListener(e -> transfer());
|
this.view.getTransfer().addActionListener(e -> transfer());
|
||||||
this.view.getCancel().addActionListener(e -> view.dispose());this.view.getValue().getDocument().addDocumentListener(new DocumentListener() {
|
this.view.getCancel().addActionListener(e -> view.dispose());
|
||||||
|
this.view.getValue().getDocument().addDocumentListener(new DocumentListener() {
|
||||||
private void validateInputState() {
|
private void validateInputState() {
|
||||||
var balance = account.getBalance();
|
var balance = account.getBalance();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class TransferView {
|
||||||
c.fill = GridBagConstraints.HORIZONTAL;
|
c.fill = GridBagConstraints.HORIZONTAL;
|
||||||
c.anchor = GridBagConstraints.LAST_LINE_END;
|
c.anchor = GridBagConstraints.LAST_LINE_END;
|
||||||
c.weightx = 0.5;
|
c.weightx = 0.5;
|
||||||
dialog.getContentPane().add(new JLabel("entered value:", JLabel.RIGHT), c);
|
dialog.getContentPane().add(new JLabel(translate("Value to transfer:"), JLabel.RIGHT), c);
|
||||||
|
|
||||||
c.gridx = 1;
|
c.gridx = 1;
|
||||||
c.gridy = 2;
|
c.gridy = 2;
|
||||||
|
@ -106,7 +106,7 @@ public class TransferView {
|
||||||
c.fill = GridBagConstraints.HORIZONTAL;
|
c.fill = GridBagConstraints.HORIZONTAL;
|
||||||
c.anchor = GridBagConstraints.LAST_LINE_END;
|
c.anchor = GridBagConstraints.LAST_LINE_END;
|
||||||
c.weightx = 0.5;
|
c.weightx = 0.5;
|
||||||
dialog.getContentPane().add(new JLabel("Balance after transfer:", JLabel.RIGHT), c);
|
dialog.getContentPane().add(new JLabel(translate("Balance after transfer:"), JLabel.RIGHT), c);
|
||||||
|
|
||||||
c.gridx = 1;
|
c.gridx = 1;
|
||||||
c.gridy = 3;
|
c.gridy = 3;
|
||||||
|
@ -132,6 +132,7 @@ public class TransferView {
|
||||||
|
|
||||||
this.cancel = new JButton(translate("Cancel"));
|
this.cancel = new JButton(translate("Cancel"));
|
||||||
this.transfer = new JButton(translate("Transfer"));
|
this.transfer = new JButton(translate("Transfer"));
|
||||||
|
this.transfer.setEnabled(false);
|
||||||
this.value = new JFormattedTextField(StringDecoder.getNumberFormatter(maxValue));
|
this.value = new JFormattedTextField(StringDecoder.getNumberFormatter(maxValue));
|
||||||
this.iban = new JFormattedTextField();
|
this.iban = new JFormattedTextField();
|
||||||
this.blz = new JFormattedTextField();
|
this.blz = new JFormattedTextField();
|
||||||
|
|
|
@ -1,49 +1,54 @@
|
||||||
en_EN,de_DE,es_ES,fr_FR,zh_Hans
|
en_EN,de_DE,es_ES,fr_FR,zh_Hans
|
||||||
Bank,Bank,Banco,Banque,银行
|
Bank,Bank,Banco,Banque,银行
|
||||||
BLZ,BLZ,BLZ,CODE BANCAIRE,分类代码
|
BLZ,BLZ,BLZ,BLZ,BLZ
|
||||||
PIN,PIN,PIN,CODE PIN,密码
|
PIN,PIN,PIN,PIN,密码
|
||||||
Balance,Kontostand,Saldo,Solde du compte,账户余额
|
Balance,Kontostand,Saldo,Solde,余额
|
||||||
Account type,Kontoart,Tipo de cuenta,Type de compte,账户类型
|
Account type,Kontoart,Tipo de cuenta,Type de compte,账户类型
|
||||||
Interest,Zins,Interés,Intérêt,利息
|
Interest,Zinsen,Interés,Intérêts,利息
|
||||||
Overdraft,Überziehungsbetrag,Importe del descubierto,Montant du découvert,透支金额
|
Overdraft,Überziehungskredit,Descubierto,Découvert,透支
|
||||||
Customer number,Kundennummer,Número de cliente,Numéro de client,客户编号
|
Customer number,Kundennummer,Número de cliente,Numéro de client,客户编号
|
||||||
Name,Name,Nombre,Nom,客户姓名
|
Name,Name,Nombre,Nom du client,姓名
|
||||||
Name,Vorname,Nombre,Prénom,姓名
|
Name,Name,Nombre,Nom et prénom,姓名
|
||||||
Street,Straße,Calle,Rue,街道
|
Street,Straße,Calle,Rue,街道
|
||||||
PLZ,PLZ,PLZ,NPA,邮政编码
|
PLZ,PLZ,PLZ,PLZ,PLZ
|
||||||
City,Ort,Ubicación,Ville,城市
|
City,Ort,Ciudad,Ville,城市
|
||||||
Password,Passwort,contraseña,Mot de passe,密码
|
Password,Kennwort,Contraseña,Mot de passe,密码
|
||||||
Login,Anmelden,Inicio de sesión,S'inscrire,登录
|
Login,Anmeldung,Inicio de sesión,Connexion,登录
|
||||||
CurrentAccount,Girokonto,Cuenta corriente,Compte courant,活期账户
|
CurrentAccount,Girokonto,Cuenta corriente,Compte courant,活期账户
|
||||||
SavingsAccount,Sparkonto,Cuenta de ahorro,Compte d'épargne,储蓄账户
|
SavingsAccount,Sparkonto,CuentaAhorro,Compte d'épargne,储蓄账户
|
||||||
Address,Adresse,Dirección,Adresse,地址
|
Address,Adresse,Dirección,Adresse,地址
|
||||||
Logout,Abmelden,desconectarse,Se désinscrire,退出登录
|
Logout,Abmelden,Cerrar sesión,Déconnexion,注销
|
||||||
Transfer,Überweisen,transferencia,Virement bancaire,转账
|
Transfer,Überweisung,Transferir,Virement,转账
|
||||||
Deposit,Einzahlen,depósito,Dépôt,存款
|
Deposit,Einzahlen,Ingresar,Dépôt,存款
|
||||||
Take off,Abheben,despegar,Retrait,取款
|
Take off,Abheben,Retirar,Enlever,取款
|
||||||
Value,Betrag,Importe,Montant,金额
|
Value,Wert,Valor,Valeur,价值
|
||||||
Cancel,Abbrechen,Cancelar,Annuler,取消
|
Cancel,Abbrechen,Cancelar,Annuler,取消
|
||||||
Load database,Datenbank auswählen,Seleccionar base de datos,Sélectionner la base de données,选择数据库
|
Load database,Datenbank laden,Cargar base de datos,Charger la base de données,加载数据库
|
||||||
Invalid account,Ungültiges Benutzerkonto,Cuenta de usuario no válida,Compte utilisateur non valide,用户账户无效
|
Invalid account,Ungültiges Konto,Cuenta no válida,Compte non valide,无效账户
|
||||||
Could not transfer,Überweiung fehlgeschlagen,Transferencia fallida,Échec du transfert,转账失败
|
Could not transfer,Konnte nicht übertragen werden,No se ha podido transferir,Impossible de transférer,无法转账
|
||||||
Transfer,Überweisen,Transferencia,Transfert,转帐
|
Transfer,Überweisung,Transferencia,Transférer,转账
|
||||||
invalid amount,Ungültiger Betrag,Importe no válido,Montant non valide,金额无效
|
invalid amount,Ungültiger Betrag,Importe no válido,montant non valide,无效金额
|
||||||
currency must not be blank,Betrag darf nicht leer sein,El importe no debe estar vacío,Le montant ne doit pas être vide,金额不能为空
|
currency must not be blank,Währung darf nicht leer sein,La divisa no debe estar en blanco,la devise ne doit pas être vide,货币不得为空
|
||||||
Transfer money,Geld überweisen,Transferencia de dinero,Transférer de l'argent,汇款
|
Transfer money,Geld überweisen,Transferencia de dinero,Transférer de l'argent,转账金额
|
||||||
Could not take off money,Geld konnte nicht abgehoben werden,No se ha podido retirar dinero,L'argent n'a pas pu être retiré,无法取款
|
Could not take off money,Konnte Geld nicht abheben,No se ha podido retirar el dinero,Impossible de retirer de l'argent,无法取款
|
||||||
Takeoff money,Geld abheben,Retirar dinero,Retirer de l'argent,取款
|
Takeoff money,Geld abheben,Retirar dinero,Retirer de l'argent,取款
|
||||||
Takeoff,Abheben,Retirar,Retrait,取款
|
Takeoff,Abheben,Despegue,Décoller,起飞
|
||||||
Currency must not be blank,Betrag darf nicht leer sein,El importe no debe estar vacío,Le montant ne doit pas être vide,金额不能为空
|
Currency must not be blank,Die Währung darf nicht leer sein,La divisa no debe estar en blanco,La monnaie ne doit pas être en blanc,货币不得为空
|
||||||
Cashmachine,Bankautomat,CAJERO,Distributeur automatique de billets,ATM
|
Cashmachine,Geldautomat,Cajero,Cashmachine,提款机
|
||||||
Invalid IBAN,Ungültige IBAN,IBAN no válido,IBAN non valide,无效的IBAN
|
Invalid IBAN,Ungültige IBAN,IBAN no válido,IBAN non valide,IBAN 无效
|
||||||
Faulty login attempt,Ungültiger Authentifizierungsverzuch,Solicitud de autenticación no válida,Demande d'authentification non valide,验证请求无效
|
Faulty login attempt,Fehlerhafter Anmeldeversuch,Intento de acceso erróneo,Tentative de connexion erronée,尝试登录失败
|
||||||
Invalid PIN,Ungültiger PIN,PIN no válido,Code PIN non valide,密码无效
|
Invalid PIN,Ungültige PIN,PIN no válido,PIN invalide,密码无效
|
||||||
Invalid login credentials,Ungültiges Passwort oder Nutzername,Contraseña o nombre de usuario no válidos,Mot de passe ou nom d'utilisateur non valide,密码或用户名无效
|
Invalid login credentials,Ungültige Anmeldedaten,Credenciales de inicio de sesión no válidas,Identifiants de connexion invalides,登录凭证无效
|
||||||
Deposit money,Geld einzahlen,Depositar dinero,Dépôt d'argent,存款金额
|
Deposit money,Geld einzahlen,Depositar dinero,Dépôt d'argent,存款
|
||||||
Interest rate,Zinsbetrag,Importe de los intereses,Montant des intérêts,利息金额
|
Interest rate,Zinssatz,Tipo de interés,Taux d'intérêt,利率
|
||||||
Name/Family-name,Vorname/Name,Nombre y apellidos,Prénom/nom,名/姓
|
Name/Family-name,Name/Familienname,Nombre y apellidos,Nom/Prénom de famille,姓名
|
||||||
Address,Adresse,Dirección,Adresse,地址
|
Address,Anschrift,Dirección,Adresse,地址
|
||||||
Account,Konto,Cuenta,Compte,账户
|
Account,Konto,Cuenta,Compte,账户
|
||||||
Closing JCash,JCash wird geschlossen,JCash está cerrado,JCash est fermé,JCash 已关闭
|
Closing JCash,JCash wird geschlossen,Cerrar JCash,Clôture de JCash,关闭 JCash
|
||||||
you're logged out,Du bist abgemeldet,Ha cerrado la sesión,Tu es déconnecté,您已注销
|
you're logged out,Sie sind abgemeldet,has cerrado sesión,Vous êtes déconnecté,您已退出登录
|
||||||
Comma separated value spreadsheet,Tabelle mit kommagetrennten Werten,Planilla de valores separados por comas,Feuille de calcul à valeurs séparées par des virgules,逗号分隔值电子表格
|
Comma separated value spreadsheet,Kommagetrennte Werte-Tabelle,Hoja de cálculo de valores separados por comas,Tableur de valeurs séparées par des virgules,逗号分隔值电子表格
|
||||||
|
Value to transfer:,Zu übertragender Wert:,Valor a transferir:,Valeur à transférer :,要转账的金额:
|
||||||
|
Balance after transfer:,Kontostand nach Überweisung:,Saldo después de la transferencia:,Solde après transfert :,转账后的余额
|
||||||
|
Balance after takeoff:,Kontostand nach dem Abheben:,Saldo después de retirar:,Solde après décollage :,取出后的余额
|
||||||
|
Value to deposit:,Einzuzahlender Wert:,Valor a ingresar:,Valeur à déposer :,存款价值
|
||||||
|
Value to takeoff:,Auszuhalender Wert:,Valor a despegar:,Valeur à l'enlèvement :,起飞价值
|
||||||
|
|
|
Loading…
Reference in New Issue