Add a bunch of translator comments to C files

This commit is contained in:
fell 2017-10-20 20:20:20 +02:00
parent 97c3483e06
commit 90bbeac078
6 changed files with 40 additions and 7 deletions

View File

@ -1093,6 +1093,7 @@ type_label_to_new_button(const gchar* type_label)
else else
{ {
PWARN("No translatable new-button label found for search type \"%s\", please add one into dialog-search.c!", type_label); PWARN("No translatable new-button label found for search type \"%s\", please add one into dialog-search.c!", type_label);
/* Translators: This string has a disambiguation prefix. Translate only the part behind '|' */
return Q_("Item represents an unknown object type (in the sense of bill, customer, invoice, transaction, split,...)|New item"); return Q_("Item represents an unknown object type (in the sense of bill, customer, invoice, transaction, split,...)|New item");
} }
} }

View File

@ -1737,6 +1737,7 @@ gnc_tree_control_split_reg_save (GncTreeViewSplitReg *view, gboolean reg_closing
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", message); "%s", message);
gtk_dialog_add_button (GTK_DIALOG (dialog), gtk_dialog_add_button (GTK_DIALOG (dialog),
/* Translators: Return to the transaction to update */
_("_Return"), GTK_RESPONSE_ACCEPT); _("_Return"), GTK_RESPONSE_ACCEPT);
gtk_widget_grab_focus (gtk_dialog_get_widget_for_response (GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT)); gtk_widget_grab_focus (gtk_dialog_get_widget_for_response (GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT));

View File

@ -384,7 +384,9 @@ static GtkActionEntry gnc_plugin_page_register_actions [] =
G_CALLBACK (gnc_plugin_page_register_cmd_schedule) G_CALLBACK (gnc_plugin_page_register_cmd_schedule)
}, },
{ {
"ScrubAllAction", NULL, N_("_All transactions"), NULL, NULL, "ScrubAllAction", NULL,
/* Translators: The following 2 are Scrub actions in register view */
N_("_All transactions"), NULL, NULL,
G_CALLBACK (gnc_plugin_page_register_cmd_scrub_all) G_CALLBACK (gnc_plugin_page_register_cmd_scrub_all)
}, },
{ {

View File

@ -982,7 +982,9 @@ gsr_default_reinit_handler( GNCSplitReg *gsr, gpointer data )
gtk_dialog_add_button(GTK_DIALOG(dialog), gtk_dialog_add_button(GTK_DIALOG(dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gnc_gtk_dialog_add_button(dialog, _("_Remove Splits"), gnc_gtk_dialog_add_button(dialog,
/* Translators: This is the confirmation button in a warning dialog */
_("_Remove Splits"),
GTK_STOCK_DELETE, GTK_RESPONSE_ACCEPT); GTK_STOCK_DELETE, GTK_RESPONSE_ACCEPT);
response = gnc_dialog_run(GTK_DIALOG(dialog), warning); response = gnc_dialog_run(GTK_DIALOG(dialog), warning);
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);

View File

@ -414,15 +414,25 @@ void csv_transactions_export (CsvExportInfo *info)
} }
/* Header string */ /* Header string */
header = g_strconcat (end_sep, _("Date"), mid_sep, _("Account Name"), mid_sep, header = g_strconcat (end_sep,
/* Translators: The following symbols will build the *
* header line of exported CSV files: */
_("Date"), mid_sep, _("Account Name"), mid_sep,
(num_action ? _("Transaction Number") : _("Number")), (num_action ? _("Transaction Number") : _("Number")),
mid_sep, _("Description"), mid_sep, _("Notes"), mid_sep, _("Description"), mid_sep, _("Notes"),
mid_sep, _("Memo"), mid_sep, _("Category"), mid_sep, mid_sep, _("Memo"), mid_sep, _("Category"), mid_sep,
_("Type"), mid_sep, _("Type"), mid_sep,
(num_action ? _("Number/Action") : _("Action")), (num_action ? _("Number/Action") : _("Action")),
mid_sep, _("Reconcile"), mid_sep, mid_sep, _("Reconcile"), mid_sep,
_("To With Sym"), mid_sep, _("From With Sym"), mid_sep, /* Translators: To amount with currency symbol */
_("To Num."), mid_sep, _("From Num."), mid_sep, _("To With Sym"), mid_sep,
/* Translators: From amount with currency symbol */
_("From With Sym"), mid_sep,
/* Translators: To amount, numerical only */
_("To Num."), mid_sep,
/* Translators: From amount, numerical only */
_("From Num."), mid_sep,
/* Translators: Exchange rates */
_("To Rate/Price"), mid_sep, _("From Rate/Price"), _("To Rate/Price"), mid_sep, _("From Rate/Price"),
end_sep, EOLSTR, NULL); end_sep, EOLSTR, NULL);
DEBUG("Header String: %s", header); DEBUG("Header String: %s", header);

View File

@ -634,6 +634,11 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout, gnc_register_add_cell (layout,
DATE_CELL, DATE_CELL,
DATE_CELL_TYPE_NAME, DATE_CELL_TYPE_NAME,
/* Translators: The 'sample:' items are
strings which are not displayed, but only
used to estimate widths. Please only
translate the portion after the ':' and
leave the rest ("sample:") as is. */
N_("sample:12/12/2000") + 7, N_("sample:12/12/2000") + 7,
CELL_ALIGN_RIGHT, CELL_ALIGN_RIGHT,
FALSE, FALSE,
@ -687,7 +692,11 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout, gnc_register_add_cell (layout,
RECN_CELL, RECN_CELL,
RECN_CELL_TYPE_NAME, RECN_CELL_TYPE_NAME,
N_("Reconciled:R") + 11, /* Translators: The abbreviation for 'Reconciled'
in the header row of the register. Please only
translate the portion after the ':' and
leave the rest ("Reconciled:") as is. */
N_("Reconciled:R") + 11,
CELL_ALIGN_CENTER, CELL_ALIGN_CENTER,
FALSE, FALSE,
FALSE); FALSE);
@ -695,6 +704,10 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout, gnc_register_add_cell (layout,
ASSOC_CELL, ASSOC_CELL,
RECN_CELL_TYPE_NAME, RECN_CELL_TYPE_NAME,
/* Translators: The abbreviation for 'Associate'
in the header row of the register. Please only
translate the portion after the ':' and
leave the rest ("Associate:") as is. */
N_("Associate:A") + 10, N_("Associate:A") + 10,
CELL_ALIGN_CENTER, CELL_ALIGN_CENTER,
FALSE, FALSE,
@ -809,7 +822,11 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout, gnc_register_add_cell (layout,
TYPE_CELL, TYPE_CELL,
RECN_CELL_TYPE_NAME, RECN_CELL_TYPE_NAME,
N_("Type:T") + 5, /* Translators: The abbreviation for 'Type'
in the header row of the register. Please only
translate the portion after the ':' and
leave the rest ("Type:") as is. */
N_("Type:T") + 5,
CELL_ALIGN_CENTER, CELL_ALIGN_CENTER,
FALSE, FALSE,
FALSE); FALSE);