diff --git a/04_Plugin_System.md b/04_Plugin_System.md index 83950ca..9352e5d 100644 --- a/04_Plugin_System.md +++ b/04_Plugin_System.md @@ -46,6 +46,13 @@ official.notes/ "apiVersion": "1", "description": "Markdown notes inside Verstak cases.", "source": "official", + "localization": { + "defaultLocale": "en", + "locales": { + "en": "locales/en.json", + "ru": "locales/ru.json" + } + }, "provides": [ "workspace.notes", "entity.note" @@ -85,6 +92,35 @@ official.notes/ } ``` +### 3.1. Локализация + +Локализуемый плагин объявляет собственные JSON-каталоги в `localization`. +Пути должны быть относительными, использовать `/` и оставаться внутри каталога +плагина. Все значения каталога — строки. Литеральные английские значения в +manifest остаются fallback, а переводы metadata используют стабильные ключи: + +```text +manifest.name +manifest.description +contributions.views..title +contributions.commands..title +contributions.statusBarItems..label +``` + +Внутренний UI плагина получает текущий язык только через публичный API: + +```js +const locale = api.i18n.getLocale(); +const title = api.i18n.t('ui.title', undefined, 'Notes'); +const unsubscribe = api.i18n.onDidChangeLocale(nextLocale => { + // Обновить текст без перемонтирования компонента и потери состояния. +}); +``` + +Desktop поддерживает `system`, `en` и `ru`. В режиме `system` локали `ru-*` +выбирают русский язык, остальные — английский. Плагин отвечает за свои +переводы; desktop core не содержит тексты официальных плагинов. + ## 4. Capabilities Instead Of Plugin Names Плагины не должны требовать конкретный плагин, если им нужна способность. @@ -306,4 +342,3 @@ official.notes-0.1.0.vpkg - checksums/signature later. На первом этапе допустима ручная установка папкой в plugin directory. - diff --git a/07_Full_Implementation_Roadmap.md b/07_Full_Implementation_Roadmap.md index 2215af5..7b97b71 100644 --- a/07_Full_Implementation_Roadmap.md +++ b/07_Full_Implementation_Roadmap.md @@ -41,6 +41,9 @@ Implemented: - browser inbox local receiver and minimal official Browser Inbox plugin; - sync server with device/user auth and operation push/pull; - SDK manifest/types/schema coverage for current plugin APIs; +- persisted System/English/Russian application language selection, localized + desktop shell, public `api.i18n` plugin contract, and bilingual catalogs for + all official plugins; - automated Go, frontend, official plugin, SDK, and real-sync smoke checks. Known remaining gaps: @@ -67,6 +70,8 @@ Known remaining gaps: records conversions. Chunked large-file attachment capture remains future work. - Packaging/update/release workflow is not product-grade yet. +- Browser extension UI localization is not yet migrated to the shared + multilingual product policy. ## 4. Implementation Phases