French language

This commit is contained in:
Ben Grant 2021-05-25 15:11:37 +10:00
parent 92c5e0bbfc
commit 4c39bd7e07
10 changed files with 264 additions and 2 deletions

View file

@ -93,7 +93,7 @@ const Donate = ({ onDonate = null }) => {
>
<Button
buttonHeight="30px"
buttonWidth="90px"
buttonWidth={`${Math.max(t('donate.button').length*10, 90)}px`}
type="button"
tabIndex="-1"
title={t('donate.title')}

View file

@ -43,6 +43,11 @@ export const StyledSelect = styled.select`
border-radius: 3px;
outline: none;
transition: border-color .15s, box-shadow .15s;
appearance: none;
background-image: url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><foreignObject width=%22100px%22 height=%22100px%22><div xmlns=%22http://www.w3.org/1999/xhtml%22 style=%22color:${props => encodeURIComponent(props.theme.primary)};font-size:60px;display:flex;align-items:center;justify-content:center;height:100%25;width:100%25%22>▼</div></foreignObject></svg>");
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 1em;
&:focus {
border: 1px solid ${props => props.theme.primary};

View file

@ -92,6 +92,7 @@ const Settings = () => {
'en': 'English',
'de': 'Deutsch',
'es': 'Español',
'fr': 'Français',
'ko': '한국어',
...process.env.NODE_ENV !== 'production' && { 'cimode': 'DEV' },
}}

View file

@ -3,13 +3,15 @@ import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import Backend from 'i18next-http-backend';
import locales from 'res/dayjs_locales';
i18n
.use(LanguageDetector)
.use(Backend)
.use(initReactI18next)
.init({
fallbackLng: 'en',
supportedLngs: ['en', 'de', 'es', 'ko'],
supportedLngs: Object.keys(locales),
ns: 'common',
defaultNS: 'common',
debug: process.env.NODE_ENV !== 'production',

View file

@ -3,6 +3,7 @@ const locales = {
de: () => import('dayjs/locale/de'),
es: () => import('dayjs/locale/es'),
ko: () => import('dayjs/locale/ko'),
fr: () => import('dayjs/locale/fr'),
};
export default locales;