Page MenuHomePhabricator

Put inline chunks of code in tvars instead of leaving them out of translate tags completely.
Closed, DeclinedPublic

Description

Check the paragraph for the line breaks.

Example:

Add your proposed session or unconference topic or workshop to the backlog column on the Hackathon 2025 workboard with the <code>#Wikimedia-Hackathon-2025</code> tag and the Organizing Team will review it.

should be tagged as

<translate>Add your proposed session or unconference topic or workshop to the backlog column on the Hackathon 2025 workboard with the <tvar name=1><code>#Wikimedia-Hackathon-2025</code></tvar> tag and the Organizing Team will review it.</translate>

instead of

<translate>Add your proposed session or unconference topic or workshop to the backlog column on the Hackathon 2025 workboard with the</translate><code>#Wikimedia-Hackathon-2025</code><translate>tag and the Organizing Team will review it.</translate>

Event Timeline

I was reading some documentation and it seems that chunks of <code></code> should not be wrapped with tvars. Am I missing something?

https://meta.wikimedia.org/wiki/Meta:Internationalization_guidelines#Translation_variables

I was reading some documentation and it seems that chunks of <code></code> should not be wrapped with tvars. Am I missing something?

https://meta.wikimedia.org/wiki/Meta:Internationalization_guidelines#Translation_variables

I believe this works only when the component itself is outside the translate wrappers. Putting a static variable inside translate wrappers (without a tvar) gives translators a hint that it needs translation. For example, I could write کوڈ for code, which the system won't identify, thus breaking the entire schema of the page.

NishthaJain7 claimed this task.
NishthaJain7 subscribed.

Works as expected