Commit 3b7e09d2 authored by Eugen Rochko's avatar Eugen Rochko

Merge branch 'master' into 'master'

I18n: Activate Welsh, Albanian and Chinese (Taiwan) translations

See merge request mastodon/joinmastodon!58
parents 0db80a8c 0c753aa4
......@@ -36,6 +36,7 @@ const languages = [
'',
'ar',
'cs',
'cy',
'de',
'en',
'es',
......@@ -48,6 +49,8 @@ const languages = [
'pt',
'ru',
'sk',
'sq',
'tr',
'zh',
];
......
......@@ -28,8 +28,10 @@ import it from 'react-intl/locale-data/it';
import ar from 'react-intl/locale-data/ar';
import tr from 'react-intl/locale-data/tr';
import nl from 'react-intl/locale-data/nl';
import cy from 'react-intl/locale-data/cy';
import sq from 'react-intl/locale-data/sq';
addLocaleData([...en, ...pl, ...cs, ...fr, ...es, ...ja, ...ko, ...de, ...pt, ...zh, ...ru, ...it, ...ar, ...tr, ...nl]);
addLocaleData([...en, ...pl, ...cs, ...fr, ...es, ...ja, ...ko, ...de, ...pt, ...zh, ...ru, ...it, ...ar, ...tr, ...nl, ...cy, ...sq]);
const messages = require.context('./locales/', false, /\.json$/);
......
......@@ -4,23 +4,27 @@ import Dropdown from './Dropdown';
import flagEn from 'twemoji/2/svg/1f1ec-1f1e7.svg';
import flagFr from 'twemoji/2/svg/1f1eb-1f1f7.svg';
import flagPl from 'twemoji/2/svg/1f1f5-1f1f1.svg';
import flagCs from 'twemoji/2/svg/1f1e8-1f1ff.svg';
import flagCz from 'twemoji/2/svg/1f1e8-1f1ff.svg';
import flagEs from 'twemoji/2/svg/1f1ea-1f1f8.svg';
import flagJa from 'twemoji/2/svg/1f1ef-1f1f5.svg';
import flagKo from 'twemoji/2/svg/1f1f0-1f1f7.svg';
import flagDe from 'twemoji/2/svg/1f1e9-1f1ea.svg';
import flagBr from 'twemoji/2/svg/1f1e7-1f1f7.svg';
import flagCn from 'twemoji/2/svg/1f1e8-1f1f3.svg';
import flagTw from 'twemoji/2/svg/1f1f9-1f1fc.svg';
import flagRu from 'twemoji/2/svg/1f1f7-1f1fa.svg';
import flagIt from 'twemoji/2/svg/1f1ee-1f1f9.svg';
import flagAr from 'twemoji/2/svg/1f1e6-1f1ea.svg';
import flagTr from 'twemoji/2/svg/1f1f9-1f1f7.svg';
import flagNL from 'twemoji/2/svg/1f1f3-1f1f1.svg';
import flagWls from 'twemoji/2/svg/1f3f4-e0067-e0062-e0077-e006c-e0073-e007f.svg';
import flagAl from 'twemoji/2/svg/1f1e6-1f1f1.svg';
const options = [
{ value: 'en', label: <span><img src={flagEn} className='emoji' alt='' /> English</span> },
{ value: 'ar', label: <span><img src={flagAr} className='emoji' alt='' /> العربية</span> },
{ value: 'cs', label: <span><img src={flagCs} className='emoji' alt='' /> Čeština</span> },
{ value: 'cs', label: <span><img src={flagCz} className='emoji' alt='' /> Čeština</span> },
{ value: 'cy', label: <span><img src={flagWls} className='emoji' alt='' /> Cymraeg</span> },
{ value: 'de', label: <span><img src={flagDe} className='emoji' alt='' /> Deutsch</span> },
{ value: 'es', label: <span><img src={flagEs} className='emoji' alt='' /> Español</span> },
{ value: 'fr', label: <span><img src={flagFr} className='emoji' alt='' /> Français</span> },
......@@ -31,8 +35,10 @@ const options = [
{ value: 'pl', label: <span><img src={flagPl} className='emoji' alt='' /> Polski</span> },
{ value: 'pt-BR', label: <span><img src={flagBr} className='emoji' alt='' /> Português do Brasil</span> },
{ value: 'ru', label: <span><img src={flagRu} className='emoji' alt='' /> Русский</span> },
{ value: 'sq', label: <span><img src={flagAl} className='emoji' alt='' /> Shqip</span> },
{ value: 'tr', label: <span><img src={flagTr} className='emoji' alt='' /> Türkçe</span> },
{ value: 'zh', label: <span><img src={flagCn} className='emoji' alt='' /> 简体中文</span> },
{ value: 'zh-TW', label: <span><img src={flagTw} className='emoji' alt='' /> 繁體中文(臺灣)</span> },
];
export default ({ value, onChange }) => (
......
......@@ -114,6 +114,7 @@ class Wizard extends React.PureComponent {
{ value: 'ar', text: 'العربية' },
{ value: 'ca', text: 'Català' },
{ value: 'cs', text: 'Česky' },
{ value: 'cy', text: 'Cymraeg' },
{ value: 'de', text: 'Deutsch' },
{ value: 'en', text: 'English' },
{ value: 'es', text: 'Español' },
......@@ -127,6 +128,8 @@ class Wizard extends React.PureComponent {
{ value: 'pt', text: 'Português' },
{ value: 'ru', text: 'Русский' },
{ value: 'sk', text: 'Slovensky' },
{ value: 'sq', text: 'Shqip' },
{ value: 'tr', text: 'Türkçe' },
{ value: 'zh', text: '中文' },
]}
caretIcon={caretIcon}
......
[
]
\ No newline at end of file
......@@ -5,7 +5,7 @@ import {
FILTER_LANGUAGE_CHANGE,
} from './actions';
const supportedLocales = ['en', 'fr', 'pl', 'cs', 'es', 'ja', 'ko', 'de','pt-BR', 'ar', 'tr', 'sq', 'nl-NL'];
const supportedLocales = ['en', 'fr', 'pl', 'cs', 'es', 'ja', 'ko', 'de','pt-BR', 'ar', 'tr', 'sq', 'nl-NL', 'cy', 'zh', 'zh-TW'];
const initialLocale = () => {
const lang = navigator.language.split('-')[0];
......
......@@ -3,5 +3,5 @@ const manageTranslations = require('react-intl-translations-manager').default;
manageTranslations({
messagesDirectory: 'build/messages',
translationsDirectory: 'src/locales/',
languages: ['en', 'fr', 'pl', 'cs', 'es', 'ja', 'ko', 'de', 'pt-BR', 'zh', 'ru', 'it', 'ar', 'tr', 'sq', 'nl-NL']
languages: ['en', 'fr', 'pl', 'cs', 'es', 'ja', 'ko', 'de', 'pt-BR', 'zh', 'zh-TW', 'ru', 'it', 'ar', 'tr', 'sq', 'nl-NL', 'cy']
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment