From af4110b2ed9654986c8ef150d7ca9e76f326191c Mon Sep 17 00:00:00 2001
From: enahum <nahumhbl@gmail.com>
Date: Tue, 14 Jun 2016 14:53:26 -0300
Subject: Add German Localization (#3328)

---
 webapp/i18n/i18n.jsx | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'webapp/i18n/i18n.jsx')

diff --git a/webapp/i18n/i18n.jsx b/webapp/i18n/i18n.jsx
index 3a66c5c33..71356d75f 100644
--- a/webapp/i18n/i18n.jsx
+++ b/webapp/i18n/i18n.jsx
@@ -1,12 +1,14 @@
 // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
 // See License.txt for license information.
 
+const de = require('!!file?name=i18n/[name].[ext]!./de.json');
 const es = require('!!file?name=i18n/[name].[ext]!./es.json');
 const fr = require('!!file?name=i18n/[name].[ext]!./fr.json');
 const ja = require('!!file?name=i18n/[name].[ext]!./ja.json');
 const pt_BR = require('!!file?name=i18n/[name].[ext]!./pt-BR.json'); //eslint-disable-line camelcase
 
 import {addLocaleData} from 'react-intl';
+import deLocaleData from 'react-intl/locale-data/de';
 import enLocaleData from 'react-intl/locale-data/en';
 import esLocaleData from 'react-intl/locale-data/es';
 import frLocaleData from 'react-intl/locale-data/fr';
@@ -15,6 +17,11 @@ import ptLocaleData from 'react-intl/locale-data/pt';
 
 // should match the values in model/config.go
 const languages = {
+    de: {
+        value: 'de',
+        name: 'Deutsche (Beta)',
+        url: de
+    },
     en: {
         value: 'en',
         name: 'English',
@@ -81,6 +88,7 @@ export function isLanguageAvailable(locale) {
 export function safariFix(callback) {
     require.ensure([
         'intl',
+        'intl/locale-data/jsonp/de.js',
         'intl/locale-data/jsonp/en.js',
         'intl/locale-data/jsonp/es.js',
         'intl/locale-data/jsonp/fr.js',
@@ -88,6 +96,7 @@ export function safariFix(callback) {
         'intl/locale-data/jsonp/pt.js'
     ], (require) => {
         require('intl');
+        require('intl/locale-data/jsonp/de.js');
         require('intl/locale-data/jsonp/en.js');
         require('intl/locale-data/jsonp/es.js');
         require('intl/locale-data/jsonp/fr.js');
@@ -99,6 +108,7 @@ export function safariFix(callback) {
 
 export function doAddLocaleData() {
     addLocaleData(enLocaleData);
+    addLocaleData(deLocaleData);
     addLocaleData(esLocaleData);
     addLocaleData(frLocaleData);
     addLocaleData(jaLocaleData);
-- 
cgit v1.2.3-1-g7c22

