diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-02-22 10:25:11 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-02-22 10:25:11 +0100 |
commit | 42eb17e7e021476227b846d45cc43409aa451b6e (patch) | |
tree | 2a962ee3100aae83c83d27b471d2199ac8954065 /node_modules/pogen | |
parent | b15f40aea5adcfed4d7ed499ec01988955bdc929 (diff) | |
download | wallet-core-42eb17e7e021476227b846d45cc43409aa451b6e.tar.xz |
i18n fixes
Diffstat (limited to 'node_modules/pogen')
-rw-r--r-- | node_modules/pogen/pogen.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/node_modules/pogen/pogen.js b/node_modules/pogen/pogen.js index 1a0c49bf1..ed634ef0d 100644 --- a/node_modules/pogen/pogen.js +++ b/node_modules/pogen/pogen.js @@ -188,15 +188,8 @@ function processFile(sourceFile) { case ts.SyntaxKind.JsxText: { var e = childNode; - var s = e.getText(); - var t = s.split("\n").map(trim).join("\n"); - if (s.length >= 1 && (s[0] === "\n" || s[0] === " ")) { - t = " " + t; - } - if (s.length >= 1 && (s[s.length - 1] === "\n" || s[s.length - 1] === " ")) { - t = t + " "; - } - console.log("got", JSON.stringify(s)); + var s = e.getFullText(); + var t = s.split("\n").map(trim).join(" "); fragments.push(t); } case ts.SyntaxKind.JsxOpeningElement: @@ -219,7 +212,7 @@ function processFile(sourceFile) { } }; ts.forEachChild(node, process); - return fragments.join(""); + return fragments.join("").trim().replace(/ +/g, " "); } function getJsxSingular(node) { var res; |