Skip to content

Commit

Permalink
fix: infuse external reousrce path interpolation (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon authored Nov 11, 2021
1 parent 4243d65 commit c4a4e78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit c4a4e78

Please sign in to comment.