]> Untitled Git - lemmy.git/commitdiff
Merge branch 'dev' into websocket_scopes
authorDessalines <tyhou13@gmx.com>
Sun, 2 Feb 2020 19:37:19 +0000 (14:37 -0500)
committerDessalines <tyhou13@gmx.com>
Sun, 2 Feb 2020 19:37:19 +0000 (14:37 -0500)
1  2 
ui/src/components/community.tsx
ui/src/components/footer.tsx
ui/src/components/inbox.tsx
ui/src/components/login.tsx
ui/src/components/main.tsx
ui/src/components/navbar.tsx
ui/src/components/post.tsx
ui/src/components/sidebar.tsx
ui/src/components/sponsors.tsx
ui/src/translations/en.ts

index 18767c51c769efbebacb190d933cf118c3cc7840,da456fe5aa0d35c64db31f3969b0f199ad0b9147..9f96ac51edc1e0e22feb3cf175c57395399483d1
@@@ -23,8 -21,13 +23,7 @@@ import { WebSocketService, UserService 
  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 {
index 5451da2c8765164d0a6fcb5c72bbc2b93d71236c,f48120b8b9a8254b2d4577d1235f67a7a66ce48c..cadb6aa39eaafb07a256a93afb93318a4fcce4cf
@@@ -19,22 -19,22 +19,22 @@@ export class Footer extends Component<a
              </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>
Simple merge
Simple merge
index ec801f90204944d9891ffb3150829b58bcfb97db,b39cec8bc3ca8a2b2d6467a7223813ecfd4a1cf4..ed31fff4d70ff194a03efa83ace03c3fd3e72fae
@@@ -276,52 -279,27 +278,27 @@@ export class Main extends Component<any
              )}
              <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() && (
Simple merge
Simple merge
index 0e6b68e69d863e82a9d591d8ec3ac6ee6bce2199,fe0b28bae42a5ae9108d95303b38bad84a357204..5c8ef1a9a5f6eafeba6a5175e182359c7c56e00c
@@@ -157,43 -156,26 +157,29 @@@ export class Sidebar extends Component<
                </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"
index 5b78e2bdc0821fd08a288fad896c7c7a4cc0e644,dd12914df70718032a4cd2e1abf7525344afb6b2..28f09002660b6853db0c12c3fa601ea9245152cf
@@@ -36,16 -36,16 +36,14 @@@ export class Sponsors extends Component
    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
index 90aff0b93573e094113e520c375fbf9ca57f8a2e,ea33c5c98a93cc9014719886108a36080a1bfd49..7afb99ef564ffa5e711463e195f69ef5c364ba30
@@@ -230,5 -230,7 +230,7 @@@ export const en = 
      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',
    },
  };