This guide is tested for RERO-ILS v0.5.2
install language file from transifex (rero-ils project) :
$ pipenv run tx pull -l es #es for spanish
install language file from transifex (rero-ils-ui project) :
$ cd ui
$ pipenv run tx pull -l es #es for spanish
Update I18N_LANGUAGES variable in config.py
to add the new language :
e.g. for spanish :
I18N_LANGUAGES = [
('fr', _('French')),
('de', _('German')),
('it', _('Italian')),
('es', _('Spanish')),
]
Define the new language in manual translation file to add ui_language_<language>
:
e.g. :
# Menu language
_('ui_language_en')
_('ui_language_fr')
_('ui_language_de')
_('ui_language_it')
_('ui_language_es')
For each existing languages, add the new translation in:
rero-ils/translations/<language>/LC_MESSAGES/messages.po
e.g. :
#: rero_ils/manual_translations.txt:64
msgid "ui_language_es"
msgstr "Español"
Finally, run bootstrap to rebuild UI and assets:
$ ./script/bootstrap