mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 00:39:45 +02:00
feat(v2): Add localeDropdown navbar item type + i18n localeConfigs field (#3916)
* Add localeDropdown navbar item type * fix type + add localeConfigs test
This commit is contained in:
parent
3570aa06c8
commit
aff656182c
12 changed files with 189 additions and 4 deletions
5
packages/docusaurus-types/src/index.d.ts
vendored
5
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -92,9 +92,14 @@ export type TranslationFileContent = Record<string, TranslationMessage>;
|
|||
export type TranslationFile = {path: string; content: TranslationFileContent};
|
||||
export type TranslationFiles = TranslationFile[];
|
||||
|
||||
export type I18nLocaleConfig = {
|
||||
label: string;
|
||||
};
|
||||
|
||||
export type I18nConfig = {
|
||||
defaultLocale: string;
|
||||
locales: [string, ...string[]];
|
||||
localeConfigs: Record<string, I18nLocaleConfig>;
|
||||
};
|
||||
|
||||
export type I18n = I18nConfig & {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue