mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-30 06:50:36 +02:00
refactor: define own translations in other themes (#5849)
Co-authored-by: Armano <armano2@users.noreply.github.com>
This commit is contained in:
parent
87a486a02f
commit
63bd6b9025
120 changed files with 750 additions and 446 deletions
|
@ -6,9 +6,14 @@
|
|||
*/
|
||||
|
||||
import path from 'path';
|
||||
import {Plugin} from '@docusaurus/types';
|
||||
import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations';
|
||||
import {DocusaurusContext, Plugin} from '@docusaurus/types';
|
||||
|
||||
export default function theme(context: DocusaurusContext): Plugin {
|
||||
const {
|
||||
i18n: {currentLocale},
|
||||
} = context;
|
||||
|
||||
export default function theme(): Plugin {
|
||||
return {
|
||||
name: 'docusaurus-theme-live-codeblock',
|
||||
|
||||
|
@ -16,6 +21,13 @@ export default function theme(): Plugin {
|
|||
return path.resolve(__dirname, './theme');
|
||||
},
|
||||
|
||||
getDefaultCodeTranslationMessages() {
|
||||
return readDefaultCodeTranslationMessages({
|
||||
locale: currentLocale,
|
||||
name: 'theme-live-codeblock',
|
||||
});
|
||||
},
|
||||
|
||||
configureWebpack() {
|
||||
return {
|
||||
resolve: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue