Open ebanDev opened 2 years ago
My guess would be because of your line 28 in your file
<p>{% trans %}Lecture {{ article.readtime.minutes }}mn{% endtrans %}</p>
which includes a variable inside your string to translate, breaks pybabel.
First, you should try to render it, to see if jinja2 throws an error. Jinja2 is better at that than pybabel, that silently ignore the error wihtout telling you anythig about it.
Then, if it is confirmed, split your string in 2, putting your variable outside the string to translate.
That is an issue I just encounter, and pybabel is very wrong in the way it deals with this, because it does not signal the error, but then DO NOT extract any string from the file with the error.
This is very wrong. It should
Hello, when I'm tryna extract strings to translate from the following template : https://gitlab.ilearned.eu/i-learned/blog/theme/-/blob/localization/theme/templates/index.html I don't get any of those
Here is the command I'm using :
pybabel extract --mapping babel.cfg --output messages.pot ./
My babel.cfg is[jinja2: templates/index.html]
The strings are extracted from this file https://gitlab.ilearned.eu/i-learned/blog/theme/-/blob/localization/theme/templates/footer.html but it doesn't work for this one https://gitlab.ilearned.eu/i-learned/blog/theme/-/blob/localization/theme/templates/index.html it's kinda weird 😅 Thanks !