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

Commit

Permalink
fix: handle single file i18n (decaporg#6942)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman authored and martinjagodic committed Oct 17, 2023
1 parent 00fa637 commit d9b20cc
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 d9b20cc

Please sign in to comment.