import { PostListings } from './post-listings';
import { SortSelect } from './sort-select';
import { Sidebar } from './sidebar';
-import {
- wsJsonToRes,
- routeSortTypeToEnum,
- fetchLimit,
- postRefetchSeconds,
- toast,
-} from '../utils';
+import { wsJsonToRes, routeSortTypeToEnum, fetchLimit, toast } from '../utils';
- import { T } from 'inferno-i18next';
import { i18n } from '../i18next';
interface State {
</li>
<li class="nav-item">
<Link class="nav-link" to="/modlog">
- <T i18nKey="modlog">#</T>
- { i18n.t('modlog') }
++ {i18n.t('modlog')}
</Link>
</li>
<li class="nav-item">
<a class="nav-link" href={'/docs/index.html'}>
- <T i18nKey="docs">#</T>
- { i18n.t('docs') }
++ {i18n.t('docs')}
</a>
</li>
<li class="nav-item">
<Link class="nav-link" to="/sponsors">
- <T i18nKey="donate">#</T>
- { i18n.t('donate') }
++ {i18n.t('donate')}
</Link>
</li>
<li class="nav-item">
<a class="nav-link" href={repoUrl}>
- <T i18nKey="code">#</T>
- { i18n.t('code') }
++ {i18n.t('code')}
</a>
</li>
</ul>
)}
<ul class="my-2 list-inline">
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_online"
- interpolation={{ count: this.state.siteRes.online }}
- >
- #
- </T>
- {i18n.t('number_online', { count: this.state.site.online })}
++ {i18n.t('number_online', { count: this.state.siteRes.online })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_users"
- interpolation={{
- count: this.state.siteRes.site.number_of_users,
- }}
- >
- #
- </T>
+ {i18n.t('number_of_users', {
- count: this.state.site.site.number_of_users,
++ count: this.state.siteRes.site.number_of_users,
+ })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_communities"
- interpolation={{
- count: this.state.siteRes.site.number_of_communities,
- }}
- >
- #
- </T>
+ {i18n.t('number_of_communities', {
- count: this.state.site.site.number_of_communities,
++ count: this.state.siteRes.site.number_of_communities,
+ })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_posts"
- interpolation={{
- count: this.state.siteRes.site.number_of_posts,
- }}
- >
- #
- </T>
+ {i18n.t('number_of_posts', {
- count: this.state.site.site.number_of_posts,
++ count: this.state.siteRes.site.number_of_posts,
+ })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_comments"
- interpolation={{
- count: this.state.siteRes.site.number_of_comments,
- }}
- >
- #
- </T>
+ {i18n.t('number_of_comments', {
- count: this.state.site.site.number_of_comments,
++ count: this.state.siteRes.site.number_of_comments,
+ })}
</li>
<li className="list-inline-item">
<Link className="badge badge-secondary" to="/modlog">
</li>
</ul>
<ul class="mt-1 list-inline small mb-0">
- <li class="list-inline-item">
- <T i18nKey="admins" class="d-inline">
- #
- </T>
- :
- </li>
+ <li class="list-inline-item">{i18n.t('admins')}:</li>
- {this.state.site.admins.map(admin => (
+ {this.state.siteRes.admins.map(admin => (
<li class="list-inline-item">
<Link class="text-info" to={`/u/${admin.name}`}>
{admin.avatar && showAvatars() && (
</form>
)}
<ul class="my-1 list-inline">
- <li className="list-inline-item">
- <Link className="badge badge-secondary" to="/communities">
- {community.category_name}
- </Link>
+ <li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_online"
- interpolation={{ count: this.props.online }}
- >
- #
- </T>
++ {i18n.t('number_online', { count: this.props.online })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_subscribers"
- interpolation={{ count: community.number_of_subscribers }}
- >
- #
- </T>
+ {i18n.t('number_of_subscribers', {
+ count: community.number_of_subscribers,
+ })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_posts"
- interpolation={{ count: community.number_of_posts }}
- >
- #
- </T>
+ {i18n.t('number_of_posts', {
+ count: community.number_of_posts,
+ })}
</li>
<li className="list-inline-item badge badge-secondary">
- <T
- i18nKey="number_of_comments"
- interpolation={{ count: community.number_of_comments }}
- >
- #
- </T>
+ {i18n.t('number_of_comments', {
+ count: community.number_of_comments,
+ })}
</li>
+ <li className="list-inline-item">
+ <Link className="badge badge-secondary" to="/communities">
+ {community.category_name}
+ </Link>
+ </li>
<li className="list-inline-item">
<Link
className="badge badge-secondary"
topMessage() {
return (
<div>
-- <h5>
- <T i18nKey="donate_to_lemmy">#</T>
- { i18n.t('donate_to_lemmy') }
-- </h5>
++ <h5>{i18n.t('donate_to_lemmy')}</h5>
<p>
<T i18nKey="sponsor_message">
#<a href="https://github.com/dessalines/lemmy">#</a>
</T>
</p>
<a class="btn btn-secondary" href="https://www.patreon.com/dessalines">
- <T i18nKey="support_on_patreon">#</T>
- { i18n.t('support_on_patreon') }
++ {i18n.t('support_on_patreon')}
</a>
</div>
);
sponsors() {
return (
<div class="container">
-- <h5>
- <T i18nKey="sponsors">#</T>
- { i18n.t('sponsors') }
-- </h5>
-- <p>
- <T i18nKey="general_sponsors">#</T>
- { i18n.t('general_sponsors') }
-- </p>
++ <h5>{i18n.t('sponsors')}</h5>
++ <p>{i18n.t('general_sponsors')}</p>
<div class="row card-columns">
{highlighted.map(s => (
<div class="card bg-primary col-12 col-md-2 font-weight-bold">
bitcoin() {
return (
<div>
-- <h5>
- <T i18nKey="crypto">#</T>
- { i18n.t('crypto') }
-- </h5>
++ <h5>{i18n.t('crypto')}</h5>
<div class="table-responsive">
<table class="table table-hover text-center">
<tbody>
<tr>
-- <td>
- <T i18nKey="bitcoin">#</T>
- { i18n.t('bitcoin') }
-- </td>
++ <td>{i18n.t('bitcoin')}</td>
<td>
<code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
</td>
</tr>
<tr>
-- <td>
- <T i18nKey="ethereum">#</T>
- { i18n.t('ethereum') }
-- </td>
++ <td>{i18n.t('ethereum')}</td>
<td>
<code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
</td>
</tr>
<tr>
-- <td>
- <T i18nKey="monero">#</T>
- { i18n.t('monero') }
-- </td>
++ <td>{i18n.t('monero')}</td>
<td>
<code>
41taVyY6e1xApqKyMVDRVxJ76sPkfZhALLTjRvVKpaAh2pBd4wv9RgYj1tSPrx8wc6iE1uWUfjtQdTmTy2FGMeChGVKPQuV
couldnt_create_private_message: "Couldn't create private message.",
no_private_message_edit_allowed: 'Not allowed to edit private message.',
couldnt_update_private_message: "Couldn't update private message.",
- action: 'Action'
+ time: 'Time',
++ action: 'Action',
},
};