Skip to content

Commit c9f8137

Browse files
committed
Merge branch 'maint'
2 parents c18e459 + f18fd60 commit c9f8137

30 files changed

+279
-222
lines changed

gnucash/gnome-utils/dialog-commodity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ gnc_ui_select_commodity_modal_full(gnc_commodity * orig_sel,
168168
fullname ? fullname : "",
169169
/* Translators: Replace here and later CUSIP by the name of your local
170170
National Securities Identifying Number
171-
like gb:SEDOL, de:WKN, ch:Valorennummer, fr:SICOVAM
172-
See http://en.wikipedia.org/wiki/ISIN and
171+
like gb:SEDOL, de:WKN, ch:Valorennummer, fr:SICOVAM ...
172+
See https://en.wikipedia.org/wiki/ISIN and
173173
https://en.wikipedia.org/wiki/National_numbering_agency for hints. */
174174
cusip ? _("\nExchange code (ISIN, CUSIP or similar): ") : "",
175175
cusip ? cusip : "",

gnucash/gnome/assistant-stock-transaction.cpp

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ static void
602602
add_error (StringVec& errors, const char* format_str, const char* arg)
603603
{
604604
gchar *buf = g_strdup_printf (_(format_str),
605-
g_dpgettext2 (nullptr, "Stock Assistant: Page name", arg));
605+
g_strcmp0("Cash", arg) ?
606+
_(arg) :
607+
g_dpgettext2 (nullptr, "Stock Assistant", arg));
606608
errors.emplace_back (buf);
607609
g_free (buf);
608610
}
@@ -757,7 +759,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
757759
else
758760
check_page (line, debit, credit, info->txn_type->stock_value, info->acct,
759761
info->stock_memo_edit, info->stock_value_edit, info->currency,
760-
NC_ ("Stock Assistant: Page name", "stock value"), errors);
762+
// Translators: Designates the page in the Stock Assistant for entering
763+
// the currency value of a non-currency asset.
764+
N_ ("Stock Value"), errors);
761765

762766

763767
if (info->txn_type->stock_amount == FieldMask::DISABLED)
@@ -827,7 +831,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
827831
check_page (line, debit, credit, info->txn_type->cash_value,
828832
gas_account (info->cash_account), info->cash_memo_edit,
829833
info->cash_value, info->currency,
830-
NC_ ("Stock Assistant: Page name", "cash"), errors);
834+
// Translators: Designates a page in the stock assistant or inserts the value
835+
// into the non-currency asset split of an investment transaction.
836+
NC_ ("Stock Assistant", "Cash"), errors);
831837
add_to_summary_table (list, line);
832838
}
833839

@@ -838,7 +844,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
838844
check_page (line, debit, credit, info->txn_type->fees_value,
839845
capitalize_fees ? info->acct : gas_account (info->fees_account),
840846
info->fees_memo_edit, info->fees_value, info->currency,
841-
NC_ ("Stock Assistant: Page name", "fees"), errors);
847+
// Translators: Designates a page in the stock assistant or inserts the value
848+
// into the fees split of an investment transaction.
849+
N_ ("Fees"), errors);
842850
if (!line.value_is_zero)
843851
add_to_summary_table (list, line);
844852
}
@@ -848,7 +856,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
848856
check_page (line, debit, credit, info->txn_type->dividend_value,
849857
gas_account (info->dividend_account),
850858
info->dividend_memo_edit, info->dividend_value, info->currency,
851-
NC_ ("Stock Assistant: Page name", "dividend"), errors);
859+
// Translators: Designates a page in the stock assistant or inserts the value
860+
// into the income split of an investment dividend transaction.
861+
N_ ("Dividend"), errors);
852862
add_to_summary_table (list, line);
853863
}
854864

@@ -861,14 +871,16 @@ to ensure proper recording."), new_date_str, last_split_date_str);
861871
check_page (line, debit, credit, info->txn_type->capgains_value,
862872
gas_account (info->capgains_account),
863873
info->capgains_memo_edit, info->capgains_value, info->currency,
864-
NC_ ("Stock Assistant: Page name", "capital gains"), errors);
874+
// Translators: Designates a page in the stock assistant or inserts the value
875+
// into the capital gain/loss income split of an investment transaction.
876+
N_ ("Capital Gain"), errors);
865877
add_to_summary_table (list, line);
866878

867879
check_page (line, debit, credit,
868880
info->txn_type->capgains_value ^ (FieldMask::ENABLED_CREDIT | FieldMask::ENABLED_DEBIT),
869881
info->acct, info->capgains_memo_edit, info->capgains_value,
870882
info->currency,
871-
NC_ ("Stock Assistant: Page name", "capital gains"), errors);
883+
N_ ("Capital Gain"), errors);
872884
add_to_summary_table (list, line);
873885
}
874886

@@ -1024,8 +1036,10 @@ create_split (Transaction *trans, const gchar *action, Account *account,
10241036
gnc_num_dbg_to_string (amount_numeric),
10251037
gnc_num_dbg_to_string (xaccSplitGetValue (split)),
10261038
gnc_num_dbg_to_string (xaccSplitGetAmount (split)));
1027-
gnc_set_num_action (nullptr, split,
1028-
nullptr, g_dpgettext2 (nullptr, "Stock Assistant: Action field", action));
1039+
auto action_str{ g_strcmp0(action, "Cash") ?
1040+
_(action) :
1041+
g_dpgettext2 (nullptr, "Stock Assistant: Action field", action)};
1042+
gnc_set_num_action (nullptr, split, nullptr, action_str);
10291043
}
10301044

