diff --git a/locales/en.catkeys b/locales/en.catkeys index 195494c..ccab4a8 100644 --- a/locales/en.catkeys +++ b/locales/en.catkeys @@ -1,6 +1,7 @@ -1 English application/x-vnd.wgp-CapitalBe 2441433350 +1 English application/x-vnd.wgp-CapitalBe 3892464343 Year ReportWindow Year None ReportWindow None +Credit Card Account Import Credit Card Account Export to QIF file… MainWindow Export to QIF file… Reports ReportWindow Reports Monthly ScheduleAddWindow Monthly @@ -85,17 +86,20 @@ There may be a typo or the wrong kind of currency symbol for this account. TextI Repeat: ScheduleAddWindow Repeat: Appears before amount PrefWindow Appears before amount Unreconciled total: %s ReconcileWindow Unreconciled total: %s +Uncategorized Import Uncategorized Couldn't Quick balance ReconcileWindow Couldn't Quick balance There may be a typo or the wrong kind of currency symbol for this account. ReconcileWindow There may be a typo or the wrong kind of currency symbol for this account. Really delete account? MainWindow Really delete account? DEP ReconcileWindow DEP -Quick balance ReconcileWindow Quick balance Remove ScheduleListWindow Remove +Cash Account Import Cash Account +Quick balance ReconcileWindow Quick balance This happens when the kind of file is not supported, when the file's data is damaged, or when you feed it a recipe for quiche. MainWindow This happens when the kind of file is not supported, when the file's data is damaged, or when you feed it a recipe for quiche. -Month ReportWindow Month Payments ScheduleListWindow Payments +Month ReportWindow Month No memo TransactionEdit No memo Closed Account Closed +[No payee entered] Import [No payee entered] Delete MainWindow Delete From account: TransferWindow From account: Quick balance successful! ReconcileWindow Quick balance successful! @@ -188,6 +192,7 @@ Add CategoryWindow Add Quit MainWindow Quit Lowest BudgetWindow Lowest Previous MainWindow Previous +Bank Account Import Bank Account Transaction type is missing CheckView Transaction type is missing Accounts RegisterView Accounts Amount ScheduleAddWindow Amount diff --git a/src/Import.cpp b/src/Import.cpp index c8a3875..c820878 100644 --- a/src/Import.cpp +++ b/src/Import.cpp @@ -9,6 +9,7 @@ #include "TextFile.h" #include "Transaction.h" #include "TransactionData.h" +#include #include #include #include @@ -22,6 +23,9 @@ #define STRACE(x) /* */ #endif +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "Import" + bool debuggerflag = false; // These functions are called by the global database object to remove all the @@ -70,24 +74,21 @@ ImportQIF(const entry_ref& ref) } else if (string.FindFirst("!Type:Bank") != B_ERROR) { STRACE(("Bank Account\n")); accountindex++; - accountname = "Bank Account "; - accountname << accountindex; + accountname.SetToFormat("<%s %i>", B_TRANSLATE("Bank account"), accountindex); currentaccount = gDatabase.AddAccount(accountname.String(), ACCOUNT_BANK, "Open"); string = ReadTransactions(currentaccount, file); importSuccess = true; } else if (string.FindFirst("!Type:Cash") != B_ERROR) { accountindex++; - accountname = "Cash Account "; - accountname << accountindex; + accountname.SetToFormat("<%s %i>", B_TRANSLATE("Cash account"), accountindex); currentaccount = gDatabase.AddAccount(accountname.String(), ACCOUNT_CASH, "Open"); string = ReadTransactions(currentaccount, file); importSuccess = true; } else if (string.FindFirst("!Type:CCard") != B_ERROR) { accountindex++; - accountname = "Credit Card Account "; - accountname << accountindex; + accountname.SetToFormat("<%s %i>", B_TRANSLATE("Credit card account"), accountindex); currentaccount = gDatabase.AddAccount(accountname.String(), ACCOUNT_CREDIT, "Open"); string = ReadTransactions(currentaccount, file); @@ -167,8 +168,7 @@ ReadCategories(BObjectList& list, TextFile& file) catdata.RemoveAll("\r"); } delete cat; - - STRACE(("Added %ld categories\n", list.CountItems())); + //STRACE(("Added %i categories\n", list.CountItems())); return catdata; } @@ -321,11 +321,11 @@ ReadTransactions(Account* account, TextFile& file) if (data.Amount().AsLong() == 0) break; else - data.SetPayee("[No Payee Entered]"); + data.SetPayee(B_TRANSLATE("")); } if (data.CountCategories() < 1) - data.SetCategory("Uncategorized"); + data.SetCategory(B_TRANSLATE("")); gDatabase.AddTransaction(data);