vue-i18n-extract-plugin 1.0.67 → 1.0.69

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/README.md CHANGED
@@ -61,10 +61,10 @@ const defaultOptions = {
61
61
  outputJsonFileInPlugin: true, // 是否在插件中输出 JSON 文件
62
62
  outputJsonFileDebounceTimeInPlugin: 2000, // 输出 JSON 文件的防抖时间
63
63
  translateInterval: 1000, // 自动翻译的间隔时间
64
- excludedCall: [], // 排除的调用函数名称数组,目前已内置的函数请参阅:https://github.com/semdy/vue-i18n-extract-plugin/blob/main/lib/utils.js#L189
64
+ excludedCall: [], // 排除的调用函数名称数组,目前已内置的函数请参阅:https://github.com/semdy/vue-i18n-extract-plugin/blob/main/lib/utils.js#L244
65
65
  includePath: ['src/'], // 包含路径的数组
66
66
  excludedPath: [], // 排除路径的数组 refer to https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#how-to-exclude-directory-from-reading
67
- allowedExtensions: [".vue", ".nvue", ".uvue", ".tsx", ".ts", ".jsx", ".js"], // 允许提取的文件扩展名
67
+ allowedExtensions: [".vue", ".nvue", ".uvue", ".tsx", ".ts", ".jsx", ".js", ".uts"], // 允许提取的文件扩展名
68
68
  fromLang: 'zh-cn', // 源语言, 目前支持提取的语言有:zh-cn(zh-tw), en, ja, ko, ru
69
69
  translateLangKeys: ["zh-tw", "en"], // 需要翻译为的语言键
70
70
  i18nPkgImportPath: "@/i18n", // i18n语言包导入路径
package/lib/extract.js CHANGED
@@ -501,7 +501,11 @@ function processVueFile(code, options) {
501
501
  return {
502
502
  changed: true,
503
503
  code: code
504
- .replace(scriptContent, padEmptyLine(transformedScript))
504
+ .replace(
505
+ scriptContent,
506
+ padEmptyLine(transformedScript.replaceAll("$", "┇┇┇"))
507
+ )
508
+ .replaceAll("┇┇┇", "$")
505
509
  .replace(templateContent, padEmptyLine(transformedTemplate))
506
510
  };
507
511
  }
package/lib/options.js CHANGED
@@ -18,7 +18,7 @@ const defaultOptions = {
18
18
  excludedCall: [], // 排除的调用函数名称数组
19
19
  includePath: ["src/"], // 包含路径的数组
20
20
  excludedPath: [], // 排除路径的数组
21
- allowedExtensions: [".vue", ".nvue", ".uvue", ".tsx", ".ts", ".jsx", ".js"], // 允许提取的文件扩展名
21
+ allowedExtensions: [".vue", ".nvue", ".uvue", ".tsx", ".ts", ".jsx", ".js", ".uts"], // 允许提取的文件扩展名
22
22
  fromLang: "zh-cn", // 源语言, 目前支持提取的语言有:zh-cn(zh-tw), en, ja, ko, ru
23
23
  translateLangKeys: ["zh-tw", "en"], // 需要翻译为的语言键
24
24
  i18nPkgImportPath: "@/i18n", // i18n语言包导入路径
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-i18n-extract-plugin",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "main": "lib/index.js",
5
5
  "types": "types/index.d.ts",
6
6
  "bin": {