r21429 - gnucash/trunk/src/gnome-utils - I18n: Use ngettext for translation string with plural form.

Christian Stimming cstim at code.gnucash.org
Mon Oct 17 15:07:26 EDT 2011


Author: cstim
Date: 2011-10-17 15:07:26 -0400 (Mon, 17 Oct 2011)
New Revision: 21429
Trac: http://svn.gnucash.org/trac/changeset/21429

Modified:
   gnucash/trunk/src/gnome-utils/gnc-autosave.c
   gnucash/trunk/src/gnome-utils/gnc-file.c
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
I18n: Use ngettext for translation string with plural form.

Modified: gnucash/trunk/src/gnome-utils/gnc-autosave.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-autosave.c	2011-10-17 16:58:04 UTC (rev 21428)
+++ gnucash/trunk/src/gnome-utils/gnc-autosave.c	2011-10-17 19:07:26 UTC (rev 21429)
@@ -99,9 +99,19 @@
                                _("Save file automatically?"));
     gtk_message_dialog_format_secondary_text
     (GTK_MESSAGE_DIALOG(dialog),
-     _("Your data file needs to be saved to your hard disk to save your changes.  GnuCash has a feature to save the file automatically every %d minutes, just as if you had pressed the \"Save\" button each time. \n\n"
-       "You can change the time interval or turn off this feature under Edit -> Preferences -> General -> Auto-save time interval. \n\n"
-       "Should your file be saved automatically?"),
+     ngettext("Your data file needs to be saved to your hard disk to save your changes.  "
+              "GnuCash has a feature to save the file automatically every %d minute, "
+              "just as if you had pressed the \"Save\" button each time. \n\n"
+              "You can change the time interval or turn off this feature under "
+              "Edit -> Preferences -> General -> Auto-save time interval. \n\n"
+              "Should your file be saved automatically?",
+              "Your data file needs to be saved to your hard disk to save your changes.  "
+              "GnuCash has a feature to save the file automatically every %d minutes, "
+              "just as if you had pressed the \"Save\" button each time. \n\n"
+              "You can change the time interval or turn off this feature under "
+              "Edit -> Preferences -> General -> Auto-save time interval. \n\n"
+              "Should your file be saved automatically?",
+              interval_mins),
      interval_mins);
     gtk_dialog_add_buttons(GTK_DIALOG(dialog),
                            _("_Yes, this time"), YES_THIS_TIME,

Modified: gnucash/trunk/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.c	2011-10-17 16:58:04 UTC (rev 21428)
+++ gnucash/trunk/src/gnome-utils/gnc-file.c	2011-10-17 19:07:26 UTC (rev 21429)
@@ -557,8 +557,6 @@
         gint response;
         const char *title = _("Save changes to the file?");
         /* This should be the same message as in gnc-main-window.c */
-        const gchar *message =
-            _("If you don't save, changes from the past %d minutes will be discarded.");
         time_t oldest_change;
         gint minutes;
 
@@ -570,7 +568,9 @@
         oldest_change = qof_book_get_dirty_time(current_book);
         minutes = (time(NULL) - oldest_change) / 60 + 1;
         gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
-                message, minutes);
+                ngettext("If you don't save, changes from the past %d minute will be discarded.",
+                         "If you don't save, changes from the past %d minutes will be discarded.",
+                         minutes), minutes);
         gtk_dialog_add_button(GTK_DIALOG(dialog),
                               _("Continue _Without Saving"), GTK_RESPONSE_OK);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2011-10-17 16:58:04 UTC (rev 21428)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2011-10-17 19:07:26 UTC (rev 21429)
@@ -1124,8 +1124,6 @@
     const gchar *filename, *tmp;
     const gchar *title = _("Save changes to file %s before closing?");
     /* This should be the same message as in gnc-file.c */
-    const gchar *message_mins =
-        _("If you don't save, changes from the past %d minutes will be discarded.");
     const gchar *message_hours =
         _("If you don't save, changes from the past %d hours and %d minutes will be discarded.");
     const gchar *message_days =
@@ -1169,7 +1167,9 @@
     else
     {
         gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
-                message_mins, minutes);
+                ngettext("If you don't save, changes from the past %d minute will be discarded.",
+                         "If you don't save, changes from the past %d minutes will be discarded.",
+                         minutes), minutes);
     }
     gtk_dialog_add_buttons(GTK_DIALOG(dialog),
                            _("Close _Without Saving"), GTK_RESPONSE_CLOSE,



More information about the gnucash-changes mailing list