gnucash maint: [assistant-stock-transaction] better punctuation for error messages.
Christopher Lam
clam at code.gnucash.org
Sat Sep 24 01:53:42 EDT 2022
Updated via https://github.com/Gnucash/gnucash/commit/ae993503 (commit)
from https://github.com/Gnucash/gnucash/commit/1cac1322 (commit)
commit ae993503ee84934474601c41f1c7e22a4c6823fe
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sat Sep 24 00:19:12 2022 +0800
[assistant-stock-transaction] better punctuation for error messages.
diff --git a/gnucash/gnome/assistant-stock-transaction.cpp b/gnucash/gnome/assistant-stock-transaction.cpp
index 481dc9e6a..d05fb34b8 100644
--- a/gnucash/gnome/assistant-stock-transaction.cpp
+++ b/gnucash/gnome/assistant-stock-transaction.cpp
@@ -696,7 +696,7 @@ check_page (SummaryLineInfo& line, gnc_numeric& debit, gnc_numeric& credit,
line.account = "";
else
{
- add_error (errors, N_("Account for %s is missing"), page);
+ add_error (errors, N_("Account for %s is missing."), page);
line.account = _(missing_str);
}
}
@@ -775,11 +775,11 @@ to ensure proper recording."), new_date_str, last_split_date_str);
line.units = xaccPrintAmount (stock_amount, stock_pinfo);
line.units_in_red = negative_in_red && gnc_numeric_negative_p (stock_amount);
if (gnc_numeric_check (ratio) || !gnc_numeric_positive_p (ratio))
- add_error_str (errors, N_("Invalid stock new balance"));
+ add_error_str (errors, N_("Invalid stock new balance."));
else if (gnc_numeric_negative_p (delta) && !credit_side)
- add_error_str (errors, N_("New balance must be higher than old balance"));
+ add_error_str (errors, N_("New balance must be higher than old balance."));
else if (gnc_numeric_positive_p (delta) && credit_side)
- add_error_str (errors, N_("New balance must be lower than old balance"));
+ add_error_str (errors, N_("New balance must be lower than old balance."));
}
else
{
@@ -788,7 +788,7 @@ to ensure proper recording."), new_date_str, last_split_date_str);
auto stock_pinfo = gnc_commodity_print_info
(xaccAccountGetCommodity (info->acct), true);
if (!gnc_numeric_positive_p (stock_amount))
- add_error_str (errors, N_("Stock amount must be positive"));
+ add_error_str (errors, N_("Stock amount must be positive."));
if (info->txn_type->stock_amount & FieldMask::ENABLED_CREDIT)
stock_amount = gnc_numeric_neg (stock_amount);
line.units = xaccPrintAmount (stock_amount, stock_pinfo);
@@ -796,10 +796,10 @@ to ensure proper recording."), new_date_str, last_split_date_str);
auto new_bal = gnc_numeric_add_fixed (info->balance_at_date, stock_amount);
if (gnc_numeric_positive_p (info->balance_at_date) &&
gnc_numeric_negative_p (new_bal))
- add_error_str (errors, N_("Cannot sell more units than owned"));
+ add_error_str (errors, N_("Cannot sell more units than owned."));
else if (gnc_numeric_negative_p (info->balance_at_date) &&
gnc_numeric_positive_p (new_bal))
- add_error_str (errors, N_("Cannot cover buy more units than owed"));
+ add_error_str (errors, N_("Cannot cover buy more units than owed."));
}
add_to_summary_table (list, line);
Summary of changes:
gnucash/gnome/assistant-stock-transaction.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
More information about the gnucash-changes
mailing list