]> Untitled Git - lemmy-ui.git/commitdiff
Merge branch 'feature/i18n-type-constraint' of https://github.com/shilangyu/lemmy...
authorDessalines <tyhou13@gmx.com>
Mon, 1 Mar 2021 21:24:17 +0000 (16:24 -0500)
committerDessalines <tyhou13@gmx.com>
Mon, 1 Mar 2021 21:24:17 +0000 (16:24 -0500)
lemmy-translations
src/shared/components/private-message-form.tsx
src/shared/i18next.ts
src/shared/utils.ts

index 6171d85e4cc9249356f75739aebf319d49ec3889..bc7810220f45a07df4e5773c6a85e4fc25ea62ba 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 6171d85e4cc9249356f75739aebf319d49ec3889
+Subproject commit bc7810220f45a07df4e5773c6a85e4fc25ea62ba
index 0a68e2526a2b45b2b05ad1a99349805b346358b7..e98c893e16b2754a0b477b787f22a83198418660 100644 (file)
@@ -119,8 +119,8 @@ export class PrivateMessageForm extends Component<
                 onClick={linkEvent(this, this.handleShowDisclaimer)}
                 role="button"
                 class="ml-2 pointer text-danger"
-                data-tippy-content={i18n.t("disclaimer")}
-                aria-label={i18n.t("disclaimer")}
+                data-tippy-content={i18n.t("private_message_disclaimer")}
+                aria-label={i18n.t("private_message_disclaimer")}
               >
                 <Icon icon="alert-triangle" classes="icon-inline" />
               </span>
index 3d3d5a1fc2dcc94ea8764b341c2cf92b04196e12..99dbc70b6c72e4ea6d17fe6b036bef91a500cfe1 100644 (file)
@@ -31,6 +31,7 @@ import { sr_Latn } from "./translations/sr_Latn";
 import { da } from "./translations/da";
 import { oc } from "./translations/oc";
 import { hr } from "./translations/hr";
+import { th } from "./translations/th";
 
 // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
 const resources = {
@@ -65,6 +66,7 @@ const resources = {
   da,
   oc,
   hr,
+  th,
 };
 
 function format(value: any, format: any): any {
index cb7569df2c220b6ee1a1a4e3104f5891cb88f05d..887030fbc0ed19a04d7857d1471aa87fa158540e 100644 (file)
@@ -118,6 +118,7 @@ export const languages = [
   { code: "sv", name: "Svenska" },
   { code: "sq", name: "Shqip" },
   { code: "sr_Latn", name: "srpski" },
+  { code: "th", name: "ภาษาไทย" },
   { code: "tr", name: "Türkçe" },
   { code: "uk", name: "Українська Mова" },
   { code: "ru", name: "Русский" },
@@ -445,6 +446,8 @@ export function getMomentLanguage(): string {
     lang = "oc";
   } else if (lang.startsWith("hr")) {
     lang = "hr";
+  } else if (lang.startsWith("th")) {
+    lang = "th";
   } else {
     lang = "en";
   }