mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
Replace harcoded strings to allow translation
This commit is contained in:
@@ -39,7 +39,7 @@ export default function AccountManagement() {
|
|||||||
<CategoryButton
|
<CategoryButton
|
||||||
icon={<Block size={24} color="var(--error)" />}
|
icon={<Block size={24} color="var(--error)" />}
|
||||||
description={
|
description={
|
||||||
"Disable your account. You won't be able to access it unless you contact support."
|
<Text id="app.settings.pages.account.manage.disable_long" />
|
||||||
}
|
}
|
||||||
action="chevron"
|
action="chevron"
|
||||||
onClick={callback("disable")}>
|
onClick={callback("disable")}>
|
||||||
@@ -49,7 +49,7 @@ export default function AccountManagement() {
|
|||||||
<CategoryButton
|
<CategoryButton
|
||||||
icon={<Trash size={24} color="var(--error)" />}
|
icon={<Trash size={24} color="var(--error)" />}
|
||||||
description={
|
description={
|
||||||
"Your account will be queued for deletion, a confirmation email will be sent."
|
<Text id="app.settings.pages.account.manage.delete_long" />
|
||||||
}
|
}
|
||||||
action="chevron"
|
action="chevron"
|
||||||
onClick={callback("delete")}>
|
onClick={callback("delete")}>
|
||||||
|
|||||||
@@ -198,7 +198,15 @@ export default function MultiFactorAuthentication() {
|
|||||||
color={!mfa?.totp_mfa ? "var(--error)" : undefined}
|
color={!mfa?.totp_mfa ? "var(--error)" : undefined}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
description={"Set up time-based one-time password."}
|
description={
|
||||||
|
<Text
|
||||||
|
id={`app.settings.pages.account.2fa.${
|
||||||
|
mfa?.recovery_active
|
||||||
|
? "remove"
|
||||||
|
: "add"
|
||||||
|
}_long`}
|
||||||
|
/>
|
||||||
|
}
|
||||||
disabled={!mfa || (!mfa.recovery_active && !mfa.totp_mfa)}
|
disabled={!mfa || (!mfa.recovery_active && !mfa.totp_mfa)}
|
||||||
onClick={totpAction}>
|
onClick={totpAction}>
|
||||||
<Text
|
<Text
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import styled, { css } from "styled-components/macro";
|
|||||||
|
|
||||||
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
||||||
|
|
||||||
|
import { Text } from "preact-i18n";
|
||||||
|
|
||||||
import { Header, Preloader } from "@revoltchat/ui";
|
import { Header, Preloader } from "@revoltchat/ui";
|
||||||
|
|
||||||
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
|
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
|
||||||
@@ -165,7 +167,7 @@ export default function Discover() {
|
|||||||
{isTouchscreenDevice && (
|
{isTouchscreenDevice && (
|
||||||
<Header palette="primary" withTransparency>
|
<Header palette="primary" withTransparency>
|
||||||
<Compass size={27} />
|
<Compass size={27} />
|
||||||
Discover
|
<Text id="app.navigation.tabs.discover" />
|
||||||
</Header>
|
</Header>
|
||||||
)}
|
)}
|
||||||
{!loaded && (
|
{!loaded && (
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ export function Audio() {
|
|||||||
<hr />
|
<hr />
|
||||||
<div className={styles.opus}>
|
<div className={styles.opus}>
|
||||||
<img height="20" src={opusSVG} draggable={false} />
|
<img height="20" src={opusSVG} draggable={false} />
|
||||||
Audio codec powered by Opus
|
<Text id="app.settings.pages.audio.audio_codec" />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ export function Feedback() {
|
|||||||
<CategoryButton
|
<CategoryButton
|
||||||
action="chevron"
|
action="chevron"
|
||||||
icon={<Group size={24} />}
|
icon={<Group size={24} />}
|
||||||
description="You can report issues and discuss improvements with us directly here.">
|
description={<Text id="app.home.join-testers_desc" />}>
|
||||||
Join Testers server.
|
<Text id="app.home.join-testers_desc" />
|
||||||
</CategoryButton>
|
</CategoryButton>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -521,12 +521,12 @@ export const MyBots = observer(() => {
|
|||||||
<Text id="app.settings.pages.bots.create_bot" />
|
<Text id="app.settings.pages.bots.create_bot" />
|
||||||
</CategoryButton>
|
</CategoryButton>
|
||||||
<h5>
|
<h5>
|
||||||
By creating a bot, you are agreeing to the {` `}
|
<Text id="app.settings.pages.bots.usage_policy.a" />{" "}
|
||||||
<a
|
<a
|
||||||
href="https://revolt.chat/aup"
|
href="https://revolt.chat/aup"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
Acceptable Usage Policy
|
<Text id="app.settings.pages.bots.usage_policy.b" />
|
||||||
</a>
|
</a>
|
||||||
.
|
.
|
||||||
</h5>
|
</h5>
|
||||||
|
|||||||
@@ -175,12 +175,12 @@ export const Profile = observer(() => {
|
|||||||
<div className={styles.markdown}>
|
<div className={styles.markdown}>
|
||||||
<Markdown size="24" />
|
<Markdown size="24" />
|
||||||
<h5>
|
<h5>
|
||||||
Descriptions support Markdown formatting,{" "}
|
<Text id="app.settings.tips.markdown.a" />{" "}
|
||||||
<a
|
<a
|
||||||
href="https://developers.revolt.chat/markdown"
|
href="https://developers.revolt.chat/markdown"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
learn more here
|
<Text id="app.settings.tips.markdown.b" />
|
||||||
</a>
|
</a>
|
||||||
.
|
.
|
||||||
</h5>
|
</h5>
|
||||||
@@ -202,9 +202,9 @@ export const Profile = observer(() => {
|
|||||||
<LineDivider />
|
<LineDivider />
|
||||||
<Tip>
|
<Tip>
|
||||||
<span>
|
<span>
|
||||||
Want to change your username?{" "}
|
<Text id="app.settings.tips.profile.a" />{" "}
|
||||||
<a onClick={() => switchPage("account")}>
|
<a onClick={() => switchPage("account")}>
|
||||||
Head over to your account settings.
|
<Text id="app.settings.tips.profile.b" />
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</Tip>
|
</Tip>
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export function Sessions() {
|
|||||||
icon={<LogOut size={24} color={"var(--error)"} />}
|
icon={<LogOut size={24} color={"var(--error)"} />}
|
||||||
action={"chevron"}
|
action={"chevron"}
|
||||||
description={
|
description={
|
||||||
"Logs you out of all sessions except this device."
|
<Text id="app.settings.pages.sessions.logout_long" />
|
||||||
}>
|
}>
|
||||||
<Text id="app.settings.pages.sessions.logout" />
|
<Text id="app.settings.pages.sessions.logout" />
|
||||||
</CategoryButton>
|
</CategoryButton>
|
||||||
|
|||||||
@@ -96,12 +96,12 @@ export const Overview = observer(({ server }: Props) => {
|
|||||||
<div className={styles.markdown}>
|
<div className={styles.markdown}>
|
||||||
<Markdown size="24" />
|
<Markdown size="24" />
|
||||||
<h5>
|
<h5>
|
||||||
Descriptions support Markdown formatting,{" "}
|
<Text id="app.settings.tips.markdown.a" />{" "}
|
||||||
<a
|
<a
|
||||||
href="https://developers.revolt.chat/markdown"
|
href="https://developers.revolt.chat/markdown"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer">
|
rel="noreferrer">
|
||||||
learn more here
|
<Text id="app.settings.tips.markdown.b" />
|
||||||
</a>
|
</a>
|
||||||
.
|
.
|
||||||
</h5>
|
</h5>
|
||||||
|
|||||||
Reference in New Issue
Block a user