Skip to content

Commit 8b47d55

Browse files
committed
fix: handle single file i18n
1 parent c498a5a commit 8b47d55

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)