auto-i18n-plugin-core 1.1.15 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-i18n-plugin-core",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "vite, webpack automatic translation plugin core code.",
5
5
  "keywords": [
6
6
  "i18n",
package/readme-en.md CHANGED
@@ -382,7 +382,7 @@ import '../lang/index.js' // 📍 Must be imported on the first line of the entr
382
382
  | translatorOption | object | ❌ | `{}` | Translator options (lower priority than `translator`) |
383
383
  | rewriteConfig | boolean | ❌ | `true` | Whether to rewrite config file on each plugin run |
384
384
  | deepScan | boolean | ❌ | `false` | Experimental: Whether to perform deep string scanning |
385
- | commonTranslateKey | string | ❌ | `''` | General translation key |
385
+ | commonTranslateKey | string | ❌ | `''` | Common translation key for sharing language settings across multiple projects with different namespaces. When set, language switching will prioritize reading the language from localStorage using commonTranslateKey, enabling unified language management across projects |
386
386
  | insertFileExtensions | string[] | ❌ | `[]` | List of file extensions to insert translation code into |
387
387
  | isClear | boolean | ❌ | `false` | Whether to clear content not in context (clear source language key-value pairs not in context), only supported in build mode |
388
388
  | isClearSpace | boolean | ❌ | `false` | Whether to remove whitespace from both ends of source strings, whitespace is preserved by default |
package/readme.md CHANGED
@@ -385,7 +385,7 @@ import '../lang/index.js' // 📍 必须在入口文件中第一行引入,文
385
385
  | translatorOption | object | ❌ | `{}` | 翻译器的配置项,优先级低于`translator` |
386
386
  | rewriteConfig | boolean | ❌ | `true` | 插件每次运行时是否重写配置文件 |
387
387
  | deepScan | boolean | ❌ | `false` | 实验性属性,表示是否进行深层扫描字符串 |
388
- | commonTranslateKey | string | ❌ | `''` | 通用翻译key |
388
+ | commonTranslateKey | string | ❌ | `''` | 通用翻译key,用于多个不同命名空间的项目共享同一个语言设置。当设置该值后,语言切换会优先读取localStorage中commonTranslateKey对应的语言,实现跨项目的统一语言管理 |
389
389
  | insertFileExtensions | string[] | ❌ | `[]` | 要插入翻译代码的文件扩展名列表 |
390
390
  | isClear | boolean | ❌ | `false` | 是否清除已经不在上下文中的内容(清除项目中不再使用到的源语言键值对),仅仅支持打包模式下使用 |
391
391
  | isClearSpace | boolean | ❌ | `false` | 是否清除源字符串中左右两边的空格,默认会保留空格 |