Файли
openidea/src/ui/T.tsx
T
l0ng-ai 90cca59462 fix(plugins): show plugin text as written instead of through the IDE catalog (#1999)
A plugin title, label or message equal to IDE text ("Pick", "Log", "Refresh") was translated by the IDE catalog. Primitives now translate given text through useGivenTx, which returns it as written below VerbatimTextContext (plugin views, service panes, status items, prompts); plugin commands, tool windows, menu labels and notifications carry a verbatim flag. Command categories and the IDE's own words stay translated.
2026-11-07 21:44:03 +08:00

12 рядки
423 B
TypeScript

import { useGivenTx, useTx } from "@/platform/i18n";
/** English UI text, translated through the source-text catalog; re-renders on locale change. */
export function T({ children }: { children: string }) {
return useTx()(children);
}
/** Text a component was given: translated like `T`, shown as written below plugin UI. */
export function Given({ children }: { children: string }) {
return useGivenTx()(children);
}