I18n: Use ngettext for translation string with plural form.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21429 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2011-10-17 19:07:26 +00:00
parent 500882caf4
commit 4b6b6b90da
3 changed files with 19 additions and 9 deletions

View File

@@ -99,9 +99,19 @@ static gboolean autosave_confirm(GtkWidget *toplevel)
_("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,

View File

@@ -557,8 +557,6 @@ gnc_file_query_save (gboolean can_cancel)
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 @@ gnc_file_query_save (gboolean can_cancel)
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);

View File

@@ -1124,8 +1124,6 @@ gnc_main_window_prompt_for_save (GtkWidget *window)
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 @@ gnc_main_window_prompt_for_save (GtkWidget *window)
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,