mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
feat(plugins): add plugin i18n foundation (Phase 0-1)
- Add i18n field to PluginManifest type in plugin-api package
- Create PluginI18nService for translation management
- Load translations from file paths or cached content
- Nested key lookup with dot notation (e.g., BUTTONS.SAVE)
- Smart fallback: current language → English → key
- Parameter interpolation with {{param}} syntax
- Language switching via signals
- Memory cleanup for unloaded plugins
- Add type validation for cached translation content
- Document language sync integration points
Part of plugin internationalization system implementation.
Tests will be added in Phase 8.
This commit is contained in:
parent
0177b4860d
commit
95578ef77b
2 changed files with 213 additions and 0 deletions
|
|
@ -116,6 +116,9 @@ export interface PluginManifest {
|
|||
nodeScriptConfig?: PluginNodeScriptConfig;
|
||||
sidePanel?: boolean; // If true, plugin loads in right panel instead of route
|
||||
jsonSchemaCfg?: string; // Path to JSON schema file for plugin configuration relative to plugin root
|
||||
i18n?: {
|
||||
languages: string[]; // Array of supported language codes (e.g., ['en', 'de', 'fr'])
|
||||
};
|
||||
}
|
||||
|
||||
// Hook payload types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue