fix(docs): versioning CLI should copy localized translation file current.json to version-<v>.json (#10875)

Co-authored-by: Sungchang Ha <bryan98@naver.com>
This commit is contained in:
jkboxomine 2025-01-31 20:50:13 +09:00 committed by GitHub
parent bc3445c344
commit 3b72bb43db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 0 deletions

View file

@ -75,6 +75,21 @@ export function getDocsDirPathLocalized({
});
}
export function getPluginDirPathLocalized({
localizationDir,
pluginId,
}: {
localizationDir: string;
pluginId: string;
}): string {
return getPluginI18nPath({
localizationDir,
pluginName: 'docusaurus-plugin-content-docs',
pluginId,
subPaths: [],
});
}
/** `community` => `[siteDir]/community_versions.json` */
export function getVersionsFilePath(siteDir: string, pluginId: string): string {
return path.join(siteDir, addPluginIdPrefix(VERSIONS_JSON_FILE, pluginId));