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

Translator Comments #12139

Closed
garretthyder opened this issue Nov 20, 2018 · 2 comments · Fixed by #12193
Closed

Translator Comments #12139

garretthyder opened this issue Nov 20, 2018 · 2 comments · Fixed by #12193
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended

Comments

@garretthyder
Copy link
Contributor

garretthyder commented Nov 20, 2018

Describe the bug
While translating the latest strings from Gutenberg 4.5 I found that there's a case where the translator comment in the code isn't parsed properly so doesn't appear on translate.wordpress.org.

This may be related to #9464 but doesn't seem to be an exact match.

Code - https://plugins.trac.wordpress.org/browser/gutenberg/trunk/lib/client-assets.php#L1215
Translate Row - https://translate.wordpress.org/projects/wp-plugins/gutenberg/dev/en-ca/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=6925481&filters%5Btranslation_id%5D=59162362

I feel the issue is probably the translator comment in the code has text in the comment string prior to 'Translators:' prefix. May just need the comment split into two with the 'Translators:' comment in it's own comment block.

To Reproduce
Steps to reproduce the behavior:

  1. Go to translate.wordpress.org, specifically this example;
    https://translate.wordpress.org/projects/wp-plugins/gutenberg/dev/en-ca/default?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=6925481&filters%5Btranslation_id%5D=59162362
  2. Note there's no translator comment on the row
  3. Open the reference;
    https://plugins.trac.wordpress.org/browser/gutenberg/trunk/lib/client-assets.php#L1215
  4. Note there's a translator comment in the code.

Expected behavior
The translators comment should appear in translate.wordpress.org similar to the other one for Noto Serif font;
screen shot 2018-11-20 at 3 33 33 pm

Screenshots
Here's the translator row which is missing the comment;
screen shot 2018-11-20 at 3 34 21 pm

Here's the code which shows the comment;
screen shot 2018-11-20 at 3 34 31 pm

Additional context
Gutenberg Version - 4.5

@designsimply designsimply added Internationalization (i18n) Issues or PRs related to internationalization efforts Needs Testing Needs further testing to be confirmed. labels Nov 20, 2018
@swissspidy
Copy link
Member

May just need the comment split into two with the 'Translators:' comment in it's own comment block.

Yep that‘s it. Translator comments need to be in a standalone comment.

@garretthyder garretthyder mentioned this issue Nov 21, 2018
4 tasks
@garretthyder
Copy link
Contributor Author

Thanks @swissspidy I created PR #12193 to split the comment. Not sure how to test though as it's the parser which will handle the update to translate.wp.org

@designsimply designsimply added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Nov 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants