summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--web/react/pages/login.jsx2
-rw-r--r--web/templates/head.html3
-rw-r--r--web/web.go1
4 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 062d956b9..cf64e8861 100644
--- a/Makefile
+++ b/Makefile
@@ -118,6 +118,8 @@ package:
mkdir -p $(DIST_PATH)/web/static/js
cp -L web/static/js/*.min.js $(DIST_PATH)/web/static/js/
cp -L web/static/js/*.min.js.map $(DIST_PATH)/web/static/js/
+ cp -RL web/static/js/react-intl-2.0.0-beta-2 $(DIST_PATH)/web/static/js/
+ cp -RL web/static/i18n $(DIST_PATH)/web/static
cp -RL web/static/config $(DIST_PATH)/web/static
cp -RL web/static/css $(DIST_PATH)/web/static
cp -RL web/static/fonts $(DIST_PATH)/web/static
diff --git a/web/react/pages/login.jsx b/web/react/pages/login.jsx
index e0957a65b..38852ad7c 100644
--- a/web/react/pages/login.jsx
+++ b/web/react/pages/login.jsx
@@ -5,8 +5,6 @@ import * as Client from '../utils/client.jsx';
import Login from '../components/login.jsx';
var IntlProvider = ReactIntl.IntlProvider;
-ReactIntl.addLocaleData(ReactIntlLocaleData.en);
-ReactIntl.addLocaleData(ReactIntlLocaleData.es);
class Root extends React.Component {
constructor() {
diff --git a/web/templates/head.html b/web/templates/head.html
index 89d0dc92b..feff908ce 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -58,6 +58,9 @@
<style id="antiClickjack">body{display:none !important;}</style>
<script>
+ ReactIntl.addLocaleData(ReactIntlLocaleData.en);
+ ReactIntl.addLocaleData(ReactIntlLocaleData.es);
+
window.mm_config = {{ .ClientCfg }};
window.mm_license = {{ .ClientLicense }};
window.mm_team = {{ .Team }};
diff --git a/web/web.go b/web/web.go
index 391b268cd..f73860b67 100644
--- a/web/web.go
+++ b/web/web.go
@@ -51,6 +51,7 @@ func (me *HtmlTemplatePage) Render(c *api.Context, w http.ResponseWriter) {
me.Locale = me.User.Locale
}
+ me.Props["Locale"] = me.Locale
me.SessionTokenIndex = c.SessionTokenIndex
if err := Templates.ExecuteTemplate(w, me.TemplateName, me); err != nil {