Merge Frank Ellenberger's I18N branch into maint.

This commit is contained in:
John Ralls
2023-03-03 09:59:21 -08:00
22 changed files with 138 additions and 124 deletions

View File

@@ -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 : "",

View File

@@ -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)
},

View File

@@ -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);
}
@@ -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)
@@ -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);
}
@@ -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);
}
@@ -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);
}
@@ -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);
}
@@ -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
@@ -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);
@@ -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);
}
@@ -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);
@@ -1129,7 +1145,7 @@ 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);
}
@@ -1137,12 +1153,12 @@ stock_assistant_finish (GtkAssistant *assistant, gpointer user_data)
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);
}

View File

@@ -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
@@ -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))

View File

@@ -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"),

View File

@@ -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)
},
@@ -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)
},

View File

@@ -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)
},

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>
@@ -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>

View File

@@ -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>
@@ -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>
@@ -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>
@@ -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>

View File

@@ -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.

View File

@@ -97,9 +97,7 @@
<child>
<object class="GtkLabel" id="label2">
<property name="can-focus">False</property>
<property name="label" translatable="yes">
Currently you have no saved reports.
</property>
<property name="label" translatable="yes">Currently you have no saved reports.</property>
</object>
<packing>
<property name="expand">True</property>
@@ -111,9 +109,11 @@ Currently you have no saved reports.
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Saved report configurations are created by first opening a report from the Reports menu,
altering the report's options to your taste and then choosing "Save Report Configuration" from
the Reports menu or tool bar.</property>
<property name="label" translatable="yes">Saved report configurations are created by
1. opening a report from the Reports menu,
2. altering the report's options to your taste,
3. selecting "Save Report Configuration [As…]" from the Reports menu
or pressing a "Save Config [As…]" button on the tool bar.</property>
</object>
<packing>
<property name="expand">False</property>

View File

@@ -343,7 +343,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">(None)</property>
<property name="label" translatable="yes">(none)</property>
</object>
<packing>
<property name="expand">True</property>
@@ -406,7 +406,7 @@
<property name="halign">start</property>
<property name="margin-top">3</property>
<property name="margin-bottom">3</property>
<property name="label" translatable="yes">Enter URL like http://www.gnucash.org</property>
<property name="label" translatable="yes">Enter an URL like "https://www.gnucash.org"</property>
</object>
<packing>
<property name="expand">False</property>

View File

@@ -137,12 +137,12 @@ static GtkActionEntry gnc_plugin_actions [] =
"Mt940ImportAction", "go-previous",
/* Translators: Message types MTxxxx are exchange formats used by the SWIFT network
https://en.wikipedia.org/wiki/Society_for_Worldwide_Interbank_Financial_Telecommunication */
N_("Import _MT940"), NULL,
N_("Import _MT940"), NULL,
N_("Import an end-of-day account statement in SWIFT MT940 format into GnuCash."),
G_CALLBACK(gnc_plugin_ab_cmd_mt940_import)
},
{
"Mt942ImportAction", "go-previous", N_("Import MT94_2"), NULL,
"Mt942ImportAction", "go-previous", N_("Import MT94_2"), NULL,
N_("Import an interim account statement in SWIFT MT942 format into GnuCash."),
G_CALLBACK(gnc_plugin_ab_cmd_mt942_import)
},
@@ -150,7 +150,7 @@ static GtkActionEntry gnc_plugin_actions [] =
"DtausImportAction", "go-previous",
/* Translators: DTAUS is a traditional german exchange format.
https://de.wikipedia.org/wiki/Datentr%C3%A4geraustauschverfahren */
N_("Import _DTAUS"), NULL,
N_("Import _DTAUS"), NULL,
N_("Import a traditional german DTAUS file into GnuCash."),
G_CALLBACK(gnc_plugin_ab_cmd_dtaus_import)
},
@@ -163,7 +163,7 @@ static GtkActionEntry gnc_plugin_actions [] =
/* G_CALLBACK(gnc_plugin_ab_cmd_csv_importsend) }, */
/* #endif */
{
"DtausImportSendAction", "go-previous", N_("Import DTAUS and _send..."), NULL,
"DtausImportSendAction", "go-previous", N_("Import DTAUS and _send"), NULL,
N_("Import a DTAUS file into GnuCash and transmit its orders by Online Banking."),
G_CALLBACK(gnc_plugin_ab_cmd_dtaus_importsend)
},

View File

