auto-i18n-plugin-core 1.1.6 → 1.1.8
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/readme-en.md +27 -1
- package/readme.md +25 -1
package/package.json
CHANGED
package/readme-en.md
CHANGED
|
@@ -35,6 +35,13 @@ pnpm run preview // Don't select React, contains too much English text
|
|
|
35
35
|
- **Build Tools**: Fully compatible with Webpack, Vite, and Rollup 🚀
|
|
36
36
|
- **Translation Services**: Default support for **Youdao** and **Google** translation, plus custom translators
|
|
37
37
|
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## ❓ Common Issues
|
|
41
|
+
|
|
42
|
+
[Documentation](https://juejin.cn/post/7483435518526062626).
|
|
43
|
+
|
|
44
|
+
|
|
38
45
|
---
|
|
39
46
|
|
|
40
47
|
## 🌟 Quick Start 🚀
|
|
@@ -341,7 +348,8 @@ import '../lang/index.js' // 📍 Must be imported on the first line of the entr
|
|
|
341
348
|
| deepScan | boolean | ❌ | `false` | Experimental: Whether to perform deep string scanning |
|
|
342
349
|
| commonTranslateKey | string | ❌ | `''` | General translation key |
|
|
343
350
|
| insertFileExtensions | string[] | ❌ | `[]` | List of file extensions to insert translation code into |
|
|
344
|
-
| isClear | boolean | ❌ | `false` | Whether to clear content not in context (clear source language key-value pairs not in context) |
|
|
351
|
+
| isClear | boolean | ❌ | `false` | Whether to clear content not in context (clear source language key-value pairs not in context), only supported in build mode |
|
|
352
|
+
| isClearSpace | boolean | ❌ | `false` | Whether to remove whitespace from both ends of source strings, whitespace is preserved by default |
|
|
345
353
|
|
|
346
354
|
---
|
|
347
355
|
|
|
@@ -464,6 +472,24 @@ Original authors: wenps, xu-code, Caleb-Xu, Winfans
|
|
|
464
472
|
|
|
465
473
|
## Changelog
|
|
466
474
|
|
|
475
|
+
|
|
476
|
+
### v1.1.8 (Recommended Version)
|
|
477
|
+
|
|
478
|
+
- Renamed configuration for controlling leading/trailing whitespace removal
|
|
479
|
+
|
|
480
|
+
### v1.1.7 (Recommended Version)
|
|
481
|
+
|
|
482
|
+
- Added compatibility for enable feature and translation initialization completion
|
|
483
|
+
- Added configuration option to control whether to remove leading/trailing whitespace during scanning
|
|
484
|
+
- Fixed issue with abnormal triggering of new translations
|
|
485
|
+
- Fixed issue where cleanup configuration was not taking effect
|
|
486
|
+
|
|
487
|
+
### v1.1.6 (Recommended Version)
|
|
488
|
+
|
|
489
|
+
- Fixed issue where clearing whitespace before/after template strings caused mismatch between JSON and translation functions
|
|
490
|
+
- Fixed issue where Chinese brackets in interpolation caused interpolation to fail
|
|
491
|
+
- Added configuration cleanup functionality
|
|
492
|
+
|
|
467
493
|
### v1.1.5 (Recommended Version)
|
|
468
494
|
|
|
469
495
|
- Added support for interpolation translation
|
package/readme.md
CHANGED
|
@@ -39,6 +39,12 @@ tips:有道翻译需要用户自己去申请有道的翻译服务,demo里面
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## ❓ 常见问题
|
|
43
|
+
|
|
44
|
+
[问题文档](https://juejin.cn/post/7483435518526062626)。
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
42
48
|
## 🌟 快速开始 🚀
|
|
43
49
|
|
|
44
50
|
### 1️⃣ 安装插件 📦
|
|
@@ -353,7 +359,8 @@ import '../lang/index.js' // 📍 必须在入口文件中第一行引入,文
|
|
|
353
359
|
| deepScan | boolean | ❌ | `false` | 实验性属性,表示是否进行深层扫描字符串 |
|
|
354
360
|
| commonTranslateKey | string | ❌ | `''` | 通用翻译key |
|
|
355
361
|
| insertFileExtensions | string[] | ❌ | `[]` | 要插入翻译代码的文件扩展名列表 |
|
|
356
|
-
| isClear | boolean | ❌ | `false` |
|
|
362
|
+
| isClear | boolean | ❌ | `false` | 是否清除已经不在上下文中的内容(清除项目中不再使用到的源语言键值对),仅仅支持打包模式下使用 |
|
|
363
|
+
| isClearSpace | boolean | ❌ | `false` | 是否清除源字符串中左右两边的空格,默认会保留空格 |
|
|
357
364
|
|
|
358
365
|
---
|
|
359
366
|
|
|
@@ -478,6 +485,23 @@ const HelloWorld: React.FC<HelloWorldProps> = ({ name = 'World' }) => {
|
|
|
478
485
|
|
|
479
486
|
## 更新日志
|
|
480
487
|
|
|
488
|
+
### v1.1.8 (推荐版本)
|
|
489
|
+
|
|
490
|
+
- 是否支持清除前后空格配置重命名
|
|
491
|
+
|
|
492
|
+
### v1.1.7 (推荐版本)
|
|
493
|
+
|
|
494
|
+
- enable 能力兼容 翻译初始化补全
|
|
495
|
+
- 新增扫描是否支持清除前后空格配置
|
|
496
|
+
- 修复异常触发新增翻译问题
|
|
497
|
+
- 修复清理配置异常不生效问题
|
|
498
|
+
|
|
499
|
+
### v1.1.6 (推荐版本)
|
|
500
|
+
|
|
501
|
+
- 修复模板字符串前后空格清空导致 JSON 对应不上翻译函数的问题
|
|
502
|
+
- 修复插值中文括号导致插值失效的问题
|
|
503
|
+
- 新增清理配置功能
|
|
504
|
+
|
|
481
505
|
### v1.1.5 (推荐版本)
|
|
482
506
|
|
|
483
507
|
- 支持插值翻译
|