2002-11-03 Christian Stimming <stimming@tuhh.de>

* src/gnome/dialog-sxsincelast.c, src/gnome/window-main.c,
	src/engine/messages.h: Fix translation of plural forms by
	introducing ngettext(3).

	* src/import-export/ofx/gnc-ofx-import.c: Fix string translation
	issues.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7430 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2002-11-03 12:15:23 +00:00
parent 53f1e9824a
commit 923006d98b
13 changed files with 299 additions and 274 deletions

View File

@ -1,3 +1,12 @@
2002-11-03 Christian Stimming <stimming@tuhh.de>
* src/gnome/dialog-sxsincelast.c, src/gnome/window-main.c,
src/engine/messages.h: Fix translation of plural forms by
introducing ngettext(3).
* src/import-export/ofx/gnc-ofx-import.c: Fix string translation
issues.
2002-11-02 Derek Atkins <derek@ihtfp.com>
* gnc-engine-util.[ch]: add MOD_BUSINESS for logging (eww)

460
po/de.po

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,8 @@ char *gnc_qualifier_prefix_noop (const char *s);
#define _(String) (String)
#define Q_(String) gnc_qualifier_prefix_noop(String)
#define gettext(String) (String)
#define ngettext(msgid, msgid_plural, n) (((n)==1) ? \
(msgid) : (msgid_plural))
#endif /* End Not HAVE_GETTEXT */

View File

@ -855,6 +855,7 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw)
new_item_button = glade_xml_get_widget (xml, "new_item_button");
{
char *desc =
/* Translators: %s is either "item" or the name of some other item. */
g_strdup_printf (_("New %s"), type_label ? type_label : _("item"));
gtk_label_set_text (GTK_LABEL (GTK_BIN (new_item_button)->child), desc);
g_free (desc);
@ -1071,11 +1072,12 @@ gnc_search_dialog_test (void)
static GList *params = NULL;
static GList *display = NULL;
static GNCSearchCallbackButton buttons[] = {
{ N_("View Split"), do_nothing },
{ N_("New Split"), do_nothing },
{ N_("Do Something"), do_nothing },
{ N_("Do Nothing"), do_nothing },
{ N_("Who Cares?"), do_nothing },
/* Don't mark these as translatable since these are only test strings! */
{ ("View Split"), do_nothing },
{ ("New Split"), do_nothing },
{ ("Do Something"), do_nothing },
{ ("Do Nothing"), do_nothing },
{ ("Who Cares?"), do_nothing },
{ NULL }
};

View File

@ -388,15 +388,18 @@ static gint sxsld_get_future_created_txn_count( sxSinceLastData *sxsld );
void
gnc_ui_sxsincelast_guile_wrapper( char *bookfile )
{
const char *no_dialog_but_created_msg =
_( "There are no Scheduled Transactions to be entered at this time.\n"
"(%d %s automatically created)" );
gint ret;
ret = gnc_ui_sxsincelast_dialog_create();
if ( ret < 0 ) {
gnc_info_dialog( no_dialog_but_created_msg,
-(ret), -(ret) == 1 ? _("transaction") : _("transactions") );
}
gint ret;
ret = gnc_ui_sxsincelast_dialog_create();
if ( ret < 0 ) {
gnc_info_dialog
(ngettext
("There are no Scheduled Transactions to be entered at this time.\n"
"(%d transaction automatically created)",
"There are no Scheduled Transactions to be entered at this time.\n"
"(%d transactions automatically created)",
-(ret)),
-(ret));
}
}
static gboolean

View File

@ -659,16 +659,21 @@ gnc_main_window_sched_xaction_slr_cb (GtkWidget *widget, gpointer data)
const char *nothing_to_do_msg =
_( "There are no Scheduled Transactions to be entered at this time." );
const char *no_dialog_but_created_msg =
_( "There are no Scheduled Transactions to be entered at this time.\n"
"(%d %s automatically created)" );
ret = gnc_ui_sxsincelast_dialog_create();
if ( ret == 0 ) {
gnc_info_dialog( nothing_to_do_msg );
} else if ( ret < 0 ) {
gnc_info_dialog( no_dialog_but_created_msg,
-(ret), -(ret) == 1 ? _("transaction") : _("transactions") );
gnc_info_dialog
(ngettext
/* Translators: %d is the number of transactions. This is a
ngettext(3) message. */
("There are no Scheduled Transactions to be entered at this time.\n"
"(%d transaction automatically created)",
"There are no Scheduled Transactions to be entered at this time.\n"
"(%d transactions automatically created)",
-(ret)),
-(ret));
} /* else { this else [>0 means dialog was created] intentionally left
* blank. } */
}

