Skip to content

[i18n] "Usage" tab label in AI settings is ambiguous across contexts #4086

@skkzsh

Description

@skkzsh

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.

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions