From 536c3f491546b4546f43a46e7a1a699ca9ac2934 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 9 Aug 2019 17:14:43 -0700 Subject: 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. --- ui/src/components/create-post.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ui/src/components/create-post.tsx') 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 { @@ -10,7 +12,7 @@ export class CreatePost extends Component { } 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 {
-
Create a Post
+
#
-- cgit v1.2.3