]> Untitled Git - lemmy-ui.git/commitdiff
Use my fork of inferno-i18next. Fixes #413 (#415)
authorDessalines <dessalines@users.noreply.github.com>
Sat, 18 Sep 2021 14:27:49 +0000 (10:27 -0400)
committerGitHub <noreply@github.com>
Sat, 18 Sep 2021 14:27:49 +0000 (10:27 -0400)
.eslintrc.json
package.json
src/shared/components/app/app.tsx
src/shared/components/comment/comment-form.tsx
src/shared/components/home/home.tsx
src/shared/components/home/login.tsx
src/shared/components/post/post-listings.tsx
src/shared/components/private_message/private-message-form.tsx
src/shared/utils.ts
yarn.lock

index 093a700c196e1a2e045af30017e21beb7068f338..4e05f0c5a73bf41a8da67062d94fe3953d2648cd 100644 (file)
@@ -16,6 +16,7 @@
     "warnOnUnsupportedTypeScriptVersion": false
   },
   "rules": {
+    "@typescript-eslint/ban-ts-comment": 0,
     "@typescript-eslint/no-explicit-any": 0,
     "@typescript-eslint/explicit-module-boundary-types": 0,
     "arrow-body-style": 0,
index 4ff386062837f189ac2fdeaa12f838d137012088..3a13537b806e17ccd04a84d2bd17a13a5efed0c9 100644 (file)
@@ -26,7 +26,7 @@
     "inferno-create-element": "^7.4.9",
     "inferno-helmet": "^5.2.1",
     "inferno-hydrate": "^7.4.9",
-    "inferno-i18next": "github:nimbusec-oss/inferno-i18next#semver:^7.4.2",
+    "inferno-i18next-dess": "^0.0.1",
     "inferno-router": "^7.4.9",
     "inferno-server": "^7.4.9",
     "isomorphic-cookie": "^1.2.4",
index ddf466b6d6926dbe0ead99906828b83489c98c98..bac634e372f1fdc324b97018f33620178017f298 100644 (file)
@@ -1,6 +1,6 @@
 import { Component } from "inferno";
 import { Helmet } from "inferno-helmet";
-import { Provider } from "inferno-i18next";
+import { Provider } from "inferno-i18next-dess";
 import { Route, Switch } from "inferno-router";
 import { GetSiteResponse } from "lemmy-js-client";
 import { i18n } from "../../i18next";
index 95dff716080238e57665658d385fe8409f479eb4..515e3d990a1e0c73663f7be9d2798e5a2d2f6a41 100644 (file)
@@ -1,5 +1,5 @@
 import { Component } from "inferno";
-import { T } from "inferno-i18next";
+import { T } from "inferno-i18next-dess";
 import { Link } from "inferno-router";
 import {
   CommentResponse,
index 3cdb238d400191db11f92512f606df5caca38ae6..d06bf011cfee2bdacd32c575f6861c3a5d56e8d0 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, linkEvent } from "inferno";
-import { T } from "inferno-i18next";
+import { T } from "inferno-i18next-dess";
 import { Link } from "inferno-router";
 import {
   AddAdminResponse,
index b227d64a9871ffe28fbdecd46a0bb03591f5004c..612a6b70ee8a4fa85bd99d2e4372b3b0ef146429 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, linkEvent } from "inferno";
-import { T } from "inferno-i18next";
+import { T } from "inferno-i18next-dess";
 import {
   GetCaptchaResponse,
   GetSiteResponse,
index 3dc8260ed871c5c220930e01bc672bb8ac7f7d1b..12d519368319a5e8dd0748e7647107df44d6f271 100644 (file)
@@ -1,5 +1,5 @@
 import { Component } from "inferno";
-import { T } from "inferno-i18next";
+import { T } from "inferno-i18next-dess";
 import { Link } from "inferno-router";
 import { PostView } from "lemmy-js-client";
 import { i18n } from "../../i18next";
index 542c48b7dbee2f0cef61b959a09689f2c5efe33f..60ae52d1ba152b75bde8a6c25c012944fcb26795 100644 (file)
@@ -1,5 +1,5 @@
 import { Component, linkEvent } from "inferno";
-import { T } from "inferno-i18next";
+import { T } from "inferno-i18next-dess";
 import { Prompt } from "inferno-router";
 import {
   CreatePrivateMessage,
index 642bb755cd7bf0410e2d55ae18c58962142a98f3..17206076535a34c971718296524b7a9817fbecef 100644 (file)
@@ -1431,3 +1431,14 @@ export function initializeSite(site: GetSiteResponse) {
   UserService.Instance.myUserInfo = site.my_user;
   i18n.changeLanguage(getLanguage());
 }
+
+let SHORTNUM_SI_FORMAT = new Intl.NumberFormat("en-US", {
+  maximumFractionDigits: 1,
+  //@ts-ignore
+  notation: "compact",
+  compactDisplay: "short",
+});
+
+export function numToSI(value: any) {
+  return SHORTNUM_SI_FORMAT.format(value);
+}
index bf33823dbe48097618ee8f095bad50941279079c..ab1631457bb2e9512b0eddadd331d9b81824a242 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -4045,9 +4045,10 @@ inferno-hydrate@^7.4.9:
   dependencies:
     inferno "7.4.9"
 
-"inferno-i18next@github:nimbusec-oss/inferno-i18next#semver:^7.4.2":
-  version "7.4.2"
-  resolved "https://codeload.github.com/nimbusec-oss/inferno-i18next/tar.gz/54b9be591ccd62c53799ad23e35f17144a62f909"
+inferno-i18next-dess@^0.0.1:
+  version "0.0.1"
+  resolved "https://registry.yarnpkg.com/inferno-i18next-dess/-/inferno-i18next-dess-0.0.1.tgz#48ae6bb4c3a617e59ff8dc97b9ed70f2ef762206"
+  integrity sha512-z/6UnuWFMyBivfR3SI9AmgA0/JvXARqtG/9BQryaLPenlG7iAb4cN2TeSt0mHIgFOo01QHVWZ8dqn7jZRijp2Q==
   dependencies:
     html-parse-stringify2 "^2.0.1"
     inferno "^7.4.2"