Remove host signup config strings, make translatable instead
Also replace the icon in the UserMenu and change the text, requested from design.
This commit is contained in:
parent
dc549a9e4b
commit
23140a84ff
6 changed files with 50 additions and 38 deletions
|
@ -36,7 +36,7 @@ export default class HostSignupAction extends React.PureComponent<IProps, IState
|
|||
<IconizedContextMenuOptionList>
|
||||
<IconizedContextMenuOption
|
||||
iconClassName="mx_UserMenu_iconHosting"
|
||||
label={_t("Get your own %(brand)s!")}
|
||||
label={_t("Upgrade to pro")}
|
||||
onClick={this.openDialog}
|
||||
/>
|
||||
</IconizedContextMenuOptionList>
|
||||
|
|
|
@ -172,32 +172,44 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
}
|
||||
|
||||
private onAccountDetailsRequest = () => {
|
||||
const termsDialog = this.config.termsDialog;
|
||||
const textComponent = (
|
||||
<>
|
||||
<p>
|
||||
{termsDialog.text}
|
||||
{_t("Continuing temporarily allows the %(hostSignupBrand)s setup process to access your " +
|
||||
"account to fetch verified email addresses. This data is not stored.", {
|
||||
hostSignupBrand: this.config.brand,
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
{_t("Learn more in our")}
|
||||
<a href={termsDialog.privacyPolicy.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.privacyPolicy.text}
|
||||
</a>,
|
||||
<a href={termsDialog.termsOfService.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.termsOfService.text}
|
||||
</a> {_t("and")}
|
||||
<a href={termsDialog.cookiePolicy.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.cookiePolicy.text}
|
||||
</a>.
|
||||
{_t("Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.",
|
||||
{},
|
||||
{
|
||||
cookiePolicyLink: () => (
|
||||
<a href={this.config.cookiePolicyUrl} target="_blank" rel="noreferrer noopener">
|
||||
{_t("Cookie Policy")}
|
||||
</a>
|
||||
),
|
||||
privacyPolicyLink: () => (
|
||||
<a href={this.config.privacyPolicyUrl} target="_blank" rel="noreferrer noopener">
|
||||
{_t("Privacy Policy")}
|
||||
</a>
|
||||
),
|
||||
termsOfServiceLink: () => (
|
||||
<a href={this.config.termsOfServiceUrl} target="_blank" rel="noreferrer noopener">
|
||||
{_t("Terms of Service")}
|
||||
</a>
|
||||
),
|
||||
},
|
||||
)}
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
Modal.createDialog(
|
||||
QuestionDialog,
|
||||
{
|
||||
title: termsDialog.title,
|
||||
title: _t("You should know"),
|
||||
description: textComponent,
|
||||
button: termsDialog.acceptText,
|
||||
button: _t("Continue"),
|
||||
onFinished: this.onAccountDetailsDialogFinished,
|
||||
},
|
||||
);
|
||||
|
@ -230,7 +242,9 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
{this.state.minimized &&
|
||||
<div className="mx_Dialog_header mx_Dialog_headerWithButton">
|
||||
<div className="mx_Dialog_title">
|
||||
{this.config.minimizedDialogTitle}
|
||||
{_t("%(hostSignupBrand)s Setup", {
|
||||
hostSignupBrand: this.config.brand,
|
||||
})}
|
||||
</div>
|
||||
<AccessibleButton
|
||||
className="mx_HostSignup_maximize_button"
|
||||
|
|
|
@ -46,23 +46,11 @@ export interface IPostmessage {
|
|||
origin: string;
|
||||
}
|
||||
|
||||
interface ILink {
|
||||
href: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
interface IHostSignupTermsDialogConfig {
|
||||
acceptText: string;
|
||||
cookiePolicy: ILink;
|
||||
privacyPolicy: ILink;
|
||||
termsOfService: ILink;
|
||||
text: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
export interface IHostSignupConfig {
|
||||
brand: string;
|
||||
cookiePolicyUrl: string;
|
||||
domains: Array<string>;
|
||||
minimizedDialogTitle: string;
|
||||
termsDialog: IHostSignupTermsDialogConfig;
|
||||
privacyPolicyUrl: string;
|
||||
termsOfServiceUrl: string;
|
||||
url: string;
|
||||
}
|
||||
|
|
|
@ -2088,12 +2088,17 @@
|
|||
"Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.": "Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.",
|
||||
"PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.": "PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.",
|
||||
"Send feedback": "Send feedback",
|
||||
"Confirm Abort Of Host Creation": "Confirm Abort Of Host Creation",
|
||||
"Confirm abort of host creation": "Confirm abort of host creation",
|
||||
"Are you sure you wish to abort creation of the host? The process cannot be continued.": "Are you sure you wish to abort creation of the host? The process cannot be continued.",
|
||||
"Abort": "Abort",
|
||||
"Failed to connect to your homeserver. Please close this dialog and try again.": "Failed to connect to your homeserver. Please close this dialog and try again.",
|
||||
"Learn more in our": "Learn more in our",
|
||||
"and": "and",
|
||||
"Continuing temporarily allows the %(hostSignupBrand)s setup process to access your account to fetch verified email addresses. This data is not stored.": "Continuing temporarily allows the %(hostSignupBrand)s setup process to access your account to fetch verified email addresses. This data is not stored.",
|
||||
"Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.": "Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.",
|
||||
"Cookie Policy": "Cookie Policy",
|
||||
"Privacy Policy": "Privacy Policy",
|
||||
"Terms of Service": "Terms of Service",
|
||||
"You should know": "You should know",
|
||||
"%(hostSignupBrand)s Setup": "%(hostSignupBrand)s Setup",
|
||||
"Maximize dialog": "Maximize dialog",
|
||||
"Minimize dialog": "Minimize dialog",
|
||||
"Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.",
|
||||
|
@ -2246,7 +2251,6 @@
|
|||
"Find others by phone or email": "Find others by phone or email",
|
||||
"Be found by phone or email": "Be found by phone or email",
|
||||
"Use bots, bridges, widgets and sticker packs": "Use bots, bridges, widgets and sticker packs",
|
||||
"Terms of Service": "Terms of Service",
|
||||
"To continue you need to accept the terms of this service.": "To continue you need to accept the terms of this service.",
|
||||
"Service": "Service",
|
||||
"Summary": "Summary",
|
||||
|
@ -2446,7 +2450,7 @@
|
|||
"Send a Direct Message": "Send a Direct Message",
|
||||
"Explore Public Rooms": "Explore Public Rooms",
|
||||
"Create a Group Chat": "Create a Group Chat",
|
||||
"Get your own Element!": "Get your own Element!",
|
||||
"Upgrade to pro": "Upgrade to pro",
|
||||
"Explore rooms": "Explore rooms",
|
||||
"Failed to reject invitation": "Failed to reject invitation",
|
||||
"Cannot create rooms in this community": "Cannot create rooms in this community",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue