[gnome-text-editor] savechangesdialog: use gettext plurality
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] savechangesdialog: use gettext plurality
- Date: Tue, 10 Aug 2021 19:29:32 +0000 (UTC)
commit 1517377e3fb48d128ae05d9201c656c9bec73c64
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 10 12:29:27 2021 -0700
savechangesdialog: use gettext plurality
src/editor-save-changes-dialog.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-save-changes-dialog.c b/src/editor-save-changes-dialog.c
index 929be9d..0e7b78c 100644
--- a/src/editor-save-changes-dialog.c
+++ b/src/editor-save-changes-dialog.c
@@ -239,6 +239,7 @@ _editor_save_changes_dialog_new (GtkWindow *parent,
GPtrArray *pages)
{
g_autoptr(GArray) requests = NULL;
+ const char *discard_label;
PangoAttrList *smaller;
GtkWidget *dialog;
GtkWidget *group;
@@ -252,6 +253,8 @@ _editor_save_changes_dialog_new (GtkWindow *parent,
requests = g_array_new (FALSE, FALSE, sizeof (SaveRequest));
g_array_set_clear_func (requests, save_request_clear);
+ discard_label = g_dngettext (GETTEXT_PACKAGE, _("Discard"), _("Discard All"), pages->len);
+
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_MODAL | GTK_DIALOG_USE_HEADER_BAR,
GTK_MESSAGE_QUESTION,
@@ -261,7 +264,7 @@ _editor_save_changes_dialog_new (GtkWindow *parent,
_("Open documents contain unsaved changes. Changes which are not
saved will be permanently lost."));
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
_("_Cancel"), GTK_RESPONSE_CANCEL,
- _("_Discard All"), GTK_RESPONSE_NO,
+ discard_label, GTK_RESPONSE_NO,
_("_Save"), GTK_RESPONSE_YES,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]