65
65
return (primary, button_text)
67
def get_rdepends_text(self, cache, pkg, appname):
67
def get_installation_status(self, cache, pkg, appname):
71
s = _("%s is installed on this computer.") % appname
72
# show how many packages on the system depend on this
73
installed_rdeps = cache.get_installed_rdepends(pkg)
74
installed_rrecommends = cache.get_installed_rrecommends(pkg)
75
installed_rsuggests = cache.get_installed_rsuggests(pkg)
76
if len(installed_rdeps) > 0:
78
s += gettext.ngettext(
79
"It is used by %s piece of installed software.",
80
"It is used by %s pieces of installed software.",
81
len(installed_rdeps)) % len(installed_rdeps)
82
elif len(installed_rrecommends) > 0:
84
s += gettext.ngettext(
85
"It is recommended by %s piece of installed software.",
86
"It is recommended by %s pieces of installed software.",
87
len(installed_rrecommends)) % len(installed_rrecommends)
88
elif len(installed_rsuggests) > 0:
90
s += gettext.ngettext(
91
"It is suggested by %s piece of installed software.",
92
"It is suggested by %s pieces of installed software.",
93
len(installed_rrecommends)) % len(installed_rrecommends)
72
# In future, say "Installed since $date"
96
75
def get_distro_codename(self):