5392: Addon check type strings are not translatable

svn: r18609
This commit is contained in:
Jérôme Rapinat 2011-12-16 12:37:34 +00:00
parent 9e22c74162
commit 1fb9453723

View File

@ -404,7 +404,7 @@ class ViewManager(CLIManager):
if "update" in whattypes: if "update" in whattypes:
if (not config.get('behavior.do-not-show-previously-seen-updates') or if (not config.get('behavior.do-not-show-previously-seen-updates') or
plugin_dict["i"] not in config.get('behavior.previously-seen-updates')): plugin_dict["i"] not in config.get('behavior.previously-seen-updates')):
addon_update_list.append(("Updated", addon_update_list.append((_("Updated"),
"%s/download/%s" % "%s/download/%s" %
(ADDONS_URL, (ADDONS_URL,
plugin_dict["z"]), plugin_dict["z"]),
@ -416,7 +416,7 @@ class ViewManager(CLIManager):
if "new" in whattypes: if "new" in whattypes:
if (not config.get('behavior.do-not-show-previously-seen-updates') or if (not config.get('behavior.do-not-show-previously-seen-updates') or
plugin_dict["i"] not in config.get('behavior.previously-seen-updates')): plugin_dict["i"] not in config.get('behavior.previously-seen-updates')):
addon_update_list.append(("New", addon_update_list.append((_("New"),
"%s/download/%s" % "%s/download/%s" %
(ADDONS_URL, (ADDONS_URL,
plugin_dict["z"]), plugin_dict["z"]),
@ -429,7 +429,7 @@ class ViewManager(CLIManager):
LOG.debug("Done checking!") LOG.debug("Done checking!")
# List of translated strings used here # List of translated strings used here
# Dead code for l10n # Dead code for l10n
_('new'), _('update'), _('New'), _('Updated') _('new'), _('update')
if addon_update_list: if addon_update_list:
self.update_addons(addon_update_list) self.update_addons(addon_update_list)
elif force: elif force:
@ -472,13 +472,13 @@ class ViewManager(CLIManager):
{"name": '', "type": TOGGLE}, # 6 visible? bool {"name": '', "type": TOGGLE}, # 6 visible? bool
], list_mode="tree") ], list_mode="tree")
pos = None pos = None
addon_update_list.sort(key=lambda x: "%s %s" % (_(x[0]), x[2]["t"])) addon_update_list.sort(key=lambda x: "%s %s" % (x[0], x[2]["t"]))
last_category = None last_category = None
for (status,plugin_url,plugin_dict) in addon_update_list: for (status,plugin_url,plugin_dict) in addon_update_list:
count = get_count(addon_update_list, plugin_dict["t"]) count = get_count(addon_update_list, plugin_dict["t"])
category = _("%(adjective)s %(addon)s") % { category = _("%(adjective)s: %(addon)s") % {
"adjective": _(status), "adjective": status,
"addon": ngettext(plugin_dict["t"], plugin_dict["t"] + "s", count)} "addon": _(plugin_dict["t"])}
if last_category != category: if last_category != category:
last_category = category last_category = category
node = self.list.add([False, # initially selected? node = self.list.add([False, # initially selected?
@ -489,7 +489,7 @@ class ViewManager(CLIManager):
"", "",
False]) # checkbox visible? False]) # checkbox visible?
iter = self.list.add([False, # initially selected? iter = self.list.add([False, # initially selected?
"%s %s" % (_(status), plugin_dict["t"]), "%s %s" % (status, _(plugin_dict["t"])),
"%s (%s)" % (plugin_dict["n"], "%s (%s)" % (plugin_dict["n"],
plugin_dict["v"]), plugin_dict["v"]),
plugin_dict["d"], plugin_dict["d"],