From 8b47d55225abdb42e15db7c0cfb31a0f3f5d314f Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Thu, 12 Oct 2023 11:50:41 -0400 Subject: [PATCH] fix: handle single file i18n --- packages/decap-cms-core/src/backend.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/decap-cms-core/src/backend.ts b/packages/decap-cms-core/src/backend.ts index 2150cd984fd5..0f31fc8889de 100644 --- a/packages/decap-cms-core/src/backend.ts +++ b/packages/decap-cms-core/src/backend.ts @@ -314,7 +314,12 @@ function i18nRulestring(ruleString: string, { defaultLocale, structure }: I18nIn if (structure === I18N_STRUCTURE.MULTIPLE_FOLDERS) { return `${defaultLocale}\\/${ruleString}`; } - return `${ruleString}\\.${defaultLocale}\\..*`; + + if (structure === I18N_STRUCTURE.MULTIPLE_FILES) { + return `${ruleString}\\.${defaultLocale}\\..*`; + } + + return ruleString; } function collectionRegex(collection: Collection): RegExp | undefined {