View File

@ -137,6 +137,10 @@ gnc_hbci_trans (GtkWidget *parent,
break;
case SINGLE_DEBITNOTE:
gtk_label_set_text (GTK_LABEL (heading_label),
/* Translators: Strings from this file are really only
* needed inside Germany (HBCI is not supported anywhere
* else). You may safely ignore strings from the
* import-export/hbci subdirectory in other countries. */
_("Enter an Online Direct Debit Note"));
gtk_label_set_text (GTK_LABEL (recp_name_heading),

View File

@ -836,6 +836,10 @@ on_userid_next (GnomeDruidPage *gnomedruidpage,
HBCI_Customer *cust;
cust = HBCI_API_customerFactory (newuser, customerid,
customername ? customername :
/* Translators: Strings from this file are really only
* needed inside Germany (HBCI is not supported anywhere
* else). You may safely ignore strings from the
* import-export/hbci subdirectory in other countries. */
_("Default Customer"));
g_assert (cust);
HBCI_User_addCustomer (newuser, cust, TRUE);

View File

@ -148,7 +148,13 @@ gnc_hbci_getbalance (GtkWidget *parent, Account *gnc_acc)
dialogres = gnc_verify_dialog_parented
(parent,
TRUE,
/* %s is either 'noted balance' or 'booked balance'. %s is the amount. */
/* Translators: Strings from this file are really only
* needed inside Germany (HBCI is not supported anywhere
* else). You may safely ignore strings from the
* import-export/hbci subdirectory in other countries.
*
* %s is either the string 'noted balance' or 'booked
* balance'. %s is the amount. */
_("Result of HBCI job: \n"
"Account %s is %s\n"
"Reconcile account now?"),

View File

@ -54,6 +54,10 @@ gnc_hbci_api_new (const char *filename, gboolean allowNewFile,
HBCI_Error_delete (err);
gnc_warning_dialog_parented
(parent,
/* Translators: Strings from this file are really only needed
* inside Germany (HBCI is not supported anywhere else). You
* may safely ignore strings from the import-export/hbci
* subdirectory in other countries. */
_("Error while loading OpenHBCI config file:\n %s\n"), errstring);
free (errstring);
HBCI_API_delete (api);

View File

@ -138,7 +138,12 @@ static int msgInputPin(const HBCI_User *user,
if (user != NULL) {
bank = HBCI_User_bank (user);
if (bank != NULL) {
/* xgettext:c-format */
/* Translators: Strings from this file are really only
* needed inside Germany (HBCI is not supported anywhere
* else). You may safely ignore strings from the
* import-export/hbci subdirectory in other countries.
*
* xgettext:c-format */
msgstr = g_strdup_printf (_("Please enter and confirm new PIN for \n"
"user '%s' at bank '%s',\n"
"with at least %d characters."),

View File

@ -107,6 +107,10 @@ static void jobStarted(JobProgressType type, int actions, void *user_data)
switch(type){
case JOB_OPENINGDIALOG:
/* Translators: Strings from this file are really only needed
* inside Germany (HBCI is not supported anywhere else). You may
* safely ignore strings from the import-export/hbci subdirectory
* in other countries. */
msg = _("Opening Dialog");
break;
case JOB_CLOSINGDIALOG:

View File

@ -135,7 +135,7 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data)
time_t current_time;
Account *account;
Account *investment_account;
gchar investment_account_text[256] = "";
gchar *investment_account_text;
gnc_commodity *investment_commodity;
GNCBook *book;
Transaction *transaction;
@ -296,22 +296,19 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data)
NULL);
if(investment_commodity!=NULL)
{
/* WARNING: The must NOT be the caracter ':' anywhere in investment_account_text, or the translated strings used to build it */
strncat(investment_account_text,
_("Stock account for security \""),
sizeof(investment_account_text)-strlen(investment_account_text));
strncat(investment_account_text,
data.security_data_ptr->secname,
sizeof(investment_account_text)-strlen(investment_account_text));
strncat(investment_account_text,
_("\""),
sizeof(investment_account_text)-strlen(investment_account_text));
g_strdup_printf(investment_account_text,
/* This string is a default account
name. It MUST NOT contain the
character ':' anywhere in it or
in any translations. */
_("Stock account for security \"%s\""),
data.security_data_ptr->secname);
investment_account = gnc_import_select_account(data.unique_id,
1,
investment_account_text,
investment_commodity,
STOCK);
g_free (investment_account_text);
if(investment_account!=NULL&&data.unitprice_valid==true&&data.units_valid==true)
{