### What problem does this PR solve? Add Support for german language ### Type of change - [x] New Feature (non-breaking change which adds functionality)tags/v0.17.2
| # Exclude hash-like temporary files like 9b5ad71b2ce5302211f9c61530b329a4922fc6a4 | # Exclude hash-like temporary files like 9b5ad71b2ce5302211f9c61530b329a4922fc6a4 | ||||
| *[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]* | *[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]* | ||||
| .lh/ |
| import vi_VN from 'antd/locale/vi_VN'; | import vi_VN from 'antd/locale/vi_VN'; | ||||
| import zhCN from 'antd/locale/zh_CN'; | import zhCN from 'antd/locale/zh_CN'; | ||||
| import zh_HK from 'antd/locale/zh_HK'; | import zh_HK from 'antd/locale/zh_HK'; | ||||
| import deDE from 'antd/locale/de_DE'; | |||||
| import dayjs from 'dayjs'; | import dayjs from 'dayjs'; | ||||
| import advancedFormat from 'dayjs/plugin/advancedFormat'; | import advancedFormat from 'dayjs/plugin/advancedFormat'; | ||||
| import customParseFormat from 'dayjs/plugin/customParseFormat'; | import customParseFormat from 'dayjs/plugin/customParseFormat'; | ||||
| 'zh-TRADITIONAL': zh_HK, | 'zh-TRADITIONAL': zh_HK, | ||||
| vi: vi_VN, | vi: vi_VN, | ||||
| 'pt-BR': pt_BR, | 'pt-BR': pt_BR, | ||||
| de: deDE, | |||||
| }; | }; | ||||
| const queryClient = new QueryClient(); | const queryClient = new QueryClient(); |
| 'Vietnamese', | 'Vietnamese', | ||||
| 'Japanese', | 'Japanese', | ||||
| 'Portuguese BR', | 'Portuguese BR', | ||||
| 'German', | |||||
| ]; | ]; | ||||
| export const LanguageMap = { | export const LanguageMap = { | ||||
| Vietnamese: 'Tiếng việt', | Vietnamese: 'Tiếng việt', | ||||
| Japanese: '日本語', | Japanese: '日本語', | ||||
| 'Portuguese BR': 'Português BR', | 'Portuguese BR': 'Português BR', | ||||
| German: 'German', | |||||
| }; | }; | ||||
| export enum LanguageAbbreviation { | export enum LanguageAbbreviation { | ||||
| Es = 'es', | Es = 'es', | ||||
| Vi = 'vi', | Vi = 'vi', | ||||
| PtBr = 'pt-BR', | PtBr = 'pt-BR', | ||||
| De = 'de', | |||||
| } | } | ||||
| export const LanguageAbbreviationMap = { | export const LanguageAbbreviationMap = { | ||||
| [LanguageAbbreviation.Vi]: 'Tiếng việt', | [LanguageAbbreviation.Vi]: 'Tiếng việt', | ||||
| [LanguageAbbreviation.Ja]: '日本語', | [LanguageAbbreviation.Ja]: '日本語', | ||||
| [LanguageAbbreviation.PtBr]: 'Português BR', | [LanguageAbbreviation.PtBr]: 'Português BR', | ||||
| [LanguageAbbreviation.De]: 'Deutsch', | |||||
| }; | }; | ||||
| export const LanguageTranslationMap = { | export const LanguageTranslationMap = { | ||||
| Vietnamese: 'vi', | Vietnamese: 'vi', | ||||
| Japanese: 'ja', | Japanese: 'ja', | ||||
| 'Portuguese BR': 'pt-br', | 'Portuguese BR': 'pt-br', | ||||
| German: 'de', | |||||
| }; | }; | ||||
| export enum FileMimeType { | export enum FileMimeType { |
| import translation_id from './id'; | import translation_id from './id'; | ||||
| import translation_ja from './ja'; | import translation_ja from './ja'; | ||||
| import translation_pt_br from './pt-br'; | import translation_pt_br from './pt-br'; | ||||
| import translation_de from './de'; | |||||
| import { createTranslationTable, flattenObject } from './until'; | import { createTranslationTable, flattenObject } from './until'; | ||||
| import translation_vi from './vi'; | import translation_vi from './vi'; | ||||
| import translation_zh from './zh'; | import translation_zh from './zh'; | ||||
| [LanguageAbbreviation.Es]: translation_es, | [LanguageAbbreviation.Es]: translation_es, | ||||
| [LanguageAbbreviation.Vi]: translation_vi, | [LanguageAbbreviation.Vi]: translation_vi, | ||||
| [LanguageAbbreviation.PtBr]: translation_pt_br, | [LanguageAbbreviation.PtBr]: translation_pt_br, | ||||
| [LanguageAbbreviation.De]: translation_de, | |||||
| }; | }; | ||||
| const enFlattened = flattenObject(translation_en); | const enFlattened = flattenObject(translation_en); | ||||
| const viFlattened = flattenObject(translation_vi); | const viFlattened = flattenObject(translation_vi); | ||||
| const jaFlattened = flattenObject(translation_ja); | const jaFlattened = flattenObject(translation_ja); | ||||
| const pt_brFlattened = flattenObject(translation_pt_br); | const pt_brFlattened = flattenObject(translation_pt_br); | ||||
| const zh_traditionalFlattened = flattenObject(translation_zh_traditional); | const zh_traditionalFlattened = flattenObject(translation_zh_traditional); | ||||
| const deFlattened = flattenObject(translation_de); | |||||
| export const translationTable = createTranslationTable( | export const translationTable = createTranslationTable( | ||||
| [ | [ | ||||
| enFlattened, | enFlattened, | ||||
| zh_traditionalFlattened, | zh_traditionalFlattened, | ||||
| jaFlattened, | jaFlattened, | ||||
| pt_brFlattened, | pt_brFlattened, | ||||
| deFlattened, | |||||
| ], | ], | ||||
| ['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL', 'ja', 'pt-BR'], | |||||
| ['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL', 'ja', 'pt-BR', 'Deutsch'], | |||||
| ); | ); | ||||
| i18n | i18n | ||||
| .use(initReactI18next) | .use(initReactI18next) |
| 'zh-TRADITIONAL', | 'zh-TRADITIONAL', | ||||
| 'ja', | 'ja', | ||||
| 'pt-br', | 'pt-br', | ||||
| 'German', | |||||
| ]} | ]} | ||||
| /> | /> | ||||
| ); | ); |