tildaslash / RatticWeb

Password Management for Humans
http://rattic.org/
GNU General Public License v2.0
474 stars 149 forks source link

Add multilingual support on create form #345

Open yvangodard opened 9 years ago

yvangodard commented 9 years ago

Labels of the form used to add a password does not currently support the translation (see attached for example, in french : all labels are in english). It would be interesting if this form is fully multilingual. capture d ecran 2015-03-16 a 08 51 41

smarthall commented 9 years ago

Good catch, looks like most of the forms do this, so lets do all the forms.

smarthall commented 9 years ago

For anyone who wants to take this on as their first bug what needs to happen is that we need to add a verbose_name argument to each field with a translation string. So to do this make sure this line is in the imports section for the models.py file:

from django.utils.translation import ugettext_lazy as _

then for example to change the title field to:

title = models.CharField(verbose_name=_('Title'), max_length=64, db_index=True)
smarthall commented 9 years ago

Then finally run ./manage.py makemessages to update the translations file so we can give the strings to our translators.