taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 04d742103a0e0f8f880d3332ff985557e04b4b59
parent 706c8e085e2286a69648407c878aecb8867662a7
Author: Sebastian <sebasjm@taler-systems.com>
Date:   Mon, 15 Dec 2025 12:43:17 -0300

fix #10781

Diffstat:
Mpackages/pogen/src/potextract.test.ts | 26++++++++++++++++++++++++++
Mpackages/pogen/src/potextract.ts | 5+----
2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/packages/pogen/src/potextract.test.ts b/packages/pogen/src/potextract.test.ts @@ -127,3 +127,29 @@ msgid "another key" msgstr ""`, ); }); + + +test("should support nested tags", (t) => { + t.deepEqual( + process(` + <p class="warning"> + <i18n.Translate> + Purging an instance{" "} + <b> + <i18n.Translate>This cannot be undone!</i18n.Translate> + </b> + </i18n.Translate> + `), + `#. screenid: 5 +#: test.tsx:6 +#, c-format +msgid "Purging an instance %1$s" +msgstr "" + +#. screenid: 5 +#: test.tsx:9 +#, c-format +msgid "This cannot be undone!" +msgstr ""`, + ); +}); diff --git a/packages/pogen/src/potextract.ts b/packages/pogen/src/potextract.ts @@ -470,9 +470,7 @@ function processNode( outChunks.push(`msgstr ""\n`); outChunks.push("\n"); } - return; - } - if (arrayEq(path, ["i18n", "TranslateSwitch"])) { + } else if (arrayEq(path, ["i18n", "TranslateSwitch"])) { const { line } = ts.getLineAndCharacterOfPosition(sourceFile, node.pos); const comment = getComment( sourceFile, @@ -506,7 +504,6 @@ function processNode( outChunks.push(`msgstr[1] ""\n`); outChunks.push(`\n`); } - return; } break; case ts.SyntaxKind.CallExpression: {