Skip to content

Conversation

@tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Nov 19, 2024

When you have a code like this:

# i18n: some additional information which is not suitable as a msg context.
_('foo')

The comment, which must be prefixed with i18n: gets extracted together with the message.
These comments are useful because Transifex shows them nicely in the UI:

image

You can use the same style in js too:

// i18n: comment
$T.gettext('foo')

JSX will also support this: indico/react-jsx-i18n#28

@ThiefMaster ThiefMaster force-pushed the extract-translator-comments branch from a50db8f to 672d615 Compare November 19, 2024 15:54
@github-actions github-actions bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript deps labels Nov 19, 2024
@ThiefMaster ThiefMaster force-pushed the extract-translator-comments branch from 672d615 to 75cb61b Compare November 19, 2024 15:54
@ThiefMaster ThiefMaster added this to the v3.3 milestone Nov 19, 2024
tomasr8 and others added 3 commits November 19, 2024 17:02
Extract translator comments prefixed with 'i18n:'
Since Transifex has no setting to hide the comment
tag, it is stripped from the comments.
@ThiefMaster ThiefMaster force-pushed the extract-translator-comments branch 2 times, most recently from 4a22769 to feb6687 Compare November 19, 2024 16:05
@ThiefMaster ThiefMaster force-pushed the extract-translator-comments branch from feb6687 to eb5f089 Compare November 19, 2024 16:09
@ThiefMaster ThiefMaster merged commit b99412b into indico:master Nov 19, 2024
9 checks passed
@ThiefMaster ThiefMaster deleted the extract-translator-comments branch November 19, 2024 16:23
AjobK pushed a commit to AjobK/indico that referenced this pull request Dec 19, 2024
AjobK pushed a commit to AjobK/indico that referenced this pull request Jan 7, 2025
AjobK pushed a commit to AjobK/indico that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript deps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants