initial pass at internationalization

This commit is contained in:
or-else
2018-10-23 16:39:01 +03:00
parent a2f075f4fb
commit 8b02f39557
2 changed files with 39 additions and 19 deletions
+8 -3
View File
@@ -1,6 +1,6 @@
<!--
DEVELOPMENT version of the web app.
It links to online babel transformer and non-babelified app script
It links to online babel transformer and the original JSX app script.
-->
<!DOCTYPE html>
@@ -35,6 +35,10 @@
<!-- Localization support -->
<script crossorigin src="https://unpkg.com/prop-types@15/prop-types.js"></script>
<script crossorigin src="https://unpkg.com/react-intl@2/dist/react-intl.js"></script>
<script>
// Extract react-intl objects
var {IntlProvider, FormattedMessage} = ReactIntl;
</script>
<!-- Firebase push notifications. -->
<script crossorigin src="https://unpkg.com/firebase@5.5.5/firebase-app.js"></script>
<script crossorigin src="https://unpkg.com/firebase@5.5.5/firebase-messaging.js"></script>
@@ -50,9 +54,10 @@
<script type="text/babel" src="src/webapp.jsx"></script>
<script type="text/babel">
ReactDOM.render(
<ReactIntl.IntlProvider locale={navigator.language}>
<IntlProvider
locale={navigator.language}>
<TinodeWeb />
</ReactIntl.IntlProvider>,
</IntlProvider>,
document.getElementById('mountPoint')
);
</script>