diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/settings/BankAccountSettingsDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/settings/BankAccountSettingsDialog.kt
index 94332f01..03876aa0 100644
--- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/settings/BankAccountSettingsDialog.kt
+++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/settings/BankAccountSettingsDialog.kt
@@ -6,10 +6,10 @@ import android.view.*
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.dialog_bank_account_settings.*
import kotlinx.android.synthetic.main.dialog_bank_account_settings.view.*
-import kotlinx.android.synthetic.main.dialog_bank_settings.view.toolbar
import net.dankito.banking.ui.android.R
import net.dankito.banking.ui.android.adapter.CheckableValueAdapterItem
import net.dankito.banking.ui.android.adapter.FastAdapterRecyclerView
+import net.dankito.banking.ui.model.BankAccountType
import net.dankito.banking.ui.model.TypedBankAccount
@@ -55,7 +55,7 @@ open class BankAccountSettingsDialog : SettingsDialogBase() {
lvlAccountIdentifier.value = account.identifier
lvlSubAccountNumber.setValueAndVisibilityIfValueIsSet(account.subAccountNumber)
lvlIban.setValueAndVisibilityIfValueIsSet(account.iban)
- lvlAccountType.value = account.type.toString() // TODO: translate
+ lvlAccountType.value = getString(getBankAccountTypeResId(account.type))
val context = view.context
val accountFeaturesItems = listOf(
@@ -66,8 +66,23 @@ open class BankAccountSettingsDialog : SettingsDialogBase() {
)
FastAdapterRecyclerView(view.rcyAccountFeatures, accountFeaturesItems)
}
-
-
+
+ protected open fun getBankAccountTypeResId(type: BankAccountType): Int {
+ return when (type) {
+ BankAccountType.CheckingAccount -> R.string.checking_account
+ BankAccountType.SavingsAccount -> R.string.savings_account
+ BankAccountType.FixedTermDepositAccount -> R.string.fixed_term_deposit_account
+ BankAccountType.SecuritiesAccount -> R.string.securities_account
+ BankAccountType.LoanAccount -> R.string.loan_account
+ BankAccountType.CreditCardAccount -> R.string.credit_card_account
+ BankAccountType.FundDeposit -> R.string.fund_deposit
+ BankAccountType.BuildingLoanContract -> R.string.building_loan_contract
+ BankAccountType.InsuranceContract -> R.string.insurance_contract
+ else -> R.string.other
+ }
+ }
+
+
protected open fun shareAccountData() {
val accountData = StringBuilder(account.accountHolderName + "\n" + account.bank.bankName)
diff --git a/ui/BankingAndroidApp/src/main/res/values-de/strings.xml b/ui/BankingAndroidApp/src/main/res/values-de/strings.xml
index 90291c60..45649184 100644
--- a/ui/BankingAndroidApp/src/main/res/values-de/strings.xml
+++ b/ui/BankingAndroidApp/src/main/res/values-de/strings.xml
@@ -29,6 +29,17 @@
Kontoinhaber
FinTS Server
+ Girokonto
+ Sparkonto
+ Festgeldkonto
+ Wertpapierdepot
+ Darlehenskonto
+ Kreditkartenkonto
+ Fondsdepot
+ Bausparvertrag
+ Versicherungsvertrag
+ Sonstige
+
Geben Sie Ihr Passwort ein
Passwort eingeben
diff --git a/ui/BankingAndroidApp/src/main/res/values/strings.xml b/ui/BankingAndroidApp/src/main/res/values/strings.xml
index 6c22939f..1e0c6342 100644
--- a/ui/BankingAndroidApp/src/main/res/values/strings.xml
+++ b/ui/BankingAndroidApp/src/main/res/values/strings.xml
@@ -29,6 +29,17 @@
Customer name
FinTS server
+ Checking account
+ Savings account
+ Fixed term deposit account
+ Securities account
+ Loan account
+ Credit card account
+ Fund deposit
+ Building loan ontract
+ Insurance Contract
+ Other
+
Please enter your password
Enter your password
diff --git a/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings b/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings
index ebfed513..0f0c5969 100644
--- a/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings
+++ b/ui/BankingiOSApp/BankingiOSApp/Base.lproj/Localizable.strings
@@ -31,6 +31,17 @@
"Settings" = "Settings";
+"Checking account" = "Checking account";
+"Savings account" = "Savings account";
+"Fixed term deposit account" = "Fixed term deposit account";
+"Securities account" = "Securities account";
+"Loan account" = "Loan account";
+"Credit card account" = "Credit card account";
+"Fund deposit" = "Fund deposit";
+"Building loan contract" = "Building loan contract";
+"Insurance contract" = "Insurance Contract";
+"Other" = "Other";
+
/* LoginDialog */
diff --git a/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings b/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings
index 4aa84b96..083ee64f 100644
--- a/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings
+++ b/ui/BankingiOSApp/BankingiOSApp/de.lproj/Localizable.strings
@@ -31,6 +31,17 @@
"Settings" = "Einstellungen";
+"Checking account" = "Girokonto";
+"Savings account" = "Sparkonto";
+"Fixed term deposit account" = "Festgeldkonto";
+"Securities account" = "Wertpapierdepot";
+"Loan account" = "Darlehenskonto";
+"Credit card account" = "Kreditkartenkonto";
+"Fund deposit" = "Fondsdepot";
+"Building loan contract" = "Bausparvertrag";
+"Insurance contract" = "Versicherungsvertrag";
+"Other" = "Sonstige";
+
/* LoginDialog */
diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift
index 1901359d..b25848d2 100644
--- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift
+++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift
@@ -60,7 +60,7 @@ struct BankAccountSettingsDialog: View {
LabelledValue("IBAN", iban)
}
- LabelledValue("Bank account type", account.type.name) // TODO: senseful?
+ LabelledValue("Bank account type", getBankAccountKey(account.type).localize())
}
Section(header: Text("Supports")) {
@@ -92,6 +92,31 @@ struct BankAccountSettingsDialog: View {
.padding(.bottom, 4)
}
+ private func getBankAccountKey(_ type: BankAccountType) -> String {
+ switch type {
+ case .checkingaccount:
+ return "Checking account"
+ case .savingsaccount:
+ return "Savings account"
+ case .fixedtermdepositaccount:
+ return "Fixed term deposit account"
+ case .securitiesaccount:
+ return "Securities account"
+ case .loanaccount:
+ return "Loan account"
+ case .creditcardaccount:
+ return "Credit card account"
+ case .funddeposit:
+ return "Fund deposit"
+ case .buildingloancontract:
+ return "Building loan contract"
+ case .insurancecontract:
+ return "Insurance contract"
+ default:
+ return "Other"
+ }
+ }
+
private func shareAccountData() {
var accountData = account.accountHolderName + "\n" + account.bank.bankName