From bfc8b9989e404cb2eb16c85453c3fc427ebf08dd Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Tue, 28 Jan 2025 20:56:07 +0100 Subject: [PATCH] changed partial key suffix --- build-resx.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-resx.js b/build-resx.js index ec432e7..85327c0 100644 --- a/build-resx.js +++ b/build-resx.js @@ -21,6 +21,10 @@ const mappings = { 'adguardpartner.com': 'legal-github-docs-aff', }; +const getPartialKeySuffix = (partIndex) => { + return `.__part__.${partIndex + 1}`; +} + console.log('Starting document processing...'); if (!fs.existsSync(basePath)) { @@ -68,7 +72,7 @@ for (const [sourceDir, crowdinDir] of Object.entries(mappings)) { process.exit(1); } - const key = `${baseKey}.${i + 1}`; + const key = `${baseKey}${getPartialKeySuffix(i)}`; console.log(`Generated key: ${key}`); xmlBuilder = xmlBuilder.ele('data').att('name', key) .ele('value').dat(part).up()