"""
N_ = lambda x: x
+def _(singular, plural=None, n=None):
+ """
+ A function that returnes the translation of a string if available.
-"""
- A function that returnes the translation of a string if available.
-
- The language is taken from the system environment.
-"""
-# Enable this to have translation in the development environment.
-# gettext.bindtextdomain("pakfire", "build/mo")
-
-_ = lambda x: gettext.ldgettext("pakfire", x)
+ The language is taken from the system environment.
+ """
+ if not plural is None:
+ assert n is not None
+ return gettext.ldngettext("pakfire", singular, plural, n)
+ return gettext.ldgettext("pakfire", singular)