summaryrefslogtreecommitdiff
path: root/packages/pogen
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-04-21 15:13:51 -0300
committerSebastian <sebasjm@gmail.com>2024-04-22 08:55:22 -0300
commit56c2e76a346894b84c484c725673c290b77fb8a6 (patch)
tree78f6f45f24a1597d851838a24007e913b99157cd /packages/pogen
parentff3d8d46a633b50c4039c76d88ffda8b55966373 (diff)
downloadwallet-core-56c2e76a346894b84c484c725673c290b77fb8a6.tar.gz
wallet-core-56c2e76a346894b84c484c725673c290b77fb8a6.tar.bz2
wallet-core-56c2e76a346894b84c484c725673c290b77fb8a6.zip
challenger ui i18n
Diffstat (limited to 'packages/pogen')
-rw-r--r--packages/pogen/src/potextract.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/pogen/src/potextract.ts b/packages/pogen/src/potextract.ts
index 3e9a95ded..243d44c6f 100644
--- a/packages/pogen/src/potextract.ts
+++ b/packages/pogen/src/potextract.ts
@@ -171,12 +171,12 @@ function processFile(
}
function formatMsgLine(head: string, msg: string) {
+ const m = msg.match(/(.*\n|.+$)/g)
+ if (!m) return;
// Do escaping, wrap break at newlines
console.log("head", JSON.stringify(head));
console.log("msg", JSON.stringify(msg));
- let parts = msg
- .match(/(.*\n|.+$)/g)
- .map((x) => x.replace(/\n/g, "\\n").replace(/"/g, '\\"'))
+ let parts = m.map((x) => x.replace(/\n/g, "\\n").replace(/"/g, '\\"'))
.map((p) => wordwrap(p))
.reduce((a, b) => a.concat(b));
if (parts.length == 1) {