Thanks for making the new AI / LLM feature translatable.
Background
The "Usage" tab label (_('Usage')) in the AI / LLM settings tab names a screen
that shows monthly token consumption and cost.
In Japanese the natural rendering is "使用量" (consumption) or "利用状況" (usage status).
Potential Issue
The English word Usage can also mean "how-to / instructions".
If _('Usage') is later reused with that meaning elsewhere
(a help tab, documentation, a walkthrough, etc.),
the same msgstr would apply to both contexts because there is no msgctxt
to distinguish them, producing a mistranslation.
Other languages may have the same kind of ambiguity.
This is the same pattern fixed for From / To in #4073.
Suggested fixes
Two options.
A. Rename the English msgid to something more specific
{'id': 'usage', 'label': _('Token usage'), 'icon': '$'},
- Pros: simple code; translators can read the intent directly from the English msgid
- Cons: the longer label may wrap in the narrow vertical sub-tab column
B. Add a msgctxt via pgettext (same style as #4073)
{'id': 'usage', 'label': pgettext('stats', 'Usage'), 'icon': '$'},
A {# TRANSLATORS: ... #} comment can also be added alongside as a hint for translators.
- Pros: keeps the existing English UI label (
Usage) unchanged
- Cons: adds a small amount of
pgettext machinery in the template
Reviewing other similarly short msgids should further reduce the risk of mistranslation.
I've focused this issue on Usage since that's the one causing actual ambiguity in Japanese.
Thanks for making the new AI / LLM feature translatable.
Background
The "Usage" tab label (
_('Usage')) in the AI / LLM settings tab names a screenthat shows monthly token consumption and cost.
In Japanese the natural rendering is "使用量" (consumption) or "利用状況" (usage status).
Potential Issue
The English word
Usagecan also mean "how-to / instructions".If
_('Usage')is later reused with that meaning elsewhere(a help tab, documentation, a walkthrough, etc.),
the same
msgstrwould apply to both contexts because there is nomsgctxtto distinguish them, producing a mistranslation.
Other languages may have the same kind of ambiguity.
This is the same pattern fixed for
From/Toin #4073.Suggested fixes
Two options.
A. Rename the English msgid to something more specific
{'id': 'usage', 'label': _('Token usage'), 'icon': '$'},B. Add a
msgctxtviapgettext(same style as #4073){'id': 'usage', 'label': pgettext('stats', 'Usage'), 'icon': '$'},A
{# TRANSLATORS: ... #}comment can also be added alongside as a hint for translators.Usage) unchangedpgettextmachinery in the templateReviewing other similarly short msgids should further reduce the risk of mistranslation.
I've focused this issue on
Usagesince that's the one causing actual ambiguity in Japanese.