Repository navigation
An msgid with two meanings
#45366
|
I am Japanese. Correct translation for the Candlestick Chart Existing translation |
Replies: 2 comments
|
This is a real gap, and gettext's standard answer (
So the fix would be small and self-contained: add a context-aware helper, e.g. translateWithContext(context: string, key: string, ...args: unknown[]) {
return this.i18n.translate(key).withContext(context).fetch(...args);
}export it alongside Worth opening as an issue (or PR) referencing this. As a Japanese translator you're exactly the person who can show why it's needed. |
|
@sknoyon324234234234 Thank you for your response. |
This is a real gap, and gettext's standard answer (
msgctxt, a translation context) is half-supported in Superset right now:pgettext("context", "Open")(it's already among the recognized gettext functions in the i18n tooling).superset-frontend/scripts/po2json.jsexplicitly keepsmsgctxtentries, storing them under Jed'scontext + "\u0004" + msgidkey, so a.poentry withmsgctxt "Candlestick"survives the build.Translator.ts(superset-core/src/translation) only exposestranslate()andtranslateWithNumber(), both callingthis.i18n.translate(key)without a context. So frontend code lik…