linkmore-intl-generator
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -256,2 +256,16 @@ "use strict"; | ||
/** | ||
* 处理三元表达式 | ||
*/ | ||
file | ||
.getDescendantsOfKind(ts_morph_1.SyntaxKind.ConditionalExpression) | ||
.forEach((Variable) => { | ||
Variable.getDescendantsOfKind(ts_morph_1.SyntaxKind.StringLiteral).forEach((literal) => { | ||
const text = this.stripQuotation(literal.getText(false).trim()); | ||
if (this.haveChineseReg.test(text)) { | ||
const targetText = replacer(text); | ||
literal.replaceWithText(`${targetText}/* ts-morph: ${text} */`); | ||
} | ||
}); | ||
}); | ||
/** | ||
* 其他的统一处理 | ||
@@ -258,0 +272,0 @@ */ |
{ | ||
"name": "linkmore-intl-generator", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -301,2 +301,19 @@ import fs from 'fs'; | ||
/** | ||
* 处理三元表达式 | ||
*/ | ||
file | ||
.getDescendantsOfKind(SyntaxKind.ConditionalExpression) | ||
.forEach((Variable) => { | ||
Variable.getDescendantsOfKind(SyntaxKind.StringLiteral).forEach( | ||
(literal) => { | ||
const text = this.stripQuotation(literal.getText(false).trim()); | ||
if (this.haveChineseReg.test(text)) { | ||
const targetText = replacer(text); | ||
literal.replaceWithText(`${targetText}/* ts-morph: ${text} */`); | ||
} | ||
} | ||
); | ||
}); | ||
/** | ||
* 其他的统一处理 | ||
@@ -303,0 +320,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56380
1239