Skip to content

Commit

Permalink
fix: handle single file i18n (#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 b858b64 commit fd5cb60
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 fd5cb60

Please sign in to comment.