Skip to content

Commit fd5cb60

Browse files
KaneFreemanmartinjagodic
authored andcommitted
fix: handle single file i18n (#6942)
1 parent b858b64 commit fd5cb60

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)