@npm-questionpro/wick-ui-i18n 2.0.0-next.13 → 2.0.0-next.15
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
package/src/transform.js
CHANGED
|
@@ -10,7 +10,7 @@ import {parse} from '@babel/parser'
|
|
|
10
10
|
import _traverse from '@babel/traverse'
|
|
11
11
|
import {getComponentTree} from './debug.js'
|
|
12
12
|
import {transformTemplateLiteralExpression} from './transformTemplateLiteral.js'
|
|
13
|
-
import {
|
|
13
|
+
import {transformJsxTextWithEntities} from './transformReactTextWithEntities.js'
|
|
14
14
|
import {recordWtCall, transformWtTemplateLiteral} from './transformWtCalls.js'
|
|
15
15
|
|
|
16
16
|
const traverse = _traverse.default || _traverse
|
|
@@ -213,7 +213,7 @@ export function transformFile(code, id, processor) {
|
|
|
213
213
|
// translatable text segments are still wrapped while entities stay put.
|
|
214
214
|
const rawSource = code.slice(path.node.start, path.node.end)
|
|
215
215
|
if (HTML_ENTITY_RE.test(rawSource)) {
|
|
216
|
-
if (
|
|
216
|
+
if (transformJsxTextWithEntities(path, rawSource, ms, processor, id)) {
|
|
217
217
|
needsImport = true
|
|
218
218
|
}
|
|
219
219
|
return
|
|
@@ -73,7 +73,7 @@ function splitSegment(raw) {
|
|
|
73
73
|
* @param {string} id - Source file path (for collision warnings).
|
|
74
74
|
* @returns {boolean} `true` when a replacement was written.
|
|
75
75
|
*/
|
|
76
|
-
export function
|
|
76
|
+
export function transformJsxTextWithEntities(
|
|
77
77
|
path,
|
|
78
78
|
rawSource,
|
|
79
79
|
ms,
|