]> git.ipfire.org Git - pakfire.git/commitdiff
i18n: Drop unused list function
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Jun 2021 13:41:58 +0000 (13:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Jun 2021 13:41:58 +0000 (13:41 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/i18n.py

index d524e2cb419e23484f318ce729ebbc8b4aec44d2..75e7811e9129d785f6c46711e0bae1f5422deaf9 100644 (file)
@@ -41,17 +41,3 @@ def _(singular, plural=None, n=None):
                return gettext.dngettext("pakfire", singular, plural, n)
 
        return gettext.dgettext("pakfire", singular)
-
-def list(parts):
-       """
-               Returns a comma-separated list for the given list of parts.
-
-               The format is, e.g., "A, B and C", "A and B" or just "A" for lists
-               of size 1.
-       """
-       if len(parts) == 0: return ""
-       if len(parts) == 1: return parts[0]
-       return _("%(commas)s and %(last)s") % {
-               "commas": ", ".join(parts[:-1]),
-               "last": parts[len(parts) - 1],
-       }