[gnome-documents] notifications: Improve the delete message
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] notifications: Improve the delete message
- Date: Fri, 6 Mar 2015 15:34:04 +0000 (UTC)
commit 86803ed59c6adf68b42558853959422884c6764a
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 5 10:33:01 2015 +0100
notifications: Improve the delete message
https://bugzilla.gnome.org/show_bug.cgi?id=745658
src/notifications.js | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/notifications.js b/src/notifications.js
index b32c77d..2f261c2 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -47,9 +47,19 @@ const DeleteNotification = new Lang.Class({
margin_start: 12,
margin_end: 12 });
- let msg = Gettext.ngettext("Selected item has been deleted",
- "Selected items have been deleted",
- this._docs.length);
+ let msg;
+
+ if (this._docs.length == 1 && this._docs[0].name) {
+ // Translators: only one item has been deleted and %s is its name
+ msg = (_("ā%sā deleted")).format(this._docs[0].name);
+ } else {
+ // Translators: one or more items might have been deleted, and %d
+ // is the count
+ msg = Gettext.ngettext("%d item deleted",
+ "%d items deleted",
+ this._docs.length).format(this._docs.length);
+ }
+
let label = new Gtk.Label({ label: msg,
halign: Gtk.Align.START });
this.widget.add(label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]