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:
@@ -16,6 +16,7 @@ import MultiSelectListPreference from 'components/sourceConfiguration/MultiSelec
|
||||
import List from '@mui/material/List';
|
||||
import cloneObject from 'util/cloneObject';
|
||||
import { SourcePreferences } from 'typings';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
function getPrefComponent(type: string) {
|
||||
switch (type) {
|
||||
@@ -35,10 +36,11 @@ function getPrefComponent(type: string) {
|
||||
}
|
||||
|
||||
export default function SourceConfigure() {
|
||||
const { t } = useTranslation();
|
||||
const { setTitle, setAction } = useContext(NavbarContext);
|
||||
|
||||
useEffect(() => {
|
||||
setTitle('Source Configuration');
|
||||
setTitle(t('source.configuration.title'));
|
||||
setAction(null);
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user