Skip to content

Commit

Permalink
Merge Frank Ellenberger's I18N branch into maint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Mar 3, 2023
2 parents 855e455 + 931b102 commit c398983
Show file tree
Hide file tree
Showing 22 changed files with 138 additions and 124 deletions.
2 changes: 1 addition & 1 deletion gnucash/gnome-utils/dialog-commodity.c
Expand Up @@ -169,7 +169,7 @@ gnc_ui_select_commodity_modal_full(gnc_commodity * orig_sel,
/* Translators: Replace here and later CUSIP by the name of your local
National Securities Identifying Number
like gb:SEDOL, de:WKN, ch:Valorennummer, fr:SICOVAM ...
See http://en.wikipedia.org/wiki/ISIN and
See https://en.wikipedia.org/wiki/ISIN and
https://en.wikipedia.org/wiki/National_numbering_agency for hints. */
cusip ? _("\nExchange code (ISIN, CUSIP or similar): ") : "",
cusip ? cusip : "",
Expand Down
2 changes: 1 addition & 1 deletion gnucash/gnome-utils/gnc-main-window.c
Expand Up @@ -297,7 +297,7 @@ static GtkActionEntry gnc_menu_actions [] =
# define GTK_STOCK_PAGE_SETUP NULL
#endif
{
"FilePageSetupAction", "document-page-setup", N_("Pa_ge Setup..."), "<primary><shift>p",
"FilePageSetupAction", "document-page-setup", N_("Pa_ge Setup"), "<primary><shift>p",
N_("Specify the page size and orientation for printing"),
G_CALLBACK (gnc_main_window_cmd_page_setup)
},
Expand Down
46 changes: 31 additions & 15 deletions gnucash/gnome/assistant-stock-transaction.cpp
Expand Up @@ -601,7 +601,9 @@ static void
add_error (StringVec& errors, const char* format_str, const char* arg)
{
gchar *buf = g_strdup_printf (_(format_str),
g_dpgettext2 (nullptr, "Stock Assistant: Page name", arg));
g_strcmp0("Cash", arg) ?
_(arg) :
g_dpgettext2 (nullptr, "Stock Assistant", arg));
errors.emplace_back (buf);
g_free (buf);
}
Expand Down Expand Up @@ -756,7 +758,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
else
check_page (line, debit, credit, info->txn_type->stock_value, info->acct,
info->stock_memo_edit, info->stock_value_edit, info->currency,
NC_ ("Stock Assistant: Page name", "stock value"), errors);
// Translators: Designates the page in the Stock Assistant for entering
// the currency value of a non-currency asset.
N_ ("Stock Value"), errors);


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

Expand All @@ -837,7 +843,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
check_page (line, debit, credit, info->txn_type->fees_value,
capitalize_fees ? info->acct : gas_account (info->fees_account),
info->fees_memo_edit, info->fees_value, info->currency,
NC_ ("Stock Assistant: Page name", "fees"), errors);
// Translators: Designates a page in the stock assistant or inserts the value
// into the fees split of an investment transaction.
N_ ("Fees"), errors);
if (!line.value_is_zero)
add_to_summary_table (list, line);
}
Expand All @@ -847,7 +855,9 @@ to ensure proper recording."), new_date_str, last_split_date_str);
check_page (line, debit, credit, info->txn_type->dividend_value,
gas_account (info->dividend_account),
info->dividend_memo_edit, info->dividend_value, info->currency,
NC_ ("Stock Assistant: Page name", "dividend"), errors);
// Translators: Designates a page in the stock assistant or inserts the value
// into the income split of an investment dividend transaction.
N_ ("Dividend"), errors);
add_to_summary_table (list, line);
}

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

check_page (line, debit, credit,
info->txn_type->capgains_value ^ (FieldMask::ENABLED_CREDIT | FieldMask::ENABLED_DEBIT),
info->acct, info->capgains_memo_edit, info->capgains_value,
info->currency,
NC_ ("Stock Assistant: Page name", "capital gains"), errors);
N_ ("Capital Gain"), errors);
add_to_summary_table (list, line);
}

Expand Down Expand Up @@ -1023,8 +1035,10 @@ create_split (Transaction *trans, const gchar *action, Account *account,
gnc_num_dbg_to_string (amount_numeric),
gnc_num_dbg_to_string (xaccSplitGetValue (split)),
gnc_num_dbg_to_string (xaccSplitGetAmount (split)));
gnc_set_num_action (nullptr, split,
nullptr, g_dpgettext2 (nullptr, "Stock Assistant: Action field", action));
auto action_str{ g_strcmp0(action, "Cash") ?
_(action) :
g_dpgettext2 (nullptr, "Stock Assistant: Action field", action)};
gnc_set_num_action (nullptr, split, nullptr, action_str);
}

static void
Expand Down Expand Up @@ -1093,7 +1107,9 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
stock_value = gnc_numeric_neg (stock_value);
}

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

Expand All @@ -1103,7 +1119,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
if (info->txn_type->cash_value & FieldMask::ENABLED_CREDIT)
cash = gnc_numeric_neg (cash);

