J'utilise la fonctionnalité i18n de Django. J'ai remarqué que même si j'ai tout traduit sur django.po et l'ai compilé à django.mo, certaines parties de mon site apparaissent toujours en anglais au lieu de la langue sélectionnée (portugais). Par exemple:Django ne traduit pas toute la page
J'ai une page avec ces champs:
- Tag
- Nom
- Matchs joués
- Créé le
La traduction serait:
- Tag
- Nome
- Partidas Jogadas
- Criado em
Et pourtant, ce que je reçois est:
- Tag
- Nome
- Matchs joués
- Créé le
Le code est exactement comme ceci:
<tr>
<th>{% trans 'Tag' %}:</th>
<td>{{ clan.tag }}.</td>
</tr>
<tr>
<th>{% trans 'Name' %}:</th>
<td>{{ clan.name }}.</td>
</tr>
<tr>
<th>{% trans 'Matches Played' %}:</th>
<td>{{ clan.ammountMatchesPlayed }}.</td>
</tr>
<tr>
<th>{% trans 'Created On' %}:</th>
<td>{{ clan.created|date:"d/m/Y" }}.</td>
</tr>
Sur django.po J'ai:
#: templates/clans/detail.html:45
msgid "Tag"
msgstr "Tag"
#: templates/clans/detail.html:49
msgid "Name"
msgstr "Nome"
#: templates/accounts/detail.html:111
msgid "Matches Played"
msgstr "Partidas Jogadas"
#: templates/accounts/detail.html:115 templates/clans/detail.html:53
msgid "Created On"
msgstr "Criado Em"
Et je l'ai compilé avec compilemessages django-admin.
Une idée? Comment puis-je déboguer cela? Merci