gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue Jul 7 15:33:58 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/0e0c27f8 (commit)
via https://github.com/Gnucash/gnucash/commit/1935cdc6 (commit)
from https://github.com/Gnucash/gnucash/commit/b0b23895 (commit)
commit 0e0c27f80f0d4ba4d82c8009e0716a1649cb1c43
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Jul 7 12:30:09 2020 -0700
Bug 797850 - Account register credit/debit column headings untranslated
Plus make the former globals static.
diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp
index ed995fc35..00ba69a57 100644
--- a/libgnucash/engine/Account.cpp
+++ b/libgnucash/engine/Account.cpp
@@ -133,44 +133,44 @@ enum
((AccountPrivate*)g_type_instance_get_private((GTypeInstance*)o, GNC_TYPE_ACCOUNT))
/* This map contains a set of strings representing the different column types. */
-std::map<GNCAccountType, const char*> gnc_acct_debit_strs = {
- { ACCT_TYPE_NONE, _("Funds In") },
- { ACCT_TYPE_BANK, _("Deposit") },
- { ACCT_TYPE_CASH, _("Receive") },
- { ACCT_TYPE_CREDIT, _("Payment") },
- { ACCT_TYPE_ASSET, _("Increase") },
- { ACCT_TYPE_LIABILITY, _("Decrease") },
- { ACCT_TYPE_STOCK, _("Buy") },
- { ACCT_TYPE_MUTUAL, _("Buy") },
- { ACCT_TYPE_CURRENCY, _("Buy") },
- { ACCT_TYPE_INCOME, _("Charge") },
- { ACCT_TYPE_EXPENSE, _("Expense") },
- { ACCT_TYPE_PAYABLE, _("Payment") },
- { ACCT_TYPE_RECEIVABLE, _("Invoice") },
- { ACCT_TYPE_TRADING, _("Decrease") },
- { ACCT_TYPE_EQUITY, _("Decrease") },
+static const std::map<GNCAccountType, const char*> gnc_acct_debit_strs = {
+ { ACCT_TYPE_NONE, N_("Funds In") },
+ { ACCT_TYPE_BANK, N_("Deposit") },
+ { ACCT_TYPE_CASH, N_("Receive") },
+ { ACCT_TYPE_CREDIT, N_("Payment") },
+ { ACCT_TYPE_ASSET, N_("Increase") },
+ { ACCT_TYPE_LIABILITY, N_("Decrease") },
+ { ACCT_TYPE_STOCK, N_("Buy") },
+ { ACCT_TYPE_MUTUAL, N_("Buy") },
+ { ACCT_TYPE_CURRENCY, N_("Buy") },
+ { ACCT_TYPE_INCOME, N_("Charge") },
+ { ACCT_TYPE_EXPENSE, N_("Expense") },
+ { ACCT_TYPE_PAYABLE, N_("Payment") },
+ { ACCT_TYPE_RECEIVABLE, N_("Invoice") },
+ { ACCT_TYPE_TRADING, N_("Decrease") },
+ { ACCT_TYPE_EQUITY, N_("Decrease") },
};
-const char* dflt_acct_debit_str = _("Debit");
+static const char* dflt_acct_debit_str = N_("Debit");
/* This map contains a set of strings representing the different column types. */
-std::map<GNCAccountType, const char*> gnc_acct_credit_strs = {
- { ACCT_TYPE_NONE, _("Funds Out") },
- { ACCT_TYPE_BANK, _("Withdrawal") },
- { ACCT_TYPE_CASH, _("Spend") },
- { ACCT_TYPE_CREDIT, _("Charge") },
- { ACCT_TYPE_ASSET, _("Decrease") },
- { ACCT_TYPE_LIABILITY, _("Increase") },
- { ACCT_TYPE_STOCK, _("Sell") },
- { ACCT_TYPE_MUTUAL, _("Sell") },
- { ACCT_TYPE_CURRENCY, _("Sell") },
- { ACCT_TYPE_INCOME, _("Income") },
- { ACCT_TYPE_EXPENSE, _("Rebate") },
- { ACCT_TYPE_PAYABLE, _("Bill") },
- { ACCT_TYPE_RECEIVABLE, _("Payment") },
- { ACCT_TYPE_TRADING, _("Increase") },
- { ACCT_TYPE_EQUITY, _("Increase") },
+static const std::map<GNCAccountType, const char*> gnc_acct_credit_strs = {
+ { ACCT_TYPE_NONE, N_("Funds Out") },
+ { ACCT_TYPE_BANK, N_("Withdrawal") },
+ { ACCT_TYPE_CASH, N_("Spend") },
+ { ACCT_TYPE_CREDIT, N_("Charge") },
+ { ACCT_TYPE_ASSET, N_("Decrease") },
+ { ACCT_TYPE_LIABILITY, N_("Increase") },
+ { ACCT_TYPE_STOCK, N_("Sell") },
+ { ACCT_TYPE_MUTUAL, N_("Sell") },
+ { ACCT_TYPE_CURRENCY, N_("Sell") },
+ { ACCT_TYPE_INCOME, N_("Income") },
+ { ACCT_TYPE_EXPENSE, N_("Rebate") },
+ { ACCT_TYPE_PAYABLE, N_("Bill") },
+ { ACCT_TYPE_RECEIVABLE, N_("Payment") },
+ { ACCT_TYPE_TRADING, N_("Increase") },
+ { ACCT_TYPE_EQUITY, N_("Increase") },
};
-const char* dflt_acct_credit_str = _("Credit");
+static const char* dflt_acct_credit_str = N_("Credit");
/********************************************************************\
* Because I can't use C++ for this project, doesn't mean that I *
@@ -4039,9 +4039,9 @@ const char *gnc_account_get_debit_string (GNCAccountType acct_type)
auto result = gnc_acct_debit_strs.find(acct_type);
if (result != gnc_acct_debit_strs.end())
- return result->second;
+ return _(result->second);
else
- return dflt_acct_debit_str;
+ return _(dflt_acct_debit_str);
}
const char *gnc_account_get_credit_string (GNCAccountType acct_type)
@@ -4051,9 +4051,9 @@ const char *gnc_account_get_credit_string (GNCAccountType acct_type)
auto result = gnc_acct_credit_strs.find(acct_type);
if (result != gnc_acct_credit_strs.end())
- return result->second;
+ return _(result->second);
else
- return dflt_acct_credit_str;
+ return _(dflt_acct_credit_str);
}
/********************************************************************\
commit 1935cdc6812cabe0cc9f5af38b5a4b358aea62b3
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Jul 7 12:30:02 2020 -0700
Add python/deprecation.py to POTFILES.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9dfab16e4..d4b98009e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,6 +13,7 @@ bindings/guile/gnc-module.scm
bindings/guile/gnc-numeric.scm
bindings/guile/utilities.scm
bindings/python/app_utils.py
+bindings/python/deprecation.py
bindings/python/example_scripts/account_analysis.py
bindings/python/example_scripts/change_tax_code.py
bindings/python/example_scripts/gnc_convenience.py
Summary of changes:
libgnucash/engine/Account.cpp | 76 +++++++++++++++++++++----------------------
po/POTFILES.in | 1 +
2 files changed, 39 insertions(+), 38 deletions(-)
More information about the gnucash-changes
mailing list