create_split (trans, NC_ ("Stock Assistant: Action field", "Cash"),
create_split (trans, NC_ ("Stock Assistant:", "Cash"),
gas_account (info->cash_account), account_commits,
info->cash_memo_edit, cash, cash);
}
Expand All @@ -1116,7 +1132,7 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
auto capitalize = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (info->capitalize_fees_checkbox));

create_split (trans, NC_ ("Stock Assistant: Action field", "Fees"),
create_split (trans, N_ ("Fees"),
capitalize ? info->acct : gas_account (info->fees_account),
account_commits, info->fees_memo_edit,
capitalize ? gnc_numeric_zero () : fees, fees);
Expand All @@ -1129,20 +1145,20 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
if (info->txn_type->dividend_value & FieldMask::ENABLED_CREDIT)
dividend = gnc_numeric_neg (dividend);

create_split (trans, NC_ ("Stock Assistant: Action field", "Dividend"),
create_split (trans, N_ ("Dividend"),
gas_account (info->dividend_account), account_commits,
info->dividend_memo_edit, dividend, dividend);
}

if (info->txn_type->capgains_value != FieldMask::DISABLED)
{
auto capgains = gae_amount (info->capgains_value);
create_split (trans, NC_ ("Stock Assistant: Action field", "Capital Gain"),
create_split (trans, N_ ("Capital Gain"),
info->acct, account_commits, info->capgains_memo_edit,
gnc_numeric_zero (), capgains);

capgains = gnc_numeric_neg (capgains);
create_split (trans, NC_ ("Stock Assistant: Action field", "Capital Gain"),
create_split (trans, N_ ("Capital Gain"),
gas_account (info->capgains_account), account_commits,
info->capgains_memo_edit, capgains, capgains);
}
Expand Down
11 changes: 8 additions & 3 deletions gnucash/gnome/dialog-doclink.c
Expand Up @@ -238,11 +238,16 @@ setup_location_dialog (GtkBuilder *builder, GtkWidget *button_loc, const gchar *
// update label and set entry text if required
if (uri)
{
gtk_label_set_text (location_label, _("Amend URL:"));
gtk_label_set_text (location_label, _("Amend the URL"));
gtk_entry_set_text (entry, uri);
}
else
gtk_label_set_text (location_label, _("Enter URL like http://www.gnucash.org:"));
{
gchar *enter_uri = g_strdup_printf (_("Enter an URL like \"%s\""),
PACKAGE_URL);
gtk_label_set_text (location_label, enter_uri);
g_free (enter_uri);
}
}

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

if (g_file_test (display_uri, G_FILE_TEST_EXISTS))
Expand Down
3 changes: 2 additions & 1 deletion gnucash/gnome/dialog-payment.c
Expand Up @@ -1632,7 +1632,8 @@ static Split *select_payment_split (GtkWindow *parent, Transaction *txn)
GList *node;
GtkWidget *first_rb = NULL;
int answer = GTK_BUTTONS_OK;
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"
const char *message = _("While this transaction has multiple splits that can be considered\n"
"as 'the payment split', GnuCash only knows how to handle one.\n"
"Please select one, the others will be discarded.\n\n");
GtkDialog *dialog = GTK_DIALOG(
gtk_dialog_new_with_buttons (_("Warning"),
Expand Down
4 changes: 2 additions & 2 deletions gnucash/gnome/gnc-plugin-basic-commands.c
Expand Up @@ -135,7 +135,7 @@ static GtkActionEntry gnc_plugin_actions [] =
},
{
"FileExportAccountsAction", "go-next",
N_("Export _Accounts"), NULL,
N_("Export _Accounts"), NULL,
N_("Export the account hierarchy to a new GnuCash datafile"),
G_CALLBACK (gnc_main_window_cmd_file_export_accounts)
},
Expand Down Expand Up @@ -204,7 +204,7 @@ static GtkActionEntry gnc_plugin_actions [] =
G_CALLBACK (gnc_main_window_cmd_tools_financial_calculator)
},
{
"ToolsBookCloseAction", NULL, N_("_Close Book"), NULL,
"ToolsBookCloseAction", NULL, N_("_Close Book"), NULL,
N_("Close the Book at the end of the Period"),
G_CALLBACK (gnc_main_window_cmd_tools_close_book)
},
Expand Down
2 changes: 1 addition & 1 deletion gnucash/gnome/gnc-plugin-page-report.c
Expand Up @@ -1247,7 +1247,7 @@ gnc_plugin_page_report_constr_init(GncPluginPageReport *plugin_page, gint report
report_saveas_str, G_CALLBACK(gnc_plugin_page_report_save_as_cb)
},
{
"ReportExportAction", "go-next", N_("Export _Report"), NULL,
"ReportExportAction", "go-next", N_("Export _Report"), NULL,
N_("Export HTML-formatted report to file"),
G_CALLBACK(gnc_plugin_page_report_export_cb)
},
Expand Down
3 changes: 1 addition & 2 deletions gnucash/gtkbuilder/assistant-acct-period.glade
Expand Up @@ -35,8 +35,7 @@ Danger: this feature does not work correctly at this time; it is still under dev
<object class="GtkLabel" id="menu_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
Select an accounting period and the closing date which must not be in the future and is greater than the closing date of the previous book.
<property name="label" translatable="yes">Select an accounting period and the closing date which must not be in the future, but is greater than the closing date of the previous book.

Books will be closed at midnight on the selected date.</property>
<property name="justify">center</property>
Expand Down
4 changes: 1 addition & 3 deletions gnucash/gtkbuilder/assistant-csv-account-import.glade
Expand Up @@ -63,9 +63,7 @@ Click on "Next" to proceed or "Cancel" to Abort Import.
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
Enter file name and location for the Import...
</property>
<property name="label" translatable="yes">Enter file name and location for the Import…</property>
<property name="wrap">True</property>
</object>
<packing>
Expand Down
4 changes: 1 addition & 3 deletions gnucash/gtkbuilder/assistant-csv-export.glade
Expand Up @@ -684,9 +684,7 @@ Select the type of Export required and the separator that will be used.
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
Enter file name and location for the Export...
</property>
<property name="label" translatable="yes">Enter file name and location for the Export…</property>
<property name="wrap">True</property>
</object>
<packing>
Expand Down
9 changes: 3 additions & 6 deletions gnucash/gtkbuilder/assistant-hierarchy.glade
Expand Up @@ -41,8 +41,7 @@ Click 'Cancel' if you do not wish to create any new accounts now.</property>
<object class="GtkLabel" id="choose_currency_label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
Please choose the currency to use for new accounts.</property>
<property name="label" translatable="yes">Please choose the currency to use for new accounts.</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -528,15 +527,13 @@ Please choose the currency to use for new accounts.</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="label" translatable="yes">
If you would like to change an account's name, click on the row containing the account, then click on the account name and change it.
<property name="label" translatable="yes">If you would like to change an account's name, click on the row containing the account, then click on the account name and change it.

Some accounts are marked as "Placeholder". Placeholder accounts are used to create a hierarchy of accounts and normally do not have transactions or opening balances. If you would like an account to be a placeholder account, click the checkbox for that account.

If you would like an account to have an opening balance, click on the row containing the account, then click on the opening balance field and enter the starting balance.

&lt;b&gt;Note:&lt;/b&gt; all accounts except Equity and placeholder accounts may have an opening balance.
</property>
&lt;b&gt;Note:&lt;/b&gt; all accounts except Equity and placeholder accounts may have an opening balance.</property>
<property name="use-markup">True</property>
<property name="wrap">True</property>
<property name="width-chars">75</property>
Expand Down
17 changes: 7 additions & 10 deletions gnucash/gtkbuilder/assistant-loan.glade
Expand Up @@ -448,8 +448,7 @@ If you make a mistake or want to make changes later, you can edit the created Sc
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="margin-bottom">12</property>
<property name="label" translatable="yes">
Do you utilise an escrow account, if so an account must be specified...</property>
<property name="label" translatable="yes">Do you utilise an escrow account, if so an account must be specified…</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
Expand Down Expand Up @@ -542,11 +541,12 @@ Do you utilise an escrow account, if so an account must be specified...</propert
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
All accounts must have valid entries to continue.
</property>
<property name="label" translatable="yes">All accounts must have valid entries to continue.</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<style>
<class name="gnc-class-highlight"/>
</style>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -724,9 +724,7 @@ All accounts must have valid entries to continue.
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
All enabled option pages must contain valid entries to continue.
</property>
<property name="label" translatable="yes">All enabled option pages must contain valid entries to continue.</property>
<property name="justify">center</property>
</object>
<packing>
Expand Down Expand Up @@ -1080,8 +1078,7 @@ All enabled option pages must contain valid entries to continue.
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">
Review the details below and if correct press Apply to create the schedule.</property>
<property name="label" translatable="yes">Review the details below and if correct press "Apply"" to create the schedule.</property>
<property name="justify">center</property>
</object>
<packing>
Expand Down
3 changes: 1 addition & 2 deletions gnucash/gtkbuilder/assistant-qif-import.glade
Expand Up @@ -1208,8 +1208,7 @@ If you don't see your exchange listed, or none of the available choices are appr
<object class="GtkLabel" id="label847694">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" comments="Run the assistant in your language to see GTK's translation of the button labels.">
If you are importing a QIF file from a bank or other financial institution, some of the transactions may already exist in your GnuCash accounts. To avoid duplication, GnuCash has tried to identify matches and needs your help to review them.
<property name="label" translatable="yes" comments="Run the assistant in your language to see GTK's translation of the button labels.">If you are importing a QIF file from a bank or other financial institution, some of the transactions may already exist in your GnuCash accounts. To avoid duplication, GnuCash has tried to identify matches and needs your help to review them.

On the next page you will be shown a list of imported transactions. As you select each one, a list of possible matches will be shown below it. If you find a correct match, click on it. Your selection will be confirmed by a check mark in the "Match?" column.

Expand Down

0 comments on commit c398983

Please sign in to comment.