Skip to content

Commit

Permalink
[#2375] Allow plural translations in template {% trans %} tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 31, 2012
1 parent 208e979 commit 08c1efd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/config/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from paste.deploy.converters import asbool
import sqlalchemy
from pylons import config
from pylons.i18n import _, N_
from pylons.i18n import _, ungettext
from genshi.template import TemplateLoader
from genshi.filters.i18n import Translator

Expand Down Expand Up @@ -314,7 +314,7 @@ def genshi_lookup_attr(cls, obj, key):
lib.jinja_extensions.UrlForStaticExtension,
lib.jinja_extensions.UrlForExtension]
)
env.install_gettext_callables(_, N_, newstyle=True)
env.install_gettext_callables(_, ungettext, newstyle=True)
# custom filters
env.filters['empty_and_escape'] = lib.jinja_extensions.empty_and_escape
env.filters['truncate'] = lib.jinja_extensions.truncate
Expand Down

0 comments on commit 08c1efd

Please sign in to comment.