From c4a4e78c72066b0e3baec36ca8737516568c90a4 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 11 Nov 2021 17:08:08 +0900 Subject: [PATCH] fix: infuse external reousrce path interpolation (#206) --- src/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 9cdc29c..6aa63e7 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -438,7 +438,12 @@ export function splitLocaleMessages ( let buildingPath = '' for (let i = 0; i < groupLen; i++) { if (match[i + 1]) { - buildingPath = `${buildingPath}${match[i + 1] === filename ? filename : match[i + 1] === locale ? l : match[i + 1]}${(i + 1) === groupLen - 1 ? '' : '/'}` + // prettier-ignore + buildingPath = `${buildingPath}${match[i + 1] === filename + ? filename + : match[i + 1] === locale + ? l + : match[i + 1]}${(i === groupLen - 1) ? '' : '/'}` } if (i === groupLen - 1) { buildingPath = `${buildingPath}.json`