add translation keys (#246)
* Fix i18n tsc issue "t" can return null by default. This was already disabled in the config, but it had no effect on tsc. * Fix translation in "DefaultNavBar" key was missing and since this is a constant the translation wouldn't update in case the language got changed after first load. * Enable typing for i18n translation keys * Add translation keys
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
|
||||
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
||||
import { SvgIconTypeMap } from '@mui/material/SvgIcon/SvgIcon';
|
||||
import { TFuncKey } from 'i18next';
|
||||
|
||||
export type TranslationKey = TFuncKey;
|
||||
|
||||
export interface IExtension {
|
||||
name: string;
|
||||
@@ -301,7 +304,7 @@ export interface SourcePreferences {
|
||||
|
||||
export interface NavbarItem {
|
||||
path: string;
|
||||
title: string;
|
||||
title: TranslationKey;
|
||||
SelectedIconComponent: OverridableComponent<SvgIconTypeMap<{}, 'svg'>>;
|
||||
IconComponent: OverridableComponent<SvgIconTypeMap<{}, 'svg'>>;
|
||||
show: 'mobile' | 'desktop' | 'both';
|
||||
|
||||
Reference in New Issue
Block a user