дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 10:07:11 +02:00
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.
12 рядки
423 B
TypeScript
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);
|
|
}
|