Skip to content

Conversation

@tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Nov 15, 2024

Still WIP but Feedback welcome!

This allows you to add translator comments:

// i18n: comment
Translate.string('bar')

For react:

<div>
  {/* i18n: Title */}
  <Translate>Hello & World</Translate>
</div>

The resulting POT file looks like this:

#: test.jsx:4
#. comment
msgid "bar"
msgstr ""

I'm thinking maybe we should strip the leading i18n: (though babel does not do this)
Comment tags are stripped from comments

Copy link
Member Author

@tomasr8 tomasr8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ughh I added the comments as pending and didn't notice..

@tomasr8 tomasr8 force-pushed the translator-comments branch from 4600741 to 8dcdbc8 Compare November 15, 2024 17:17
@tomasr8 tomasr8 force-pushed the translator-comments branch from 8dcdbc8 to b339bc6 Compare November 15, 2024 17:24
@tomasr8 tomasr8 force-pushed the translator-comments branch from b339bc6 to 59f67f2 Compare November 15, 2024 17:25
@tomasr8 tomasr8 marked this pull request as ready for review November 19, 2024 13:14
@ThiefMaster ThiefMaster merged commit ba17597 into indico:master Nov 19, 2024
1 check passed
@tomasr8 tomasr8 deleted the translator-comments branch November 19, 2024 15:51
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

Successfully merging this pull request may close these issues.

2 participants