X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fhome%2Fsignup.tsx;h=bb1e1f1142be867fd69c742914f90aa2b70d5ab6;hb=c3ab9e74f8775f4b811866d2675b00f9702bde3d;hp=817dcf8c888a8a5a9d9602c5ff5b1421639d8133;hpb=043b522ff1b0a395eda7d5e2b01fd035c5ec6b6e;p=lemmy-ui.git diff --git a/src/shared/components/home/signup.tsx b/src/shared/components/home/signup.tsx index 817dcf8..bb1e1f1 100644 --- a/src/shared/components/home/signup.tsx +++ b/src/shared/components/home/signup.tsx @@ -13,9 +13,8 @@ import { SiteView, } from "lemmy-js-client"; import { joinLemmyUrl } from "../../config"; -import { i18n } from "../../i18next"; import { mdToHtml } from "../../markdown"; -import { UserService } from "../../services"; +import { I18NextService, UserService } from "../../services"; import { HttpService, RequestState } from "../../services/HttpService"; import { toast } from "../../toast"; import { HtmlTags } from "../common/html-tags"; @@ -113,7 +112,7 @@ export class Signup extends Component { } titleName(siteView: SiteView): string { - return i18n.t( + return I18NextService.i18n.t( siteView.local_site.private_instance ? "apply_to_join" : "sign_up" ); } @@ -141,8 +140,11 @@ export class Signup extends Component { registerForm() { const siteView = this.state.siteRes.site_view; return ( -
-
{this.titleName(siteView)}
+ +

{this.titleName(siteView)}

{this.isLemmyMl && (
@@ -159,7 +161,7 @@ export class Signup extends Component { className="col-sm-2 col-form-label" htmlFor="register-username" > - {i18n.t("username")} + {I18NextService.i18n.t("username")}
@@ -172,14 +174,14 @@ export class Signup extends Component { required minLength={3} pattern="[a-zA-Z0-9_]+" - title={i18n.t("community_reqs")} + title={I18NextService.i18n.t("community_reqs")} />
{ className="form-control" placeholder={ siteView.local_site.require_email_verification - ? i18n.t("required") - : i18n.t("optional") + ? I18NextService.i18n.t("required") + : I18NextService.i18n.t("optional") } value={this.state.form.email} autoComplete="email" @@ -202,7 +204,7 @@ export class Signup extends Component { !validEmail(this.state.form.email) && (
- {i18n.t("no_password_reset")} + {I18NextService.i18n.t("no_password_reset")}
)}
@@ -213,7 +215,7 @@ export class Signup extends Component { className="col-sm-2 col-form-label" htmlFor="register-password" > - {i18n.t("password")} + {I18NextService.i18n.t("password")}
{ /> {this.state.form.password && (
- {i18n.t(this.passwordStrength as NoOptionI18nKeys)} + {I18NextService.i18n.t( + this.passwordStrength as NoOptionI18nKeys + )}
)}
@@ -240,7 +244,7 @@ export class Signup extends Component { className="col-sm-2 col-form-label" htmlFor="register-verify-password" > - {i18n.t("verify_password")} + {I18NextService.i18n.t("verify_password")}
{
- {i18n.t("fill_out_application")} + {I18NextService.i18n.t("fill_out_application")}
{siteView.local_site.application_question && (
{ className="col-sm-2 col-form-label" htmlFor="application_answer" > - {i18n.t("answer")} + {I18NextService.i18n.t("answer")}
{ onChange={linkEvent(this, this.handleRegisterShowNsfwChange)} />
@@ -345,12 +349,14 @@ export class Signup extends Component { return (