Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gettext compile errors #536

Open
Sancus opened this issue Nov 28, 2023 · 1 comment
Open

gettext compile errors #536

Sancus opened this issue Nov 28, 2023 · 1 comment

Comments

@Sancus
Copy link
Member

Sancus commented Nov 28, 2023

Running l10n_tools/compile.sh produces many "fatal errors" with the below format:

messages.po:249: 'msgid' and 'msgstr' entries do not both begin with '\n'
messages.po:284: 'msgid' and 'msgstr' entries do not both begin with '\n'
messages.po:321: 'msgid' and 'msgstr' entries do not both begin with '\n'
messages.po:352: 'msgid' and 'msgstr' entries do not both begin with '\n'
messages.po:362: 'msgid' and 'msgstr' entries do not both begin with '\n'
messages.po:381: 'msgid' and 'msgstr' entries do not both begin with '\n'

It's not clear if these are really fatal or not They don't seem to be really fatal, but we should investigate. I suspect something like localizers removing \n's when they shouldn't, or Pontoon messing up the formatting. Perhaps we can remove \n's from the beginning of strings since it's unlikely they do anything in HTML content.

@MelissaAutumn
Copy link
Member

From modifying problem line in a locale.po file locally, and compiling again I can confirm that this isn't fatal. What's probably happening is jinja2 isn't stripping newlines when using block tags. Shouldn't be too hard to fix by either removing the new line like:

{% trans %}
Thunderbird is great!

And this is sample text!!
{% endtracks %}

to

{% trans %}Thunderbird is great!

And this is sample text!!
{% endtrans %}

or there may be a setting in jinja that auto strips this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants