From a46f6da1502235ad9e01159269842e732cc926bc Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 15 Aug 2016 11:19:22 -0400 Subject: [PATCH 1/3] Add fur, sq and te to language list --- languages.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/languages.json b/languages.json index bcabe056f..9d4968857 100644 --- a/languages.json +++ b/languages.json @@ -42,6 +42,7 @@ "sc": "Sardu", "sk": "Slovenčina", "sl": "Slovenščina", + "sq": "shqiptar", "fi": "suomi", "sv": "Svenska", "nai": "Tepehuan", @@ -52,6 +53,7 @@ "bg": "Български", "el": "Ελληνικά", "fa": "فارسی", + "fur": "furlan", "he": "עִבְרִית", "hi": "हिन्दी", "hy": "Հայերեն", @@ -67,6 +69,7 @@ "my": "မြန်မာဘာသာ", "ru": "Русский", "sr": "Српски", + "te": "తెలుగు", "th": "ไทย", "uk": "Українська", "zh-cn": "简体中文", From 0f93d32666640752b31588fe8e6465b108f9578f Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 15 Aug 2016 11:41:57 -0400 Subject: [PATCH 2/3] Move up Friulian --- languages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.json b/languages.json index 9d4968857..3967e889e 100644 --- a/languages.json +++ b/languages.json @@ -16,6 +16,7 @@ "es": "Español", "eu": "Euskara", "fr": "Français", + "fur": "furlan", "ga": "Gaeilge", "gd": "Gàidhlig", "gl": "Galego", @@ -53,7 +54,6 @@ "bg": "Български", "el": "Ελληνικά", "fa": "فارسی", - "fur": "furlan", "he": "עִבְרִית", "hi": "हिन्दी", "hy": "Հայերեն", From f3de2d1d28019482af59102bffa26052f0ffa170 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 15 Aug 2016 14:53:31 -0400 Subject: [PATCH 3/3] re-order languages and also get language for dropdown from `IntlProvider` rather than the window, so that we have one point of truth --- languages.json | 48 +++++++++---------- src/components/footer/www/footer.jsx | 8 ++-- .../languagechooser/languagechooser.jsx | 2 +- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/languages.json b/languages.json index 3967e889e..411834551 100644 --- a/languages.json +++ b/languages.json @@ -1,9 +1,11 @@ { - "en": "English", + "ab": "Аҧсшәа", + "ar": "العربية", "an": "Aragonés", "ast": "Asturianu", "id": "Bahasa Indonesia", "ms": "Bahasa Melayu", + "bg": "Български", "ca": "Català", "cs": "Česky", "cy": "Cymraeg", @@ -12,65 +14,63 @@ "de": "Deutsch", "yum": "Edible Scratch", "et": "Eesti", + "el": "Ελληνικά", + "en": "English", "eo": "Esperanto", "es": "Español", "eu": "Euskara", + "fa": "فارسی", "fr": "Français", "fur": "furlan", "ga": "Gaeilge", "gd": "Gàidhlig", "gl": "Galego", + "ko": "한국어", + "hy": "Հայերեն", + "he": "עִבְרִית", + "hi": "हिन्दी", "hr": "Hrvatski", "is": "Íslenska", "it": "Italiano", + "kn": "ಭಾಷೆ-ಹೆಸರು", "rw": "Kinyarwanda", + "km": "សំលៀកបំពាក", "ht": "Kreyòl", "ku": "Kurdî", "la": "Latina", "lv": "Latviešu", "lt": "Lietuvių", + "mk": "Македонски", "hu": "Magyar", + "ml": "മലയാളം", "mt": "Malti", + "mr": "मराठी", "cat": "Meow", + "mn": "Монгол хэл", + "my": "မြန်မာဘာသာ", "nl": "Nederlands", + "ja": "日本語", + "ja-hr": "にほんご", "nb": "Norsk Bokmål", "nn": "Norsk Nynorsk", "uz": "Oʻzbekcha", + "th": "ไทย", "pl": "Polski", "pt": "Português", "pt-br": "Português Brasileiro", "ro": "Română", + "ru": "Русский", "sc": "Sardu", + "sq": "shqiptar", "sk": "Slovenčina", "sl": "Slovenščina", - "sq": "shqiptar", + "sr": "Српски", "fi": "suomi", "sv": "Svenska", + "te": "తెలుగు", "nai": "Tepehuan", "vi": "Tiếng Việt", "tr": "Türkçe", - "ab": "Аҧсшәа", - "ar": "العربية", - "bg": "Български", - "el": "Ελληνικά", - "fa": "فارسی", - "he": "עִבְרִית", - "hi": "हिन्दी", - "hy": "Հայերեն", - "ja": "日本語", - "ja-hr": "にほんご", - "km": "សំលៀកបំពាក", - "kn": "ಭಾಷೆ-ಹೆಸರು", - "ko": "한국어", - "mk": "Македонски", - "ml": "മലയാളം", - "mn": "Монгол хэл", - "mr": "मराठी", - "my": "မြန်မာဘာသာ", - "ru": "Русский", - "sr": "Српски", - "te": "తెలుగు", - "th": "ไทย", "uk": "Українська", "zh-cn": "简体中文", "zh-tw": "正體中文" diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index a34a0f06e..e243a5a35 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -1,5 +1,7 @@ var React = require('react'); -var FormattedMessage = require('react-intl').FormattedMessage; +var ReactIntl = require('react-intl'); +var FormattedMessage = ReactIntl.FormattedMessage; +var injectIntl = ReactIntl.injectIntl; var FooterBox = require('../container/footer.jsx'); var LanguageChooser = require('../../languagechooser/languagechooser.jsx'); @@ -204,7 +206,7 @@ var Footer = React.createClass({ - +

@@ -216,4 +218,4 @@ var Footer = React.createClass({ } }); -module.exports = Footer; +module.exports = injectIntl(Footer); diff --git a/src/components/languagechooser/languagechooser.jsx b/src/components/languagechooser/languagechooser.jsx index bb6dc5910..c538fb923 100644 --- a/src/components/languagechooser/languagechooser.jsx +++ b/src/components/languagechooser/languagechooser.jsx @@ -16,7 +16,7 @@ var LanguageChooser = React.createClass({ getDefaultProps: function () { return { languages: languages, - locale: window._locale + locale: 'en' }; }, onSetLanguage: function (name, value) {