10311045
static void
@@ -1094,7 +1108,9 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
10941108
stock_value = gnc_numeric_neg (stock_value);
10951109
}
10961110

1097-
create_split (trans, NC_ ("Stock Assistant: Action field", "Stock"),
1111+
// Translators: Inserts the value into action field of the non-currency asset split of
1112+
// an investment transaction.
1113+
create_split (trans, N_ ("Stock"),
10981114
info->acct, account_commits, info->stock_memo_edit,
10991115
stock_amount, stock_value);
11001116

@@ -1104,7 +1120,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
11041120
if (info->txn_type->cash_value & FieldMask::ENABLED_CREDIT)
11051121
cash = gnc_numeric_neg (cash);
11061122

1107-
create_split (trans, NC_ ("Stock Assistant: Action field", "Cash"),
1123+
create_split (trans, NC_ ("Stock Assistant:", "Cash"),
11081124
gas_account (info->cash_account), account_commits,
11091125
info->cash_memo_edit, cash, cash);
11101126
}
@@ -1117,7 +1133,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
11171133
auto capitalize = gtk_toggle_button_get_active
11181134
(GTK_TOGGLE_BUTTON (info->capitalize_fees_checkbox));
11191135

1120-
create_split (trans, NC_ ("Stock Assistant: Action field", "Fees"),
1136+
create_split (trans, N_ ("Fees"),
11211137
capitalize ? info->acct : gas_account (info->fees_account),
11221138
account_commits, info->fees_memo_edit,
11231139
capitalize ? gnc_numeric_zero () : fees, fees);
@@ -1130,20 +1146,20 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
11301146
if (info->txn_type->dividend_value & FieldMask::ENABLED_CREDIT)
11311147
dividend = gnc_numeric_neg (dividend);
11321148

1133-
create_split (trans, NC_ ("Stock Assistant: Action field", "Dividend"),
1149+
create_split (trans, N_ ("Dividend"),
11341150
gas_account (info->dividend_account), account_commits,
11351151
info->dividend_memo_edit, dividend, dividend);
11361152
}
11371153

11381154
if (info->txn_type->capgains_value != FieldMask::DISABLED)
11391155
{
11401156
auto capgains = gae_amount (info->capgains_value);
1141-
create_split (trans, NC_ ("Stock Assistant: Action field", "Capital Gain"),
1157+
create_split (trans, N_ ("Capital Gain"),
11421158
info->acct, account_commits, info->capgains_memo_edit,
11431159
gnc_numeric_zero (), capgains);
11441160

11451161
capgains = gnc_numeric_neg (capgains);
1146-
create_split (trans, NC_ ("Stock Assistant: Action field", "Capital Gain"),
1162+
create_split (trans, N_ ("Capital Gain"),
11471163
gas_account (info->capgains_account), account_commits,
11481164
info->capgains_memo_edit, capgains, capgains);
11491165
}

gnucash/gnome/dialog-doclink.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,16 @@ setup_location_dialog (GtkBuilder *builder, GtkWidget *button_loc, const gchar *
238238
// update label and set entry text if required
239239
if (uri)
240240
{
241-
gtk_label_set_text (location_label, _("Amend URL:"));
241+
gtk_label_set_text (location_label, _("Amend the URL"));
242242
gtk_entry_set_text (entry, uri);
243243
}
244244
else
245-
gtk_label_set_text (location_label, _("Enter URL like http://www.gnucash.org:"));
245+
{
246+
gchar *enter_uri = g_strdup_printf (_("Enter an URL like \"%s\""),
247+
PACKAGE_URL);
248+
gtk_label_set_text (location_label, enter_uri);
249+
g_free (enter_uri);
250+
}
246251
}
247252

248253
static void
@@ -256,7 +261,7 @@ setup_file_dialog (GtkBuilder *builder, const gchar *path_head, const gchar *uri
256261
GtkWidget *existing_hbox = GTK_WIDGET(gtk_builder_get_object (builder, "existing_hbox"));
257262
GtkWidget *image = gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_SMALL_TOOLBAR);
258263
gchar *use_uri = gnc_doclink_get_use_uri (path_head, uri, scheme);
259-
gchar *uri_label = g_strdup_printf ("%s '%s'", _("Existing Document Link is"), display_uri);
264+
gchar *uri_label = g_strdup_printf ("%s \"%s\"", _("Existing Document Link is"), display_uri);
260265
GtkWidget *label = gtk_label_new (uri_label);
261266

262267
if (g_file_test (display_uri, G_FILE_TEST_EXISTS))

gnucash/gnome/dialog-payment.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,8 @@ static Split *select_payment_split (GtkWindow *parent, Transaction *txn)
16241624
GList *node;
16251625
GtkWidget *first_rb = NULL;
16261626
int answer = GTK_BUTTONS_OK;
1627-
const char *message = _("While this transaction has multiple splits that can be considered\nas 'the payment split', GnuCash only knows how to handle one.\n"
1627+
const char *message = _("While this transaction has multiple splits that can be considered\n"
1628+
"as 'the payment split', GnuCash only knows how to handle one.\n"
16281629
"Please select one, the others will be discarded.\n\n");
16291630
GtkDialog *dialog = GTK_DIALOG(
16301631
gtk_dialog_new_with_buttons (_("Warning"),

0 commit comments

Comments
 (0)