mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-17 16:47: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,6 +81,10 @@ async function executePluginContentLoading({
|
||||||
plugin.loadContent?.(),
|
plugin.loadContent?.(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// TODO wire
|
||||||
|
const shouldTranslate = false;
|
||||||
|
|
||||||
|
if (shouldTranslate) {
|
||||||
content = await PerfLogger.async('translatePluginContent()', () =>
|
content = await PerfLogger.async('translatePluginContent()', () =>
|
||||||
translatePluginContent({
|
translatePluginContent({
|
||||||
plugin,
|
plugin,
|
||||||
|
@ -88,11 +92,14 @@ async function executePluginContentLoading({
|
||||||
context,
|
context,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const defaultCodeTranslations =
|
// TODO this may not work if default locale is not english?
|
||||||
(await PerfLogger.async('getDefaultCodeTranslationMessages()', () =>
|
const defaultCodeTranslations = shouldTranslate
|
||||||
|
? (await PerfLogger.async('getDefaultCodeTranslationMessages()', () =>
|
||||||
plugin.getDefaultCodeTranslationMessages?.(),
|
plugin.getDefaultCodeTranslationMessages?.(),
|
||||||
)) ?? {};
|
)) ?? {}
|
||||||
|
: {};
|
||||||
|
|
||||||
if (!plugin.contentLoaded) {
|
if (!plugin.contentLoaded) {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue