I18n'ise hardcoded strings

This commit is contained in:
Michael Telatynski
2023-11-22 20:07:15 +00:00
parent 2b39fa930e
commit 7051c11411
7 changed files with 21 additions and 10 deletions

View File

@@ -71,7 +71,7 @@ export const ErrorView: FC<ErrorViewProps> = ({ error }) => {
return (
<FullScreenView>
<h1>Error</h1>
<h1>{t("common.error")}</h1>
<p>
{error instanceof TranslatedError
? error.translatedMessage

View File

@@ -96,7 +96,7 @@ export const UserMenu: FC<Props> = ({
if (!isAuthenticated) {
return (
<LinkButton to={{ pathname: "/login", state: { from: location } }}>
Log in
{t("log_in")}
</LinkButton>
);
}

View File

@@ -90,8 +90,8 @@ export const LoginPage: FC = () => {
<div className={styles.formContainer}>
<Logo width="auto" height="auto" className={styles.logo} />
<h2>Log In</h2>
<h4>To continue to Element</h4>
<h2>{t("log_in")}</h2>
<h4>{t("login_subheading")}</h4>
<form onSubmit={onSubmitLoginForm}>
<FieldRow>
<InputField
@@ -132,7 +132,7 @@ export const LoginPage: FC = () => {
</form>
</div>
<div className={styles.authLinks}>
<p>Not registered yet?</p>
<p>{t("login_auth_links_prompt")}</p>
<p>
<Trans i18nKey="login_auth_links">
<Link to="/register">Create an account</Link>

View File

@@ -166,7 +166,7 @@ export const RegisterPage: FC = () => {
<div className={styles.content}>
<div className={styles.formContainer}>
<Logo width="auto" height="auto" className={styles.logo} />
<h2>Create your account</h2>
<h2>{t("register_heading")}</h2>
<form onSubmit={onSubmitRegisterForm}>
<FieldRow>
<InputField

View File

@@ -302,7 +302,7 @@ export const GroupCallView: FC<Props> = ({
} else if (!isE2EESupported() && isRoomE2EE) {
return (
<FullScreenView>
<Heading>Incompatible Browser</Heading>
<Heading>{t("browser_media_e2ee_unsupported_heading")}</Heading>
<Text>{t("browser_media_e2ee_unsupported")}</Text>
<Link href="/" onClick={onHomeClick}>
{t("common.home")}

View File

@@ -186,8 +186,12 @@ export const SettingsModal: FC<Props> = (props) => {
</>
}
>
<h4>Developer</h4>
<p>Version: {(import.meta.env.VITE_APP_VERSION as string) || "dev"}</p>
<h4>{t("settings.developer_tab_title")}</h4>
<p>
{t("version", {
version: import.meta.env.VITE_APP_VERSION || "dev",
})}
</p>
<FieldRow>
<InputField
id="developerSettingsTab"
@@ -200,7 +204,7 @@ export const SettingsModal: FC<Props> = (props) => {
}
/>
</FieldRow>
<h4>Analytics</h4>
<h4>{t("common.analytics")}</h4>
<FieldRow>
<InputField
id="optInAnalytics"