mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-26 13:08:58 +02:00
Fix CLI unit tests + refactor getLocaleConfig method
This commit is contained in:
parent
b640334248
commit
f6f3e6cdb4
12 changed files with 38 additions and 25 deletions
|
@ -9,8 +9,8 @@ import path from 'path';
|
|||
import fs from 'fs-extra';
|
||||
import {
|
||||
getPluginI18nPath,
|
||||
getLocaleConfig,
|
||||
DEFAULT_PLUGIN_ID,
|
||||
getCurrentLocaleConfig,
|
||||
} from '@docusaurus/utils';
|
||||
import {
|
||||
VERSIONS_JSON_FILE,
|
||||
|
@ -191,7 +191,7 @@ export async function getVersionMetadataPaths({
|
|||
> {
|
||||
const isCurrent = versionName === CURRENT_VERSION_NAME;
|
||||
|
||||
const shouldTranslate = getCurrentLocaleConfig(context.i18n).translate;
|
||||
const shouldTranslate = getLocaleConfig(context.i18n).translate;
|
||||
const contentPathLocalized = shouldTranslate
|
||||
? getDocsDirPathLocalized({
|
||||
localizationDir: context.localizationDir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue