[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 04/10: adding self closing jsx element
From: |
gnunet |
Subject: |
[taler-wallet-core] 04/10: adding self closing jsx element |
Date: |
Thu, 24 Feb 2022 16:51:11 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit 7774f3508f6afa6abdc116558ea2c019b79ab33b
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Feb 23 16:12:34 2022 -0300
adding self closing jsx element
---
packages/pogen/src/potextract.ts | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/packages/pogen/src/potextract.ts b/packages/pogen/src/potextract.ts
index 5cc085ef..8961c8da 100644
--- a/packages/pogen/src/potextract.ts
+++ b/packages/pogen/src/potextract.ts
@@ -19,8 +19,7 @@
*/
import * as ts from "typescript";
import * as fs from "fs";
-import * as os from "os";
-import path = require("path/posix");
+import * as path from "path"
function wordwrap(str: string, width: number = 80): string[] {
var regex = ".{1," + width + "}(\\s|$)|\\S+(\\s|$)";
@@ -146,7 +145,7 @@ function processFile(
outChunks.push(`#. ${cl}\n`);
}
}
- const fn = path.relative(process.cwd(), sourceFile.fileName);
+ const fn = path.posix.relative(process.cwd(), sourceFile.fileName);
outChunks.push(`#: ${fn}:${line + 1}\n`);
outChunks.push(`#, c-format\n`);
}
@@ -218,6 +217,7 @@ function processFile(
}
case ts.SyntaxKind.JsxOpeningElement:
break;
+ case ts.SyntaxKind.JsxSelfClosingElement:
case ts.SyntaxKind.JsxElement:
fragments.push(`%${holeNum[0]++}$s`);
break;
@@ -229,16 +229,13 @@ function processFile(
case ts.SyntaxKind.JsxClosingElement:
break;
default:
+ console.log("unhandled node type: ", childNode.kind)
let lc = ts.getLineAndCharacterOfPosition(
childNode.getSourceFile(),
childNode.getStart(),
);
console.error(
- `unrecognized syntax in JSX Element ${
- ts.SyntaxKind[childNode.kind]
- } (${childNode.getSourceFile().fileName}:${lc.line + 1}:${
- lc.character + 1
- }`,
+ `unrecognized syntax in JSX Element
${ts.SyntaxKind[childNode.kind]}
(${childNode.getSourceFile().fileName}:${lc.line + 1}:${lc.character + 1}`,
);
break;
}
@@ -420,7 +417,7 @@ export function potextract() {
!prog.isSourceFileDefaultLibrary(x),
);
- //console.log(ownFiles.map((x) => x.fileName));
+ // console.log(ownFiles.map((x) => x.fileName));
const chunks = [];
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (7647d077 -> 191914e6), gnunet, 2022/02/24
- [taler-wallet-core] 02/10: add pogen as dependency, gnunet, 2022/02/24
- [taler-wallet-core] 04/10: adding self closing jsx element,
gnunet <=
- [taler-wallet-core] 01/10: add i18n where was missing, gnunet, 2022/02/24
- [taler-wallet-core] 03/10: we are force to use i18n.Translate, otherwise pogen won't find the tag, gnunet, 2022/02/24
- [taler-wallet-core] 10/10: added tr to supported langs, gnunet, 2022/02/24
- [taler-wallet-core] 09/10: updated tr with the latest strings, gnunet, 2022/02/24
- [taler-wallet-core] 07/10: spanish translation, gnunet, 2022/02/24
- [taler-wallet-core] 06/10: added spanish with some examples, gnunet, 2022/02/24
- [taler-wallet-core] 05/10: updated strings from code, gnunet, 2022/02/24
- [taler-wallet-core] 08/10: added ja lang and implemented transalation switch, gnunet, 2022/02/24