From 8f6d9b0f42d44afc3b0406ba848dabe0f721b176 Mon Sep 17 00:00:00 2001 From: Amer Harb <amer.harb@gmail.com> Date: Sat, 25 May 2024 16:20:28 +0200 Subject: [PATCH] add -1 --- webapp/src/utils/adapters/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/src/utils/adapters/index.ts b/webapp/src/utils/adapters/index.ts index 36934a09..c2a37d11 100644 --- a/webapp/src/utils/adapters/index.ts +++ b/webapp/src/utils/adapters/index.ts @@ -67,7 +67,9 @@ export function groupByFilename( if (!output[lang][sourceFile]) { output[lang][sourceFile] = {}; } - const msgIdArray = msgId.split('.').splice(sourceFile.split('/').length); + const msgIdArray = msgId + .split('.') + .splice(sourceFile.split('/').length - 1); const shortId = msgIdArray.join('.'); output[lang][sourceFile][shortId] = text; });