I18n: Add Chinese (Simplified) (#56739)

* Prevent _old.json files from being created

* Add contrib docs for adding new locale

* add chinese (simplified)
This commit is contained in:
Josh Hunt
2022-10-12 11:12:46 +01:00
committed by GitHub
parent 85e3ed491d
commit 719769ee7c
10 changed files with 62 additions and 23 deletions

View File

@@ -19,7 +19,13 @@ import {
} from '@grafana/ui';
import { DashboardPicker } from 'app/core/components/Select/DashboardPicker';
import { t, Trans } from 'app/core/internationalization';
import { ENGLISH_US, FRENCH_FRANCE, PSEUDO_LOCALE, SPANISH_SPAIN } from 'app/core/internationalization/constants';
import {
CHINESE_SIMPLIFIED,
ENGLISH_US,
FRENCH_FRANCE,
PSEUDO_LOCALE,
SPANISH_SPAIN,
} from 'app/core/internationalization/constants';
import { PreferencesService } from 'app/core/services/PreferencesService';
import { UserPreferencesDTO } from 'app/types';
@@ -43,15 +49,19 @@ const languages: Array<SelectableValue<string>> = [
},
{
value: ENGLISH_US,
label: t('common.locale.en', 'English'),
label: t('common.locale.en-US', 'English'),
},
{
value: SPANISH_SPAIN,
label: t('common.locale.es', 'Spanish'),
label: t('common.locale.es-ES', 'Spanish'),
},
{
value: FRENCH_FRANCE,
label: t('common.locale.fr', 'French'),
label: t('common.locale.fr-FR', 'French'),
},
{
value: CHINESE_SIMPLIFIED,
label: t('common.locale.zh-Hans', 'Chinese (Simplified)'),
},
// TODO: dev only
{