r21365 - gnucash/trunk/src/gnome - I18n: Use ngettext for translation string with plural form.
Christian Stimming
cstim at code.gnucash.org
Thu Sep 29 10:22:19 EDT 2011
Author: cstim
Date: 2011-09-29 10:22:19 -0400 (Thu, 29 Sep 2011)
New Revision: 21365
Trac: http://svn.gnucash.org/trac/changeset/21365
Modified:
gnucash/trunk/src/gnome/assistant-acct-period.c
Log:
I18n: Use ngettext for translation string with plural form.
Modified: gnucash/trunk/src/gnome/assistant-acct-period.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-acct-period.c 2011-09-29 11:00:31 UTC (rev 21364)
+++ gnucash/trunk/src/gnome/assistant-acct-period.c 2011-09-29 14:22:19 UTC (rev 21365)
@@ -268,7 +268,6 @@
{
int nperiods;
GDate period_begin, period_end, date_now;
- const char *remarks_text;
char * str;
AcctPeriodInfo *info = user_data;
@@ -311,11 +310,19 @@
PINFO ("Date of earliest transaction is %ld %s", info->earliest, ctime (&info->earliest));
/* Display the results */
- remarks_text =
- _("The earliest transaction date found in this book is %s. "
- "Based on the selection made above, this book will be split "
- "into %d books.");
- str = g_strdup_printf (remarks_text, info->earliest_str, nperiods);
+ str = g_strdup_printf (
+ /* Translators: %s is a date string. %d is the number of books
+ * that will be created. This is a ngettext(3) message (but
+ * only for the %d part). */
+ ngettext("The earliest transaction date found in this book is %s. "
+ "Based on the selection made above, this book will be split "
+ "into %d book.",
+ "The earliest transaction date found in this book is %s. "
+ "Based on the selection made above, this book will be split "
+ "into %d books.",
+ nperiods),
+ info->earliest_str,
+ nperiods);
gtk_label_set_text (GTK_LABEL(info->period_remarks), str);
g_free (str);
}
More information about the gnucash-changes
mailing list