@@ -74,23 +74,23 @@ static QofLogModule log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
static char * un_escape(char *str);
/** \brief Imports a csv file with invoice data into a GtkListStore.
Opens the csv file and attempts to match each row with the regular
expression provided in parser_regexp. This is a regular expression
that matches each field of the import row and the user selected field
separators (, or ;), optionally with the fields enclosed in quotes.
If the match is successful, the fields of the import row are transferred to
a row in the GtkListStore store. If the match is not successful, the
row is ignored. Maintains information about number of rows imported,
the number of rows ignored, and the actual ignored rows.
@param filename The csv filename to read
@param parser_regexp The regular expression with which to match the import rows
@param store To store the matched data
@param max_rows The maximum number of rows to import; use 0 for no maximum.
@param stats Return information about matched and non-matched rows. Use NULL if the information is not required.
*/
bi_import_result
@@ -236,13 +236,13 @@ gnc_bi_import_read_file (const gchar * filename, const gchar * parser_regexp,
/** \brief Adjusts and validates invoice import data.
Replaces missing or invalid data with defaults:
- if quantity is not set, default to 1
- if date_opened is not set or invalid, default to today
- if date is not set or invalid, default to date_opened
- if due date is not set or invalid, default to date_posted
Validates the import data; any error causes all rows of the same invoice
to be deleted from the import data:
- id is not set, and there is no previous id
@@ -252,17 +252,17 @@ gnc_bi_import_read_file (const gchar * filename, const gchar * parser_regexp,
- account posted is not the applicable type, A/P or A/R
- price is not set
- account does not exist
Adjustment and validation for header fields is only done for the first row of an invoice,
which is assumed to hold the header data for all items of the same invoice.
Currency related validation is done in subsqequent processing by gnc_bi_import_create_bis.
@param store Holds the rows of invoice import data
@param n_rows_fixed Increased for every data row that is adjusted in this function
@param n_rows_ignored Increased for every data row that is deleted in this function
@param info Updated with the error messages from this function
@param type The type of the import data, BILL or INVOICE
*/
void
@@ -288,12 +288,12 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
*n_rows_fixed = 0;
*n_rows_ignored = 0;
// Init control variables
running_id = g_string_new("");
ignore_invoice = FALSE;
on_first_row_of_invoice = TRUE;
g_string_append_printf (info, _("Validation...\n") );
// Walk through the list, reading each row.
@@ -313,10 +313,10 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
DUE_DATE, &due_date,
ACCOUNT_POSTED, &account_posted,
OWNER_ID, &owner_id, -1);
g_string_assign (running_id, id);
first_row_of_invoice = iter;
// Validate the invoice id.
if (strlen (id) == 0)
{
@@ -360,7 +360,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
row, id, invoice_line, owner_id);
}
}
if (strlen(date_posted) != 0)
{
// Validate the date posted and due date.
@@ -371,7 +371,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
g_string_append_printf (info,
_("Row %d, invoice %s/%u: %s is not a valid posting date.\n"),
row, id, invoice_line, date_posted);
// Verify the due date.
if (!isDateValid(due_date))
{
@@ -392,7 +392,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
row_fixed = TRUE;
}
}
// Validate account posted.
// Account should exists, and should be of type A/R for invoices, A/P for bills.
acc = gnc_account_lookup_for_register
@@ -408,7 +408,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
{
if (g_ascii_strcasecmp (type, "BILL") == 0)
{
if (xaccAccountGetType (acc) != ACCT_TYPE_PAYABLE)
{
ignore_invoice = TRUE;
@@ -429,7 +429,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
}
}
}
// Verify the date opened.
if(!isDateValid(date_opened))
{
@@ -444,9 +444,9 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
row_fixed = TRUE;
}
}
// Validate and fix item data for each row.
// Get item data.
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter,
DATE, &date,
@@ -454,7 +454,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
QUANTITY, &quantity,
PRICE, &price, -1);
// Validate the price.
if (strlen (price) == 0)
{
@@ -475,11 +475,11 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
_("Row %d, invoice %s/%u: account %s does not exist.\n"),
row, id, invoice_line, account);
}
// Fix item data.
if (!ignore_invoice)
{
// Verify the quantity.
if (strlen (quantity) == 0)
{
@@ -487,7 +487,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
gtk_list_store_set (store, &iter, QUANTITY, "1", -1);
row_fixed = TRUE;
}
// Verify the item date
if(!isDateValid(date))
{
@@ -499,19 +499,19 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
}
if (row_fixed) ++fixed_for_invoice;
// Get the next row and its id.
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter);
if (valid) gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, ID, &id, -1);
// If the id of the next row is blank, it takes the id of the previous row.
if (valid && strlen(id) == 0)
{
strcpy( id, running_id->str);
gtk_list_store_set (store, &iter, ID, id, -1);
}
// If this row was the last row of the invoice...
if (!valid || (valid && g_strcmp0 (id, running_id->str) != 0))
{
@@ -526,7 +526,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
if (valid) gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, ID, &id, -1);
}
while (valid && (g_strcmp0 (id, running_id->str) == 0));
if (running_id->len != 0)
{
g_string_append_printf (info,
@@ -538,18 +538,18 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
g_string_append_printf (info,
_("Error(s) in invoice without id, all rows of this invoice ignored.\n"));
}
// Fixes for ignored invoices don't count in the statistics.
fixed_for_invoice = 0;
ignore_invoice = FALSE;
}
on_first_row_of_invoice = TRUE;
(*n_rows_fixed) += fixed_for_invoice;
fixed_for_invoice = 0;
invoice_line = 0;
g_free (id);
g_free (date_opened);
g_free (date_posted);
@@ -558,7 +558,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
g_free (owner_id);
}
else on_first_row_of_invoice = FALSE;
g_free (date);
g_free (account);
g_free (quantity);
@@ -566,7 +566,7 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
row++;
}
// Deallocate strings.
g_string_free (running_id, TRUE);
@@ -574,24 +574,24 @@ gnc_bi_import_fix_bis (GtkListStore * store, guint * n_rows_fixed, guint * n_row
/** \brief Creates and updates invoices from validated import data.
Loops through the import data to create and update invoices.
The first data row for an invoice is assumed to hold the header data.
If an invoice already exists, the user is asked, once per import,
to confirm that invoices should be updated.
If not confirmed, any rows for existing invoices are ignored.
If confirmed, entries are added to existing invoices.
Posted invoices, however, are never updated.
If the field date_posted is set, the system will
attempt to also post the invoice. The system will not
post the invoice if the entries of the invoice hold different currencies,
or if the currency of the invoice differs from the currency of the account_posted.
As per user selection, the system displays tabs for either all affected invoices,
all affected invoices not yet posted, or no invoices at all.
*/
void
@@ -643,9 +643,9 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
update = NOT_ASKED;
on_first_row_of_invoice = TRUE;
running_id = g_string_new("");
g_string_append_printf (info, _("\nProcessing...\n") );
g_string_append_printf (info, "\n%s\n", _("Processing") );
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter);
while (valid)
{
@@ -673,12 +673,12 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
TAXABLE, &taxable,
TAXINCLUDED, &taxincluded,
TAX_TABLE, &tax_table, -1);
if (on_first_row_of_invoice)
{
g_string_assign(running_id, id);
first_row_of_invoice = iter;
if (g_ascii_strcasecmp (type, "BILL") == 0)
invoice = gnc_search_bill_on_id (book, id);
else if (g_ascii_strcasecmp (type, "INVOICE") == 0)
@@ -714,7 +714,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
//if (g_ascii_strcasecmp(type,"INVOICE"))gncInvoiceSetBillTo( invoice, billto );
(*n_invoices_created)++;
g_string_append_printf (info, _("Invoice %s created.\n"),id);
gncInvoiceCommitEdit (invoice);
}
else // Dealing with an existing invoice.
@@ -732,7 +732,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
update = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
if (update == NO)
{
// If the user does not want to update existing invoices, ignore all rows of the invoice.
@@ -747,7 +747,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
on_first_row_of_invoice = TRUE;
continue;
}
if (gncInvoiceIsPosted (invoice))
{
// If the invoice is already posted, ignore all rows of the invoice.
@@ -786,7 +786,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
notes = un_escape(notes);
gncEntrySetDescription (entry, desc);
gncEntrySetAction (entry, action);
value = gnc_numeric_zero();
value = gnc_numeric_zero();
gnc_exp_parser_parse (quantity, &value, NULL);
gncEntrySetQuantity (entry, value);
acc = gnc_account_lookup_for_register (gnc_get_current_root_account (),
@@ -823,12 +823,12 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
gncEntryCommitEdit(entry);
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter);
// handle auto posting of invoices
if (valid)
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, ID, &id, -1);
else
id = NULL;
if (g_strcmp0 (id, running_id->str) == 0) // The next row is for the same invoice.
{
on_first_row_of_invoice = FALSE;
@@ -901,7 +901,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
{
PWARN("Invoice %s is NOT marked for posting",id);
}
// open new bill / invoice in a tab, if requested
if (g_ascii_strcasecmp(open_mode, "ALL") == 0
|| (g_ascii_strcasecmp(open_mode, "NOT_POSTED") == 0
@@ -910,15 +910,15 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
iw = gnc_ui_invoice_edit (parent, invoice);
gnc_plugin_page_invoice_new (iw);
}
// The next row will be for a new invoice.
on_first_row_of_invoice = TRUE;
}
}
if (*n_invoices_updated + *n_invoices_created == 0)
g_string_append_printf (info, _("Nothing to process.\n"));
// cleanup
g_free (id);
g_free (date_opened);
@@ -942,7 +942,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
g_free (account_posted);
g_free (memo_posted);
g_free (accumulatesplits);
g_string_free (running_id, TRUE);
}

