feat: allow customizing localization path of each locale (#7624)

This commit is contained in:
Joshua Chen 2022-06-17 17:07:35 +08:00 committed by GitHub
parent 39e3e3715e
commit 1b9bec1042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 254 additions and 30 deletions

View file

@ -85,9 +85,11 @@ export async function cliDocsVersionCommand(
await Promise.all(
i18n.locales.map(async (locale) => {
// TODO duplicated logic from core, so duplicate comment as well: we need
// to support customization per-locale in the future
const localizationDir = path.resolve(siteDir, i18n.path, locale);
const localizationDir = path.resolve(
siteDir,
i18n.path,
i18n.localeConfigs[locale]!.path,
);
// Copy docs files.
const docsDir =
locale === i18n.defaultLocale