summaryrefslogtreecommitdiffstats
path: root/ui/src/components/create-post.tsx
diff options
context:
space:
mode:
authorDessalines <dessalines@users.noreply.github.com>2019-08-09 17:14:43 -0700
committerGitHub <noreply@github.com>2019-08-09 17:14:43 -0700
commit536c3f491546b4546f43a46e7a1a699ca9ac2934 (patch)
treef080c86e51b9660560ac493cb7f6d9676ea12fbe /ui/src/components/create-post.tsx
parent5a1e8aa645c9f0898e765b45c2f362308292db26 (diff)
Adding support for internationalization / i18n (#189)
* Still not working * Starting to work on internationalization * Main done. * i18n translations first pass. * Localization testing mostly done. * Second front end pass. * Added a few more translations. * Adding back end translations.
Diffstat (limited to 'ui/src/components/create-post.tsx')
-rw-r--r--ui/src/components/create-post.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/src/components/create-post.tsx b/ui/src/components/create-post.tsx
index e09bcf70..dd93a3c5 100644
--- a/ui/src/components/create-post.tsx
+++ b/ui/src/components/create-post.tsx
@@ -1,6 +1,8 @@
import { Component } from 'inferno';
import { PostForm } from './post-form';
import { WebSocketService } from '../services';
+import { i18n } from '../i18next';
+import { T } from 'inferno-i18next';
export class CreatePost extends Component<any, any> {
@@ -10,7 +12,7 @@ export class CreatePost extends Component<any, any> {
}
componentDidMount() {
- document.title = `Create Post - ${WebSocketService.Instance.site.name}`;
+ document.title = `${i18n.t('create_post')} - ${WebSocketService.Instance.site.name}`;
}
render() {
@@ -18,7 +20,7 @@ export class CreatePost extends Component<any, any> {
<div class="container">
<div class="row">
<div class="col-12 col-lg-6 offset-lg-3 mb-4">
- <h5>Create a Post</h5>
+ <h5><T i18nKey="create_post">#</T></h5>
<PostForm onCreate={this.handlePostCreate} prevCommunityName={this.prevCommunityName} />
</div>
</div>