Migrate more strings to translation keys (#11642)

This commit is contained in:
Michael Telatynski 2023-09-21 18:16:04 +01:00 committed by GitHub
parent c879882558
commit faa7b1521f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
87 changed files with 6443 additions and 6006 deletions

View file

@ -1607,8 +1607,8 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}
Modal.createDialog(ErrorDialog, {
title: _t("Signed Out"),
description: _t("For security, this session has been signed out. Please sign in again."),
title: _t("auth|session_logged_out_title"),
description: _t("auth|session_logged_out_description"),
});
dis.dispatch({
@ -1619,19 +1619,13 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
Modal.createDialog(
QuestionDialog,
{
title: _t("Terms and Conditions"),
title: _t("terms|tac_title"),
description: (
<div>
<p>
{" "}
{_t(
"To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.",
{ homeserverDomain: cli.getDomain() },
)}
</p>
<p> {_t("terms|tac_description", { homeserverDomain: cli.getDomain() })}</p>
</div>
),
button: _t("Review terms and conditions"),
button: _t("terms|tac_button"),
cancelButton: _t("action|dismiss"),
onFinished: (confirmed) => {
if (confirmed) {
@ -1672,11 +1666,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
switch (type) {
case "CRYPTO_WARNING_OLD_VERSION_DETECTED":
Modal.createDialog(ErrorDialog, {
title: _t("Old cryptography data detected"),
description: _t(
"Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.",
{ brand: SdkConfig.get().brand },
),
title: _t("encryption|old_version_detected_title"),
description: _t("encryption|old_version_detected_description", {
brand: SdkConfig.get().brand,
}),
});
break;
}
@ -1732,7 +1725,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
} else if (request.pending) {
ToastStore.sharedInstance().addOrReplaceToast({
key: "verifreq_" + request.transactionId,
title: _t("Verification requested"),
title: _t("encryption|verification_requested_toast_title"),
icon: "verification",
props: { request },
component: VerificationRequestToast,

View file

@ -2335,7 +2335,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
className="mx_RoomView_auxPanel_hiddenHighlights"
onClick={this.onHiddenHighlightsClick}
>
{_t("You have %(count)s unread notifications in a prior version of this room.", {
{_t("room|unread_notifications_predecessor", {
count: hiddenHighlightCount,
})}
</AccessibleButton>

View file

@ -487,7 +487,7 @@ const validateEmailRules = withValidation({
{
key: "email",
test: ({ value }) => !value || Email.looksValid(value),
invalid: () => _t("Doesn't look like a valid email address"),
invalid: () => _t("auth|email_field_label_invalid"),
},
],
});
@ -509,7 +509,7 @@ const SpaceSetupPrivateInvite: React.FC<{
name={name}
type="text"
label={_t("Email address")}
placeholder={_t("Email")}
placeholder={_t("auth|email_field_label")}
value={emailAddresses[i]}
onChange={(ev: React.ChangeEvent<HTMLInputElement>) => setEmailAddress(i, ev.target.value)}
ref={fieldRefs[i]}

View file

@ -93,7 +93,7 @@ export default class ViewSource extends React.Component<IProps, IState> {
</details>
<details className="mx_ViewSource_details">
<summary>
<span className="mx_ViewSource_heading">{_t("Original event source")}</span>
<span className="mx_ViewSource_heading">{_t("devtools|original_event_source")}</span>
</summary>
<CopyableText getTextToCopy={copyOriginalFunc}>
<SyntaxHighlight language="json">{stringify(originalEventSource)}</SyntaxHighlight>
@ -104,7 +104,7 @@ export default class ViewSource extends React.Component<IProps, IState> {
} else {
return (
<>
<div className="mx_ViewSource_heading">{_t("Original event source")}</div>
<div className="mx_ViewSource_heading">{_t("devtools|original_event_source")}</div>
<CopyableText getTextToCopy={copyOriginalFunc}>
<SyntaxHighlight language="json">{stringify(originalEventSource)}</SyntaxHighlight>
</CopyableText>

View file

@ -396,7 +396,7 @@ export default class ForgotPassword extends React.Component<Props, State> {
<PassphraseField
name="reset_password"
type="password"
label={_td("New Password")}
label={_td("auth|change_password_new_label")}
value={this.state.password}
minScore={PASSWORD_MIN_SCORE}
fieldRef={(field) => (this.fieldPassword = field)}

View file

@ -53,7 +53,7 @@ export const CheckEmail: React.FC<CheckEmailProps> = ({
return (
<>
<EMailPromptIcon className="mx_AuthBody_emailPromptIcon--shifted" />
<h1>{_t("Check your email to continue")}</h1>
<h1>{_t("auth|uia|email_auth_header")}</h1>
<div className="mx_AuthBody_text">
<p>{_t("auth|check_email_explainer", { email: email }, { b: (t) => <b>{t}</b> })}</p>
<div className="mx_AuthBody_did-not-receive">