Skip to content

Commit

Permalink
fix: handle single file i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman committed Oct 12, 2023
1 parent c498a5a commit 8b47d55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/decap-cms-core/src/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8b47d55

Please sign in to comment.