Migrate more strings to translation keys (#11608)
This commit is contained in:
parent
46072caa3a
commit
e9c9377e78
78 changed files with 2402 additions and 2411 deletions
|
@ -56,7 +56,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
submitFeedback(label, comment, canContact);
|
||||
|
||||
Modal.createDialog(InfoDialog, {
|
||||
title: _t("Feedback sent"),
|
||||
title: _t("feedback|sent"),
|
||||
description: _t("Thank you!"),
|
||||
});
|
||||
}
|
||||
|
@ -67,13 +67,13 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
if (hasFeedback) {
|
||||
feedbackSection = (
|
||||
<div className="mx_FeedbackDialog_section mx_FeedbackDialog_rateApp">
|
||||
<h3>{_t("Comment")}</h3>
|
||||
<h3>{_t("feedback|comment_label")}</h3>
|
||||
|
||||
<p>{_t("Your platform and username will be noted to help us use your feedback as much as we can.")}</p>
|
||||
<p>{_t("feedback|platform_username")}</p>
|
||||
|
||||
<Field
|
||||
id="feedbackComment"
|
||||
label={_t("Feedback")}
|
||||
label={_t("common|feedback")}
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
value={comment}
|
||||
|
@ -85,7 +85,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
/>
|
||||
|
||||
<StyledCheckbox checked={canContact} onChange={toggleCanContact}>
|
||||
{_t("You may contact me if you want to follow up or to let me test out upcoming ideas")}
|
||||
{_t("feedback|may_contact_label")}
|
||||
</StyledCheckbox>
|
||||
</div>
|
||||
);
|
||||
|
@ -96,7 +96,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
bugReports = (
|
||||
<p className="mx_FeedbackDialog_section_microcopy">
|
||||
{_t(
|
||||
"PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.",
|
||||
"feedback|pro_type",
|
||||
{},
|
||||
{
|
||||
debugLogsLink: (sub) => (
|
||||
|
@ -117,14 +117,14 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
<QuestionDialog
|
||||
className="mx_FeedbackDialog"
|
||||
hasCancelButton={hasFeedback}
|
||||
title={_t("Feedback")}
|
||||
title={_t("common|feedback")}
|
||||
description={
|
||||
<React.Fragment>
|
||||
<div className="mx_FeedbackDialog_section mx_FeedbackDialog_reportBug">
|
||||
<h3>{_t("common|report_a_bug")}</h3>
|
||||
<p>
|
||||
{_t(
|
||||
"Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.",
|
||||
"feedback|existing_issue_link",
|
||||
{},
|
||||
{
|
||||
existingIssuesLink: (sub) => {
|
||||
|
@ -153,7 +153,7 @@ const FeedbackDialog: React.FC<IProps> = (props: IProps) => {
|
|||
{feedbackSection}
|
||||
</React.Fragment>
|
||||
}
|
||||
button={hasFeedback ? _t("Send feedback") : _t("action|go_back")}
|
||||
button={hasFeedback ? _t("feedback|send_feedback_action") : _t("action|go_back")}
|
||||
buttonDisabled={hasFeedback && !comment}
|
||||
onFinished={onFinished}
|
||||
/>
|
||||
|
|
|
@ -69,14 +69,14 @@ const GenericFeatureFeedbackDialog: React.FC<IProps> = ({
|
|||
<div className="mx_GenericFeatureFeedbackDialog_subheading">
|
||||
{subheading}
|
||||
|
||||
{_t("Your platform and username will be noted to help us use your feedback as much as we can.")}
|
||||
{_t("feedback|platform_username")}
|
||||
|
||||
{children}
|
||||
</div>
|
||||
|
||||
<Field
|
||||
id="feedbackComment"
|
||||
label={_t("Feedback")}
|
||||
label={_t("common|feedback")}
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
value={comment}
|
||||
|
@ -95,7 +95,7 @@ const GenericFeatureFeedbackDialog: React.FC<IProps> = ({
|
|||
</StyledCheckbox>
|
||||
</React.Fragment>
|
||||
}
|
||||
button={_t("Send feedback")}
|
||||
button={_t("feedback|send_feedback_action")}
|
||||
buttonDisabled={!comment}
|
||||
onFinished={sendFeedback}
|
||||
/>
|
||||
|
|
|
@ -112,7 +112,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
|
||||
const stateForError = AutoDiscoveryUtils.authComponentStateForError(e);
|
||||
if (stateForError.serverErrorIsFatal) {
|
||||
let error = _t("Unable to validate homeserver");
|
||||
let error = _t("auth|server_picker_failed_validate_homeserver");
|
||||
if (e instanceof UserFriendlyError && e.translatedMessage) {
|
||||
error = e.translatedMessage;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
return {};
|
||||
} catch (e) {
|
||||
logger.error(e);
|
||||
return { error: _t("Invalid URL") };
|
||||
return { error: _t("auth|server_picker_invalid_url") };
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -137,7 +137,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
{
|
||||
key: "required",
|
||||
test: ({ value, allowEmpty }) => allowEmpty || !!value,
|
||||
invalid: () => _t("Specify a homeserver"),
|
||||
invalid: () => _t("auth|server_picker_required"),
|
||||
},
|
||||
{
|
||||
key: "valid",
|
||||
|
@ -176,7 +176,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
public render(): React.ReactNode {
|
||||
let text: string | undefined;
|
||||
if (this.defaultServer.hsName === "matrix.org") {
|
||||
text = _t("Matrix.org is the biggest public homeserver in the world, so it's a good place for many.");
|
||||
text = _t("auth|server_picker_matrix.org");
|
||||
}
|
||||
|
||||
let defaultServerName: React.ReactNode = this.defaultServer.hsName;
|
||||
|
@ -190,7 +190,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
|
||||
return (
|
||||
<BaseDialog
|
||||
title={this.props.title || _t("Sign into your homeserver")}
|
||||
title={this.props.title || _t("auth|server_picker_title")}
|
||||
className="mx_ServerPickerDialog"
|
||||
contentId="mx_ServerPickerDialog"
|
||||
onFinished={this.props.onFinished}
|
||||
|
@ -199,7 +199,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
>
|
||||
<form className="mx_Dialog_content" id="mx_ServerPickerDialog" onSubmit={this.onSubmit}>
|
||||
<p>
|
||||
{_t("We call the places where you can host your account 'homeservers'.")} {text}
|
||||
{_t("auth|server_picker_intro")} {text}
|
||||
</p>
|
||||
|
||||
<StyledRadioButton
|
||||
|
@ -219,12 +219,12 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
checked={!this.state.defaultChosen}
|
||||
onChange={this.onOtherChosen}
|
||||
childrenInLabel={false}
|
||||
aria-label={_t("Other homeserver")}
|
||||
aria-label={_t("auth|server_picker_custom")}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
className="mx_ServerPickerDialog_otherHomeserver"
|
||||
label={_t("Other homeserver")}
|
||||
label={_t("auth|server_picker_custom")}
|
||||
onChange={this.onHomeserverChange}
|
||||
onFocus={this.onOtherChosen}
|
||||
ref={this.fieldRef}
|
||||
|
@ -236,7 +236,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
id="mx_homeserverInput"
|
||||
/>
|
||||
</StyledRadioButton>
|
||||
<p>{_t("Use your preferred Matrix homeserver if you have one, or host your own.")}</p>
|
||||
<p>{_t("auth|server_picker_explainer")}</p>
|
||||
|
||||
<AccessibleButton className="mx_ServerPickerDialog_continue" kind="primary" onClick={this.onSubmit}>
|
||||
{_t("action|continue")}
|
||||
|
@ -248,7 +248,7 @@ export default class ServerPickerDialog extends React.PureComponent<IProps, ISta
|
|||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
{_t("About homeservers")}
|
||||
{_t("auth|server_picker_learn_more")}
|
||||
</ExternalLink>
|
||||
</form>
|
||||
</BaseDialog>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue