diff options
author | Dessalines <dessalines@users.noreply.github.com> | 2019-08-09 17:14:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-09 17:14:43 -0700 |
commit | 536c3f491546b4546f43a46e7a1a699ca9ac2934 (patch) | |
tree | f080c86e51b9660560ac493cb7f6d9676ea12fbe /ui/src/components/post-listings.tsx | |
parent | 5a1e8aa645c9f0898e765b45c2f362308292db26 (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/post-listings.tsx')
-rw-r--r-- | ui/src/components/post-listings.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/src/components/post-listings.tsx b/ui/src/components/post-listings.tsx index 93b2f606..f5682a7e 100644 --- a/ui/src/components/post-listings.tsx +++ b/ui/src/components/post-listings.tsx @@ -2,6 +2,7 @@ import { Component } from 'inferno'; import { Link } from 'inferno-router'; import { Post } from '../interfaces'; import { PostListing } from './post-listing'; +import { T } from 'inferno-i18next'; interface PostListingsProps { posts: Array<Post>; @@ -19,8 +20,10 @@ export class PostListings extends Component<PostListingsProps, any> { <div> {this.props.posts.length > 0 ? this.props.posts.map(post => <PostListing post={post} showCommunity={this.props.showCommunity} />) : - <div>No posts. {this.props.showCommunity !== undefined && <span>Subscribe to some <Link to="/communities">communities</Link>.</span>} - </div> + <> + <div><T i18nKey="no_posts">#</T></div> + {this.props.showCommunity !== undefined && <div><T i18nKey="subscribe_to_communities">#<Link to="/communities">#</Link></T></div>} + </> } </div> ) |