Migrate more strings to translation keys (#11601)
This commit is contained in:
parent
564d4eda7c
commit
8c35abbb04
64 changed files with 3784 additions and 3553 deletions
|
@ -74,8 +74,8 @@ const UserWelcomeTop: React.FC = () => {
|
|||
<div>
|
||||
<MiniAvatarUploader
|
||||
hasAvatar={!!ownProfile.avatarUrl}
|
||||
hasAvatarLabel={_tDom("Great, that'll help people know it's you")}
|
||||
noAvatarLabel={_tDom("Add a photo so people know it's you.")}
|
||||
hasAvatarLabel={_tDom("onboarding|has_avatar_label")}
|
||||
noAvatarLabel={_tDom("onboarding|no_avatar_label")}
|
||||
setAvatarUrl={(url) => cli.setAvatarUrl(url)}
|
||||
isUserAvatar
|
||||
onClick={(ev) => PosthogTrackers.trackInteraction("WebHomeMiniAvatarUploadButton", ev)}
|
||||
|
@ -88,8 +88,8 @@ const UserWelcomeTop: React.FC = () => {
|
|||
/>
|
||||
</MiniAvatarUploader>
|
||||
|
||||
<h1>{_tDom("Welcome %(name)s", { name: ownProfile.displayName })}</h1>
|
||||
<h2>{_tDom("Now, let's help you get started")}</h2>
|
||||
<h1>{_tDom("onboarding|welcome_user", { name: ownProfile.displayName })}</h1>
|
||||
<h2>{_tDom("onboarding|welcome_detail")}</h2>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -113,8 +113,8 @@ const HomePage: React.FC<IProps> = ({ justRegistered = false }) => {
|
|||
introSection = (
|
||||
<React.Fragment>
|
||||
<img src={logoUrl} alt={config.brand} />
|
||||
<h1>{_tDom("Welcome to %(appName)s", { appName: config.brand })}</h1>
|
||||
<h2>{_tDom("Own your conversations.")}</h2>
|
||||
<h1>{_tDom("onboarding|intro_welcome", { appName: config.brand })}</h1>
|
||||
<h2>{_tDom("onboarding|intro_byline")}</h2>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
@ -125,13 +125,13 @@ const HomePage: React.FC<IProps> = ({ justRegistered = false }) => {
|
|||
{introSection}
|
||||
<div className="mx_HomePage_default_buttons">
|
||||
<AccessibleButton onClick={onClickSendDm} className="mx_HomePage_button_sendDm">
|
||||
{_tDom("Send a Direct Message")}
|
||||
{_tDom("onboarding|send_dm")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton onClick={onClickExplore} className="mx_HomePage_button_explore">
|
||||
{_tDom("Explore Public Rooms")}
|
||||
{_tDom("onboarding|explore_rooms")}
|
||||
</AccessibleButton>
|
||||
<AccessibleButton onClick={onClickNewRoom} className="mx_HomePage_button_createGroup">
|
||||
{_tDom("Create a Group Chat")}
|
||||
{_tDom("onboarding|create_room")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -523,7 +523,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
// i18n: ssoButtons is a placeholder to help translators understand context
|
||||
continueWithSection = (
|
||||
<h2 className="mx_AuthBody_centered">
|
||||
{_t("Continue with %(ssoButtons)s", { ssoButtons: "" }).trim()}
|
||||
{_t("auth|continue_with_sso", { ssoButtons: "" }).trim()}
|
||||
</h2>
|
||||
);
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
action={SSOAction.REGISTER}
|
||||
/>
|
||||
<h2 className="mx_AuthBody_centered">
|
||||
{_t("%(ssoButtons)s Or %(usernamePassword)s", {
|
||||
{_t("auth|sso_or_username_password", {
|
||||
ssoButtons: "",
|
||||
usernamePassword: "",
|
||||
}).trim()}
|
||||
|
@ -591,7 +591,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
const signIn = (
|
||||
<span className="mx_AuthBody_changeFlow">
|
||||
{_t(
|
||||
"Already have an account? <a>Sign in here</a>",
|
||||
"auth|sign_in_instead",
|
||||
{},
|
||||
{
|
||||
a: (sub) => (
|
||||
|
@ -621,13 +621,10 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
regDoneText = (
|
||||
<div>
|
||||
<p>
|
||||
{_t(
|
||||
"Your new account (%(newAccountId)s) is registered, but you're already logged into a different account (%(loggedInUserId)s).",
|
||||
{
|
||||
newAccountId: this.state.registeredUsername,
|
||||
loggedInUserId: this.state.differentLoggedInUserId,
|
||||
},
|
||||
)}
|
||||
{_t("auth|account_clash", {
|
||||
newAccountId: this.state.registeredUsername,
|
||||
loggedInUserId: this.state.differentLoggedInUserId,
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
<AccessibleButton
|
||||
|
@ -639,7 +636,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{_t("Continue with previous account")}
|
||||
{_t("auth|account_clash_previous_account")}
|
||||
</AccessibleButton>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -650,7 +647,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
regDoneText = (
|
||||
<h2>
|
||||
{_t(
|
||||
"<a>Log in</a> to your new account.",
|
||||
"auth|log_in_new_account",
|
||||
{},
|
||||
{
|
||||
a: (sub) => (
|
||||
|
@ -673,7 +670,7 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
}
|
||||
body = (
|
||||
<div>
|
||||
<h1>{_t("Registration Successful")}</h1>
|
||||
<h1>{_t("auth|registration_successful")}</h1>
|
||||
{regDoneText}
|
||||
</div>
|
||||
);
|
||||
|
@ -685,8 +682,8 @@ export default class Registration extends React.Component<IProps, IState> {
|
|||
title={_t("Create account")}
|
||||
serverPicker={
|
||||
<ServerPicker
|
||||
title={_t("Host account on")}
|
||||
dialogTitle={_t("Decide where your account is hosted")}
|
||||
title={_t("auth|server_picker_title")}
|
||||
dialogTitle={_t("auth|server_picker_dialog_title")}
|
||||
serverConfig={this.props.serverConfig}
|
||||
onServerConfigChange={
|
||||
this.state.doingUIAuth ? undefined : this.props.onServerConfigChange
|
||||
|
|
|
@ -287,7 +287,7 @@ export default class SoftLogout extends React.Component<IProps, IState> {
|
|||
<p>{_t("Sign in and regain access to your account.")}</p>
|
||||
{this.renderSsoForm(null)}
|
||||
<h2 className="mx_AuthBody_centered">
|
||||
{_t("%(ssoButtons)s Or %(usernamePassword)s", {
|
||||
{_t("auth|sso_or_username_password", {
|
||||
ssoButtons: "",
|
||||
usernamePassword: "",
|
||||
}).trim()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue