Use plural form for attachment and note label
This commit is contained in:
1 parent
96f38c6da0
commit
c33e1825f5
2 files changed
+11
-4
No files matched your search
+6
-2
@@ -1521,7 +1521,9 @@
|
||||
if (count > 99) {
|
||||
badge = '99+';
|
||||
}
|
||||
var title= Sao.i18n.gettext("Attachment (%1)", count);
|
||||
var title= Sao.i18n.ngettext(
|
||||
"Attachment (%1)", "Attachments (%1)",
|
||||
Math.max(count, 1), count);
|
||||
update('attach', title, badge, 1);
|
||||
|
||||
count = resources.note_count || 0;
|
||||
@@ -1540,7 +1542,9 @@
|
||||
badge = unread + '/' + badge;
|
||||
}
|
||||
}
|
||||
title = Sao.i18n.gettext("Note (%1/%2)", unread, count);
|
||||
title = Sao.i18n.ngettext(
|
||||
"Note (%1/%2)", "Notes (%1/%2)",
|
||||
Math.max(count, 1), unread, count);
|
||||
update('note', title, badge, color);
|
||||
},
|
||||
record_message: function(position, size, max_size, record_id) {
|
||||
|
||||
@@ -308,7 +308,9 @@ class Form(TabContent):
|
||||
|
||||
attachment_count = resources.get('attachment_count', 0)
|
||||
badge = 1 if attachment_count else None
|
||||
label = _("Attachment (%s)") % attachment_count
|
||||
label = N_(
|
||||
"Attachment (%d)", "Attachments (%d)",
|
||||
max(attachment_count, 1)) % attachment_count
|
||||
update('attach', label, 'tryton-attach', badge)
|
||||
|
||||
note_count = resources.get('note_count', 0)
|
||||
@@ -319,7 +321,8 @@ class Form(TabContent):
|
||||
badge = 1
|
||||
else:
|
||||
badge = None
|
||||
label = _("Note (%d/%d)") % (note_unread, note_count)
|
||||
label = N_("Note (%d/%d)", "Notes (%d/%d",
|
||||
max(note_count, 1)) % (note_unread, note_count)
|
||||
update('note', label, 'tryton-note', badge)
|
||||
|
||||
def sig_switch(self, widget=None):
|
||||
|
||||
Reference in new issue
Block a user