@npm-questionpro/wick-ui-i18n 0.6.0 → 0.7.0

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.
Files changed (2) hide show
  1. package/index.js +16 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -7,9 +7,21 @@ const traverse = _traverse.default || _traverse;
7
7
 
8
8
  class TranslationProcessor {
9
9
  constructor(options) {
10
- this.components = new Set(options.components || ["WuButton"]);
10
+ this.components = new Set(options.components);
11
11
  this.ignoreComponents = new Set(
12
- options.ignoreComponents || ["WuIcon", "WuTranslateProvider"],
12
+ options.ignoreComponents || [
13
+ "WuIcon",
14
+ "WuTranslateProvider",
15
+ "WuHelpButton",
16
+ "WuActivityLog",
17
+ "WuAppHeader",
18
+ "WuCopyToClipboard",
19
+ "WuMenuIcon",
20
+ "WuScrollArea",
21
+ "WuDrawer",
22
+ "WuLoader",
23
+ "WuContentEditor",
24
+ ],
13
25
  );
14
26
  this.dictionary = new Map();
15
27
  this.debugEnabled = options.debug || false;
@@ -58,8 +70,8 @@ class TranslationProcessor {
58
70
  const hasWrapper = attrs.some(
59
71
  (a) => a.name?.name === "data-i18n-wrapper",
60
72
  );
61
- // const isTarget = this.components.has(name) || name?.startsWith("Wu");
62
- const isTarget = this.components.has(name);
73
+ const isTarget = this.components.has(name) || name?.startsWith("Wu");
74
+ // const isTarget = this.components.has(name);
63
75
 
64
76
  if (hasWrapper || isTarget) {
65
77
  targetFound = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm-questionpro/wick-ui-i18n",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "ISC",
5
5
  "description": "Auto-translation AST wrapper for Wick UI",
6
6
  "type": "module",