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

Fix for #19552 -- Ignore template comments when extracting translations. Slightly more strict validation of translator comments placement #677

Closed
wants to merge 11 commits into from

Conversation

ramiro
Copy link
Member

@ramiro ramiro commented Jan 26, 2013

In the general case comments are now ignored. This provides a more correct behavior when they are located before translatable constructs on the same line. Previously the latter were simply ignored (because the former were preserved when converting template code to the internal Python-syntax form later fed to xgettext but Python has no /* ... */-style comments).

Special comments directed to translators are now only taken in account when they are located at the end of a line. e.g.:

{# Translators: ignored #}{% trans "Literal A" %}{# Translators: valid, associated with "Literal B" below #}
{% trans "Literal B" %}

Behavior of {% comment %}...{% endcomment %} remains unchanged.

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