Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit d9b20cc

Browse files
KaneFreemanmartinjagodic
authored andcommitted
fix: handle single file i18n (decaporg#6942)
1 parent 00fa637 commit d9b20cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/decap-cms-core/src/backend.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,12 @@ function i18nRulestring(ruleString: string, { defaultLocale, structure }: I18nIn
314314
if (structure === I18N_STRUCTURE.MULTIPLE_FOLDERS) {
315315
return `${defaultLocale}\\/${ruleString}`;
316316
}
317-
return `${ruleString}\\.${defaultLocale}\\..*`;
317+
318+
if (structure === I18N_STRUCTURE.MULTIPLE_FILES) {
319+
return `${ruleString}\\.${defaultLocale}\\..*`;
320+
}
321+
322+
return ruleString;
318323
}
319324

320325
function collectionRegex(collection: Collection): RegExp | undefined {

0 commit comments

Comments
 (0)