5392: Addon check type strings are not translatable
svn: r18608
This commit is contained in:
@ -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"]),
|
||||||
@ -427,14 +427,17 @@ class ViewManager(CLIManager):
|
|||||||
if fp:
|
if fp:
|
||||||
fp.close()
|
fp.close()
|
||||||
LOG.debug("Done checking!")
|
LOG.debug("Done checking!")
|
||||||
|
# List of translated strings used here
|
||||||
|
# Dead code for l10n
|
||||||
|
_('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:
|
||||||
from QuestionDialog import OkDialog
|
from QuestionDialog import OkDialog
|
||||||
OkDialog(_("There are no available addons of this type"),
|
OkDialog(_("There are no available addons of this type"),
|
||||||
_("Checked for '%s'") %
|
_("Checked for '%s'") %
|
||||||
_("' and '").join(config.get('behavior.check-for-update-types')),
|
_("' and '").join([_(t) for t in config.get('behavior.check-for-update-types')]),
|
||||||
self.window)
|
self.window)
|
||||||
|
|
||||||
def update_addons(self, addon_update_list):
|
def update_addons(self, addon_update_list):
|
||||||
from glade import Glade
|
from glade import Glade
|
||||||
@ -469,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 = "%s %s" % (_(status), ngettext(plugin_dict["t"],
|
category = _("%(adjective)s: %(addon)s") % {
|
||||||
plugin_dict["t"] + "s",
|
"adjective": status,
|
||||||
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?
|
||||||
@ -486,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"],
|
||||||
|
Reference in New Issue
Block a user