mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-16 16:25:56 +02:00
disable plugins translations?
This commit is contained in:
parent
da08536816
commit
0924b8baa6
1 changed files with 18 additions and 11 deletions
|
@ -81,18 +81,25 @@ async function executePluginContentLoading({
|
|||
plugin.loadContent?.(),
|
||||
);
|
||||
|
||||
content = await PerfLogger.async('translatePluginContent()', () =>
|
||||
translatePluginContent({
|
||||
plugin,
|
||||
content,
|
||||
context,
|
||||
}),
|
||||
);
|
||||
// TODO wire
|
||||
const shouldTranslate = false;
|
||||
|
||||
const defaultCodeTranslations =
|
||||
(await PerfLogger.async('getDefaultCodeTranslationMessages()', () =>
|
||||
plugin.getDefaultCodeTranslationMessages?.(),
|
||||
)) ?? {};
|
||||
if (shouldTranslate) {
|
||||
content = await PerfLogger.async('translatePluginContent()', () =>
|
||||
translatePluginContent({
|
||||
plugin,
|
||||
content,
|
||||
context,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// TODO this may not work if default locale is not english?
|
||||
const defaultCodeTranslations = shouldTranslate
|
||||
? (await PerfLogger.async('getDefaultCodeTranslationMessages()', () =>
|
||||
plugin.getDefaultCodeTranslationMessages?.(),
|
||||
)) ?? {}
|
||||
: {};
|
||||
|
||||
if (!plugin.contentLoaded) {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue