| 1 | = Common causes for translation problems = |
| 2 | |
| 3 | Did you ever make a website that uses i18n, and diligently populated your messages file, only to find that some strings ''just don't get translated''? This page lists common causes for these kinds of problems. |
| 4 | |
| 5 | == Fuzzy == |
| 6 | |
| 7 | In your message file, try removing the "fuzzy" line. |
| 8 | |
| 9 | == ForeignKey without verbose_name parameter == |
| 10 | |
| 11 | In your models, make sure that your ForeignKey fields get a verbose_name parameter. Like this: |
| 12 | |
| 13 | {{{ |
| 14 | parent = models.ForeignKey('self', verbose_name=_('Parent')) |
| 15 | }}} |
| 16 | |
| 17 | == Model methods without short_description attribute == |
| 18 | |
| 19 | If Django is displaying the name of some model method, it should have a short_description attribute. Like this: |
| 20 | |
| 21 | {{{ |
| 22 | def website_context(self): |
| 23 | return 'bla bla' |
| 24 | website_context.short_description = _('Website context') |
| 25 | }}} |