diff --git a/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts b/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts index e0440f26688c..4ec710ce0a39 100644 --- a/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-blog/src/__tests__/index.test.ts @@ -71,7 +71,7 @@ const getPlugin = async ( i18n: I18n = DefaultI18N, ) => { const generatedFilesDir: string = path.resolve(siteDir, '.docusaurus'); - const i18nDir = path.join(siteDir, i18n.path, i18n.currentLocale); + const localizationDir = path.join(siteDir, i18n.path, i18n.currentLocale); const siteConfig = { title: 'Hello', baseUrl: '/', @@ -83,7 +83,7 @@ const getPlugin = async ( siteConfig, generatedFilesDir, i18n, - i18nDir, + localizationDir, } as LoadContext, validateOptions({ validate: normalizePluginOptions as Validate< diff --git a/packages/docusaurus-plugin-content-blog/src/index.ts b/packages/docusaurus-plugin-content-blog/src/index.ts index 725451b2804b..f0c1f8cc24ed 100644 --- a/packages/docusaurus-plugin-content-blog/src/index.ts +++ b/packages/docusaurus-plugin-content-blog/src/index.ts @@ -59,7 +59,7 @@ export default async function pluginContentBlog( siteDir, siteConfig, generatedFilesDir, - i18nDir, + localizationDir, i18n: {currentLocale}, } = context; const {onBrokenMarkdownLinks, baseUrl} = siteConfig; @@ -67,7 +67,7 @@ export default async function pluginContentBlog( const contentPaths: BlogContentPaths = { contentPath: path.resolve(siteDir, options.path), contentPathLocalized: getPluginI18nPath({ - i18nDir, + localizationDir, pluginName: 'docusaurus-plugin-content-blog', pluginId: options.id, }), diff --git a/packages/docusaurus-plugin-content-docs/src/cli.ts b/packages/docusaurus-plugin-content-docs/src/cli.ts index f49798f6e222..1818a3f4e22e 100644 --- a/packages/docusaurus-plugin-content-docs/src/cli.ts +++ b/packages/docusaurus-plugin-content-docs/src/cli.ts @@ -85,15 +85,15 @@ export async function cliDocsVersionCommand( await Promise.all( i18n.locales.map(async (locale) => { - // TODO duplicated logic from core; we need to support customization per- - // locale in the future - const i18nDir = path.resolve(siteDir, i18n.path, 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); // Copy docs files. const docsDir = locale === i18n.defaultLocale ? path.resolve(siteDir, docsPath) : getDocsDirPathLocalized({ - i18nDir, + localizationDir, pluginId, versionName: CURRENT_VERSION_NAME, }); @@ -116,7 +116,7 @@ export async function cliDocsVersionCommand( locale === i18n.defaultLocale ? getVersionDocsDirPath(siteDir, pluginId, version) : getDocsDirPathLocalized({ - i18nDir, + localizationDir, pluginId, versionName: version, }); diff --git a/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts b/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts index 2a44137f0153..a52ba1b7d186 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions/__tests__/index.test.ts @@ -38,7 +38,7 @@ describe('readVersionsMetadata', () => { siteDir: simpleSiteDir, baseUrl: '/', i18n: DefaultI18N, - i18nDir: path.join(simpleSiteDir, 'i18n/en'), + localizationDir: path.join(simpleSiteDir, 'i18n/en'), } as LoadContext; const vCurrent: VersionMetadata = { @@ -200,7 +200,7 @@ describe('readVersionsMetadata', () => { siteDir: versionedSiteDir, baseUrl: '/', i18n: DefaultI18N, - i18nDir: path.join(versionedSiteDir, 'i18n/en'), + localizationDir: path.join(versionedSiteDir, 'i18n/en'), } as LoadContext; const vCurrent: VersionMetadata = { @@ -639,7 +639,7 @@ describe('readVersionsMetadata', () => { siteDir: versionedSiteDir, baseUrl: '/', i18n: DefaultI18N, - i18nDir: path.join(versionedSiteDir, 'i18n/en'), + localizationDir: path.join(versionedSiteDir, 'i18n/en'), } as LoadContext; const vCurrent: VersionMetadata = { diff --git a/packages/docusaurus-plugin-content-docs/src/versions/files.ts b/packages/docusaurus-plugin-content-docs/src/versions/files.ts index b7a95975d8d6..2f045717c29e 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions/files.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions/files.ts @@ -55,16 +55,16 @@ export function getVersionSidebarsPath( } export function getDocsDirPathLocalized({ - i18nDir, + localizationDir, pluginId, versionName, }: { - i18nDir: string; + localizationDir: string; pluginId: string; versionName: string; }): string { return getPluginI18nPath({ - i18nDir, + localizationDir, pluginName: 'docusaurus-plugin-content-docs', pluginId, subPaths: [ @@ -172,7 +172,7 @@ export async function getVersionMetadataPaths({ > { const isCurrent = versionName === CURRENT_VERSION_NAME; const contentPathLocalized = getDocsDirPathLocalized({ - i18nDir: context.i18nDir, + localizationDir: context.localizationDir, pluginId: options.id, versionName, }); diff --git a/packages/docusaurus-plugin-content-docs/src/versions/index.ts b/packages/docusaurus-plugin-content-docs/src/versions/index.ts index b4634b8d1ab1..d39bee56198d 100644 --- a/packages/docusaurus-plugin-content-docs/src/versions/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/versions/index.ts @@ -49,7 +49,7 @@ function getVersionEditUrls({ const editDirPath = options.editCurrentVersion ? options.path : contentPath; const editDirPathLocalized = options.editCurrentVersion ? getDocsDirPathLocalized({ - i18nDir: context.i18nDir, + localizationDir: context.localizationDir, versionName: CURRENT_VERSION_NAME, pluginId: options.id, }) diff --git a/packages/docusaurus-plugin-content-pages/src/index.ts b/packages/docusaurus-plugin-content-pages/src/index.ts index 97d0fa8a3e68..7480962d07cc 100644 --- a/packages/docusaurus-plugin-content-pages/src/index.ts +++ b/packages/docusaurus-plugin-content-pages/src/index.ts @@ -48,12 +48,12 @@ export default function pluginContentPages( [admonitions, options.admonitions], ]); } - const {siteConfig, siteDir, generatedFilesDir, i18nDir} = context; + const {siteConfig, siteDir, generatedFilesDir, localizationDir} = context; const contentPaths: PagesContentPaths = { contentPath: path.resolve(siteDir, options.path), contentPathLocalized: getPluginI18nPath({ - i18nDir, + localizationDir, pluginName: 'docusaurus-plugin-content-pages', pluginId: options.id, }), diff --git a/packages/docusaurus-types/src/index.d.ts b/packages/docusaurus-types/src/index.d.ts index 2e47cca91a4c..f21b77f7a9de 100644 --- a/packages/docusaurus-types/src/index.d.ts +++ b/packages/docusaurus-types/src/index.d.ts @@ -425,7 +425,7 @@ export type LoadContext = { * Directory where all source translations for the current locale can be found * in. Constructed with `i18n.path` + `i18n.currentLocale.path` (e.g. i18n/en) */ - i18nDir: string; + localizationDir: string; /** * Duplicated from `siteConfig.baseUrl`, but probably worth keeping. We mutate * `siteConfig` to make `baseUrl` there localized as well, but that's mostly diff --git a/packages/docusaurus-utils/src/__tests__/i18nUtils.test.ts b/packages/docusaurus-utils/src/__tests__/i18nUtils.test.ts index 93178e07d62c..6e8f4e198a7e 100644 --- a/packages/docusaurus-utils/src/__tests__/i18nUtils.test.ts +++ b/packages/docusaurus-utils/src/__tests__/i18nUtils.test.ts @@ -65,7 +65,7 @@ describe('getPluginI18nPath', () => { it('gets correct path', () => { expect( getPluginI18nPath({ - i18nDir: '/i18n/zh-Hans', + localizationDir: '/i18n/zh-Hans', pluginName: 'plugin-content-docs', pluginId: 'community', subPaths: ['foo'], @@ -77,7 +77,7 @@ describe('getPluginI18nPath', () => { it('gets correct path for default plugin', () => { expect( getPluginI18nPath({ - i18nDir: '/i18n/zh-Hans', + localizationDir: '/i18n/zh-Hans', pluginName: 'plugin-content-docs', subPaths: ['foo'], }), @@ -88,7 +88,7 @@ describe('getPluginI18nPath', () => { it('gets correct path when no sub-paths', () => { expect( getPluginI18nPath({ - i18nDir: '/i18n/zh-Hans', + localizationDir: '/i18n/zh-Hans', pluginName: 'plugin-content-docs', }), ).toMatchInlineSnapshot(`"/i18n/zh-Hans/plugin-content-docs"`); diff --git a/packages/docusaurus-utils/src/i18nUtils.ts b/packages/docusaurus-utils/src/i18nUtils.ts index cf2ea710b62f..8c706f1b8ce7 100644 --- a/packages/docusaurus-utils/src/i18nUtils.ts +++ b/packages/docusaurus-utils/src/i18nUtils.ts @@ -46,18 +46,18 @@ export function updateTranslationFileMessages( * expect everything it needs for translations to be found under this path. */ export function getPluginI18nPath({ - i18nDir, + localizationDir, pluginName, pluginId = DEFAULT_PLUGIN_ID, subPaths = [], }: { - i18nDir: string; + localizationDir: string; pluginName: string; pluginId?: string | undefined; subPaths?: string[]; }): string { return path.join( - i18nDir, + localizationDir, // Make it convenient to use for single-instance // ie: return "docs", not "docs-default" nor "docs/default" `${pluginName}${pluginId === DEFAULT_PLUGIN_ID ? '' : `-${pluginId}`}`, diff --git a/packages/docusaurus/src/commands/start.ts b/packages/docusaurus/src/commands/start.ts index 7c060b2a8f05..b4eb42acf793 100644 --- a/packages/docusaurus/src/commands/start.ts +++ b/packages/docusaurus/src/commands/start.ts @@ -81,7 +81,7 @@ export async function start( logger.error(err.stack); }); }, 500); - const {siteConfig, plugins, i18nDir} = props; + const {siteConfig, plugins, localizationDir} = props; const normalizeToSiteDir = (filepath: string) => { if (filepath && path.isAbsolute(filepath)) { @@ -95,7 +95,7 @@ export async function start( .filter(Boolean) .map(normalizeToSiteDir); - const pathsToWatch = [...pluginPaths, props.siteConfigPath, i18nDir]; + const pathsToWatch = [...pluginPaths, props.siteConfigPath, localizationDir]; const pollingOptions = { usePolling: !!cliOptions.poll, diff --git a/packages/docusaurus/src/commands/writeTranslations.ts b/packages/docusaurus/src/commands/writeTranslations.ts index 91bb229fe425..d69014306fcf 100644 --- a/packages/docusaurus/src/commands/writeTranslations.ts +++ b/packages/docusaurus/src/commands/writeTranslations.ts @@ -47,11 +47,11 @@ async function getExtraSourceCodeFilePaths(): Promise { } async function writePluginTranslationFiles({ - i18nDir, + localizationDir, plugin, options, }: { - i18nDir: string; + localizationDir: string; plugin: InitializedPlugin; options: WriteTranslationsOptions; }) { @@ -64,7 +64,7 @@ async function writePluginTranslationFiles({ await Promise.all( translationFiles.map(async (translationFile) => { await writePluginTranslations({ - i18nDir, + localizationDir, plugin, translationFile, options, @@ -83,7 +83,7 @@ export async function writeTranslations( config: options.config, locale: options.locale, }); - const {i18nDir} = context; + const {localizationDir} = context; const plugins = await initPlugins(context); const locale = options.locale ?? context.i18n.defaultLocale; @@ -114,11 +114,11 @@ Available locales are: ${context.i18n.locales.join(',')}.`, defaultCodeMessages, }); - await writeCodeTranslations({i18nDir}, codeTranslations, options); + await writeCodeTranslations({localizationDir}, codeTranslations, options); await Promise.all( plugins.map(async (plugin) => { - await writePluginTranslationFiles({i18nDir, plugin, options}); + await writePluginTranslationFiles({localizationDir, plugin, options}); }), ); } diff --git a/packages/docusaurus/src/server/index.ts b/packages/docusaurus/src/server/index.ts index 11461b7130c4..b470b38ef145 100644 --- a/packages/docusaurus/src/server/index.ts +++ b/packages/docusaurus/src/server/index.ts @@ -85,11 +85,11 @@ export async function loadContext( const siteConfig: DocusaurusConfig = {...initialSiteConfig, baseUrl}; - // TODO allow customizing i18nDir per-locale - const i18nDir = path.resolve(siteDir, i18n.path, i18n.currentLocale); + // TODO allow customizing localizationDir per-locale + const localizationDir = path.resolve(siteDir, i18n.path, i18n.currentLocale); const codeTranslationFileContent = - (await readCodeTranslationFileContent({i18nDir})) ?? {}; + (await readCodeTranslationFileContent({localizationDir})) ?? {}; // We only need key->message for code translations const codeTranslations = _.mapValues( @@ -100,7 +100,7 @@ export async function loadContext( return { siteDir, generatedFilesDir, - i18nDir, + localizationDir, siteConfig, siteConfigPath, outDir, @@ -126,7 +126,7 @@ export async function load(options: LoadContextOptions): Promise { outDir, baseUrl, i18n, - i18nDir, + localizationDir, codeTranslations: siteCodeTranslations, } = context; const {plugins, pluginsRouteConfigs, globalData} = await loadPlugins(context); @@ -248,7 +248,7 @@ ${Object.entries(registry) outDir, baseUrl, i18n, - i18nDir, + localizationDir, generatedFilesDir, routes: pluginsRouteConfigs, routesPaths, diff --git a/packages/docusaurus/src/server/plugins/index.ts b/packages/docusaurus/src/server/plugins/index.ts index 06ad5fcef73c..73fba212b289 100644 --- a/packages/docusaurus/src/server/plugins/index.ts +++ b/packages/docusaurus/src/server/plugins/index.ts @@ -56,7 +56,7 @@ export async function loadPlugins(context: LoadContext): Promise<{ const translationFiles = await Promise.all( rawTranslationFiles.map((translationFile) => localizePluginTranslationFile({ - i18nDir: context.i18nDir, + localizationDir: context.localizationDir, translationFile, plugin, }), diff --git a/packages/docusaurus/src/server/translations/__tests__/translations.test.ts b/packages/docusaurus/src/server/translations/__tests__/translations.test.ts index bdcae29c1656..7d2ce1cb2811 100644 --- a/packages/docusaurus/src/server/translations/__tests__/translations.test.ts +++ b/packages/docusaurus/src/server/translations/__tests__/translations.test.ts @@ -44,7 +44,7 @@ async function createTmpTranslationFile( } return { - i18nDir: path.join(siteDir, 'i18n/en'), + localizationDir: path.join(siteDir, 'i18n/en'), readFile() { return fs.readJSON(filePath); }, @@ -60,9 +60,9 @@ describe('writeCodeTranslations', () => { }); it('creates new translation file', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile(null); + const {localizationDir, readFile} = await createTmpTranslationFile(null); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message'}, key2: {message: 'key2 message'}, @@ -82,9 +82,9 @@ describe('writeCodeTranslations', () => { }); it('creates new translation file with prefix', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile(null); + const {localizationDir, readFile} = await createTmpTranslationFile(null); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message'}, key2: {message: 'key2 message'}, @@ -106,14 +106,14 @@ describe('writeCodeTranslations', () => { }); it('appends missing translations', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile({ + const {localizationDir, readFile} = await createTmpTranslationFile({ key1: {message: 'key1 message'}, key2: {message: 'key2 message'}, key3: {message: 'key3 message'}, }); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message new'}, key2: {message: 'key2 message new'}, @@ -135,12 +135,12 @@ describe('writeCodeTranslations', () => { }); it('appends missing.* translations with prefix', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile({ + const {localizationDir, readFile} = await createTmpTranslationFile({ key1: {message: 'key1 message'}, }); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message new'}, key2: {message: 'key2 message new'}, @@ -160,12 +160,12 @@ describe('writeCodeTranslations', () => { }); it('overrides missing translations', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile({ + const {localizationDir, readFile} = await createTmpTranslationFile({ key1: {message: 'key1 message'}, }); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message new'}, key2: {message: 'key2 message new'}, @@ -185,12 +185,12 @@ describe('writeCodeTranslations', () => { }); it('overrides missing translations with prefix', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile({ + const {localizationDir, readFile} = await createTmpTranslationFile({ key1: {message: 'key1 message'}, }); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message new'}, key2: {message: 'key2 message new'}, @@ -211,14 +211,14 @@ describe('writeCodeTranslations', () => { }); it('always overrides message description', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile({ + const {localizationDir, readFile} = await createTmpTranslationFile({ key1: {message: 'key1 message', description: 'key1 desc'}, key2: {message: 'key2 message', description: 'key2 desc'}, key3: {message: 'key3 message', description: undefined}, }); await writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message new', description: undefined}, key2: {message: 'key2 message new', description: 'key2 desc new'}, @@ -238,9 +238,9 @@ describe('writeCodeTranslations', () => { }); it('does not create empty translation files', async () => { - const {i18nDir, readFile} = await createTmpTranslationFile(null); + const {localizationDir, readFile} = await createTmpTranslationFile(null); - await writeCodeTranslations({i18nDir}, {}, {}); + await writeCodeTranslations({localizationDir}, {}, {}); await expect(readFile()).rejects.toThrowError( /ENOENT: no such file or directory, open /, @@ -249,14 +249,14 @@ describe('writeCodeTranslations', () => { }); it('throws for invalid content', async () => { - const {i18nDir} = await createTmpTranslationFile( + const {localizationDir} = await createTmpTranslationFile( // @ts-expect-error: bad content on purpose {bad: 'content'}, ); await expect(() => writeCodeTranslations( - {i18nDir}, + {localizationDir}, { key1: {message: 'key1 message'}, }, @@ -271,16 +271,16 @@ describe('writeCodeTranslations', () => { describe('writePluginTranslations', () => { it('writes plugin translations', async () => { - const i18nDir = await createTmpSiteDir(); + const localizationDir = await createTmpSiteDir(); const filePath = path.join( - i18nDir, + localizationDir, 'my-plugin-name', 'my/translation/file.json', ); await writePluginTranslations({ - i18nDir, + localizationDir, locale: 'fr', translationFile: { path: 'my/translation/file', @@ -306,10 +306,10 @@ describe('writePluginTranslations', () => { }); it('writes plugin translations consecutively with different options', async () => { - const i18nDir = await createTmpSiteDir(); + const localizationDir = await createTmpSiteDir(); const filePath = path.join( - i18nDir, + localizationDir, 'my-plugin-name-my-plugin-id', 'my/translation/file.json', ); @@ -319,7 +319,7 @@ describe('writePluginTranslations', () => { options?: WriteTranslationsOptions, ) { return writePluginTranslations({ - i18nDir, + localizationDir, locale: 'fr', translationFile: { path: 'my/translation/file', @@ -379,11 +379,11 @@ describe('writePluginTranslations', () => { }); it('throws with explicit extension', async () => { - const i18nDir = await createTmpSiteDir(); + const localizationDir = await createTmpSiteDir(); await expect(() => writePluginTranslations({ - i18nDir, + localizationDir, locale: 'fr', translationFile: { path: 'my/translation/file.json', @@ -407,7 +407,7 @@ describe('writePluginTranslations', () => { describe('localizePluginTranslationFile', () => { it('does not localize if localized file does not exist', async () => { - const i18nDir = await createTmpSiteDir(); + const localizationDir = await createTmpSiteDir(); const translationFile: TranslationFile = { path: 'my/translation/file', @@ -419,7 +419,7 @@ describe('localizePluginTranslationFile', () => { }; const localizedTranslationFile = await localizePluginTranslationFile({ - i18nDir, + localizationDir, locale: 'fr', translationFile, plugin: { @@ -432,10 +432,10 @@ describe('localizePluginTranslationFile', () => { }); it('normalizes partially localized translation files', async () => { - const i18nDir = await createTmpSiteDir(); + const localizationDir = await createTmpSiteDir(); await fs.outputJSON( - path.join(i18nDir, 'my-plugin-name', 'my/translation/file.json'), + path.join(localizationDir, 'my-plugin-name', 'my/translation/file.json'), { key2: {message: 'key2 message localized'}, key4: {message: 'key4 message localized'}, @@ -452,7 +452,7 @@ describe('localizePluginTranslationFile', () => { }; const localizedTranslationFile = await localizePluginTranslationFile({ - i18nDir, + localizationDir, locale: 'fr', translationFile, plugin: { @@ -478,13 +478,13 @@ describe('localizePluginTranslationFile', () => { describe('readCodeTranslationFileContent', () => { async function testReadTranslation(val: TranslationFileContent) { - const {i18nDir} = await createTmpTranslationFile(val); - return readCodeTranslationFileContent({i18nDir}); + const {localizationDir} = await createTmpTranslationFile(val); + return readCodeTranslationFileContent({localizationDir}); } it("returns undefined if file does't exist", async () => { await expect( - readCodeTranslationFileContent({i18nDir: 'foo'}), + readCodeTranslationFileContent({localizationDir: 'foo'}), ).resolves.toBeUndefined(); }); diff --git a/packages/docusaurus/src/server/translations/translations.ts b/packages/docusaurus/src/server/translations/translations.ts index 7f4368701d34..83d19495bffc 100644 --- a/packages/docusaurus/src/server/translations/translations.ts +++ b/packages/docusaurus/src/server/translations/translations.ts @@ -28,7 +28,7 @@ export type WriteTranslationsOptions = { }; type TranslationContext = { - i18nDir: string; + localizationDir: string; }; const TranslationFileContentSchema = Joi.object() @@ -142,7 +142,7 @@ Maybe you should remove them? ${unknownKeys}`; } function getCodeTranslationsFilePath(context: TranslationContext): string { - return path.join(context.i18nDir, CODE_TRANSLATIONS_FILE_NAME); + return path.join(context.localizationDir, CODE_TRANSLATIONS_FILE_NAME); } export async function readCodeTranslationFileContent( @@ -175,7 +175,7 @@ function addTranslationFileExtension(translationFilePath: string) { } function getPluginTranslationFilePath({ - i18nDir, + localizationDir, plugin, translationFilePath, }: TranslationContext & { @@ -183,7 +183,7 @@ function getPluginTranslationFilePath({ translationFilePath: string; }): string { const dirPath = getPluginI18nPath({ - i18nDir, + localizationDir, pluginName: plugin.name, pluginId: plugin.options.id, }); @@ -192,7 +192,7 @@ function getPluginTranslationFilePath({ } export async function writePluginTranslations({ - i18nDir, + localizationDir, plugin, translationFile, options, @@ -203,7 +203,7 @@ export async function writePluginTranslations({ }): Promise { const filePath = getPluginTranslationFilePath({ plugin, - i18nDir, + localizationDir, translationFilePath: translationFile.path, }); await writeTranslationFileContent({ @@ -214,7 +214,7 @@ export async function writePluginTranslations({ } export async function localizePluginTranslationFile({ - i18nDir, + localizationDir, plugin, translationFile, }: TranslationContext & { @@ -223,7 +223,7 @@ export async function localizePluginTranslationFile({ }): Promise { const filePath = getPluginTranslationFilePath({ plugin, - i18nDir, + localizationDir, translationFilePath: translationFile.path, });