Skip to content

Commit

Permalink
Add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
dospuntos authored and humdingerb committed Jun 20, 2024
1 parent 9467e39 commit 24a2279
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
11 changes: 8 additions & 3 deletions locales/en.catkeys
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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!
Expand Down Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/Import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "TextFile.h"
#include "Transaction.h"
#include "TransactionData.h"
#include <Catalog.h>
#include <File.h>
#include <TypeConstants.h>
#include <stdio.h>
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -167,8 +168,7 @@ ReadCategories(BObjectList<Category>& list, TextFile& file)
catdata.RemoveAll("\r");
}
delete cat;

STRACE(("Added %ld categories\n", list.CountItems()));
//STRACE(("Added %i categories\n", list.CountItems()));
return catdata;
}

Expand Down Expand Up @@ -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("<No payee entered>"));
}

if (data.CountCategories() < 1)
data.SetCategory("Uncategorized");
data.SetCategory(B_TRANSLATE("<Uncategorized>"));


gDatabase.AddTransaction(data);
Expand Down

0 comments on commit 24a2279

Please sign in to comment.