View File

@@ -169,7 +169,9 @@
(list "oth s" GNC-ASSET-TYPE GNC-BANK-TYPE GNC-CASH-TYPE)
(list "mutual" GNC-BANK-TYPE)))
(or (assoc-ref string-map-alist (string-downcase! (string-trim-both read-value)))
(let ((msg (format #f (G_ "Unrecognized account type '~s'. Defaulting to Bank.")
;; Translators: Mapping the QIF account type to a GnuCash account type.
;; see https://en.wikipedia.org/wiki/Quicken_Interchange_Format#Detail_items
(let ((msg (format #f (G_ "The account type ~s is unknown, using 'bank' instead.")
read-value)))
(errorproc errortype msg)
(list GNC-BANK-TYPE))))
@@ -232,6 +234,7 @@
(and read-value
(let ((sym (string->symbol (string-downcase (string-trim-both read-value)))))
(or (any (lambda (lst) (and (memq sym lst) (car lst))) action-map)
;; Translators: This is an error message about actions like buy, sell …
(let ((msg (format #f (G_ "Unrecognized action '~a'.") read-value)))
(errorproc errortype msg))))))
@@ -251,7 +254,8 @@
(not (string-null? read-value))
(let* ((secondchar (string-ref read-value 0)))
(or (any (lambda (m) (and (memq secondchar (cdr m)) (car m))) maplist)
(let ((msg (format #f (G_ "Unrecognized status '~a'. Defaulting to uncleared.")
;; Translators: Error message about reconciliation status, see msgctxt "Reconciled flag …"
(let ((msg (format #f (G_ "The unknown reconciliation status '~a' will be replaced by 'uncleared'.")
read-value)))
(errorproc errortype msg))))))

View File

@@ -38,7 +38,7 @@
doc
(gnc:make-html-text
(gnc:html-markup-h3
(format #f (G_ "Welcome to GnuCash ~a !")
(format #f (G_ "Welcome to GnuCash ~a!")
gnc:version))
(gnc:html-markup-p
(format #f (G_ "GnuCash ~a has lots of nice features. Here are a few.")

View File

@@ -118,13 +118,13 @@
(reg-option
(gnc:make-taxtable-option
gnc:*business-label* (N_ "Default Customer TaxTable")
gnc:*business-label* (N_ "Default Customer Tax Table")
"e" (N_ "The default tax table to apply to customers.")
(lambda () '()) #f))
(reg-option
(gnc:make-taxtable-option
gnc:*business-label* (N_ "Default Vendor TaxTable")
gnc:*business-label* (N_ "Default Vendor Tax Table")
"f" (N_ "The default tax table to apply to vendors.")
(lambda () '()) #f))

View File

@@ -1,4 +1,2 @@
# These are files that we don't want to translate, because they are
# in experimental status.
gnucash/gnome/assistant-stock-transaction.cpp
gnucash/gtkbuilder/assistant-stock-transaction.glade

View File

@@ -52,6 +52,7 @@ gnucash/gnome/assistant-acct-period.c
gnucash/gnome/assistant-hierarchy.c
gnucash/gnome/assistant-loan.cpp
gnucash/gnome/assistant-stock-split.c
gnucash/gnome/assistant-stock-transaction.cpp
gnucash/gnome/business-gnome-utils.c
gnucash/gnome/business-options-gnome.c
gnucash/gnome/business-urls.c
@@ -243,6 +244,7 @@ gnucash/gtkbuilder/assistant-hierarchy.glade
gnucash/gtkbuilder/assistant-loan.glade
gnucash/gtkbuilder/assistant-qif-import.glade
gnucash/gtkbuilder/assistant-stock-split.glade
gnucash/gtkbuilder/assistant-stock-transaction.glade
gnucash/gtkbuilder/assistant-xml-encoding.glade
gnucash/gtkbuilder/business-options-gnome.glade
gnucash/gtkbuilder/business-prefs.glade