#1539 Support internationalization (i18n) and localization (l10n)
Closed: Duplicate 2 years ago Opened 2 years ago by jcline.

Currently, Pagure is not using the standard multilingual internationalization services provided by Python's gettext module. This module makes it easy to write an application in one natural language (English, in our case), and provide a catalog of translated messages and interfaces to users under different natural languages.

The first step is to make sure all user facing strings are run through gettext. For Python, this is very simple. All you do is:

from gettext import gettext as _

print(_("This is some user-facing string that will be printed using the user's "
        "localization information in the natural language of the user"))

This includes log statements, error messages, anything any user will see.

The templates also need to be translated. I'm not very familiar with the i18n features of Jinja2, but http://jinja.pocoo.org/docs/dev/extensions/#i18n-extension seems to cover everything.

Just in case it would be helpful, thought I would ping @pravins, @noriko, or @aeng if there are any points from the localization perspective to add in, before it gets too far ahead.

@pingou changed the status to Closed

2 years ago

Login to comment on this ticket.