Skip to content

Commit

Permalink
Merge pull request #107 from Effently/contribution
Browse files Browse the repository at this point in the history
Update RU translate & Add translate strings
  • Loading branch information
SupertigerDev authored Oct 15, 2024
2 parents 56cfa58 + beabb12 commit 11eefb7
Show file tree
Hide file tree
Showing 42 changed files with 295 additions and 165 deletions.
3 changes: 2 additions & 1 deletion src/components/ChangelogModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { FlexColumn } from "./ui/Flexbox";
import LegacyModal from "./ui/legacy-modal/LegacyModal";
import Text from "./ui/Text";
import env from "@/common/env";
import { t } from "i18next";
import { Show } from "solid-js";

export function ChangelogModal(props: { close: () => void }) {
Expand Down Expand Up @@ -37,7 +38,7 @@ export function ChangelogModal(props: { close: () => void }) {

return (
<LegacyModal
title="Changelog"
title={t("settings.drawer.changelog")}
close={props.close}
actionButtons={ActionButtons}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/explore/ExploreDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ function SupportItem() {
/>
<div>
<Text style={{ "font-weight": "bold" }}>
{t("settings.drawer.supportMe")}
{t("supportBlock.support")}
</Text>
<div>
<Text size={12}>Donate to get a supporter badge!</Text>
<Text size={12}>{t("supportBlock.supportDescription")}</Text>
</div>
</div>
</FlexRow>
Expand Down
2 changes: 1 addition & 1 deletion src/components/member-context-menu/MemberContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function Header(props: { userId: string }) {

<Show when={audio() && !isMe()}>
<div class={styles.voiceVolume}>
<div class={styles.label}>Call Volume</div>
<div class={styles.label}>{t("userContextMenu.callVolume")}</div>
<input
type="range"
min={0}
Expand Down
61 changes: 32 additions & 29 deletions src/components/settings/AccountSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ export default function AccountSettings() {

createEffect(() => {
header.updateHeader({
title: "Settings - Account",
title: t("settings.account.title"),
iconName: "settings",
});
});

return (
<Container>
<Breadcrumb>
<BreadcrumbItem href="/app" icon="home" title="Dashboard" />
<BreadcrumbItem href="/app" icon="home" title={t("dashboard.title")} />
<BreadcrumbItem
title={t("settings.drawer.account")}
href="../account"
Expand Down Expand Up @@ -217,7 +217,7 @@ export function EditAccountPage(props: {
.finally(() => setRequestSent(false));
};

const requestStatus = () => (requestSent() ? "Saving..." : "Save Changes");
const requestStatus = () => (requestSent() ? t("settings.account.saving") : t("settings.account.saveChangesButton"));

const { createPortal } = useCustomPortal();

Expand Down Expand Up @@ -285,7 +285,7 @@ export function EditAccountPage(props: {
z-index: 111;
`}
icon="email"
label="Email"
label={t("settings.account.email")}
>
<Input
value={inputValues().email}
Expand All @@ -294,14 +294,14 @@ export function EditAccountPage(props: {
</SettingsBlock>
</Show>

<SettingsBlock icon="face" label="Username">
<SettingsBlock icon="face" label={t("settings.account.username")}>
<Input
value={inputValues().username}
onText={(v) => setInputValue("username", v)}
/>
</SettingsBlock>

<SettingsBlock icon="local_offer" label="Tag">
<SettingsBlock icon="local_offer" label={t("settings.account.tag")}>
<Input
class={css`
width: 52px;
Expand All @@ -313,8 +313,8 @@ export function EditAccountPage(props: {

<SettingsBlock
icon="wallpaper"
label="Avatar"
description="Supported: JPG, PNG, GIF, WEBP, Max 12 MB"
label={t("settings.account.avatar")}
description={t("settings.account.supported") + ": JPG, PNG, GIF, WEBP, Max 12 MB"}
>
<FileBrowser
accept="images"
Expand All @@ -341,15 +341,15 @@ export function EditAccountPage(props: {
<Button
iconSize={18}
iconName="attach_file"
label="Browse"
label={t("settings.account.browse")}
onClick={avatarFileBrowserRef()?.open}
/>
</SettingsBlock>

<SettingsBlock
icon="panorama"
label="Banner"
description="Supported: JPG, PNG, GIF, WEBP, Max 12 MB"
label={t("settings.account.banner")}
description={t("settings.account.supported") + ": JPG, PNG, GIF, WEBP, Max 12 MB"}
>
<FileBrowser
accept="images"
Expand All @@ -372,15 +372,15 @@ export function EditAccountPage(props: {
<Button
iconSize={18}
iconName="attach_file"
label="Browse"
label={t("settings.account.browse")}
onClick={bannerFileBrowserRef()?.open}
/>
</SettingsBlock>

<SettingsBlock
icon="info"
label="Profile"
description="Edit your bio or colors"
label={t("settings.account.profile")}
description={t("settings.account.profileDescription")}
href="./profile"
>
<Icon name="keyboard_arrow_right" />
Expand All @@ -390,21 +390,21 @@ export function EditAccountPage(props: {
onClick={onChangePasswordClick}
style={{ "margin-bottom": "5px" }}
>
Change Password
{t("settings.account.changePassword")}
</ChangePasswordButton>
<ChangePasswordButton
onClick={onForgotPasswordClick}
style={{ "margin-bottom": "5px" }}
>
Forgot Password
{t("settings.account.forgotPassword")}
</ChangePasswordButton>
</Show>

<Show when={!props.bot && showResetPassword()}>
<SettingsBlock
icon="password"
label="New Password"
description="Changing your password will log you out everywhere else."
label={t("settings.account.newPassword")}
description={t("settings.account.newPasswordDescription")}
>
<Input
type="password"
Expand All @@ -414,8 +414,8 @@ export function EditAccountPage(props: {
</SettingsBlock>
<SettingsBlock
icon="password"
label="Confirm New Password"
description="Confirm your new password"
label={t("settings.account.confirmNewPassword")}
description={t("settings.account.confirmNewPasswordDescription")}
>
<Input
type="password"
Expand All @@ -426,7 +426,10 @@ export function EditAccountPage(props: {
</Show>

<Show when={!props.bot && Object.keys(updatedInputValues()).length}>
<SettingsBlock icon="password" label="Confirm Password">
<SettingsBlock
icon="password"
label={t("settings.account.confirmCurrentPassword")}
>
<Input
type="password"
value={inputValues().password}
Expand Down Expand Up @@ -537,16 +540,16 @@ function DeleteAccountBlock() {
<SettingsBlock
class={deleteAccountBlockStyles}
icon="delete"
label="Delete My Account"
description="This cannot be undone!"
label={t("settings.account.deleteAccount")}
description={t("settings.account.deleteAccountDescription")}
>
<Button
onClick={onClick}
iconSize={18}
primary
color="var(--alert-color)"
iconName="delete"
label="Delete My Account"
label={t("settings.account.deleteAccount")}
/>
</SettingsBlock>
);
Expand All @@ -561,14 +564,14 @@ function DeleteAccountNoticeModal(props: { close(): void }) {
<Button
iconName="check"
styles={{ "margin-left": "auto" }}
label="Understood"
label={t("settings.account.understoodButton")}
onClick={props.close}
/>
}
maxWidth={300}
>
<Text style={{ padding: "10px" }}>
You must leave/delete all servers before you can delete your account.
{t("settings.account.deleteAccountNotice")}
</Text>
</LegacyModal>
);
Expand Down Expand Up @@ -650,9 +653,9 @@ function ChannelNoticeBlock(props: { botToken?: string | null }) {
>
<SettingsBlock
icon="info"
label="Channel Notice"
label={t("settings.account.channelNotice")}
class={NoticeBlockStyle}
description="Shows when the user is about to chat for the first time. Changes apply after reload."
description={t("settings.account.channelNoticeDescription")}
>
<Text size={12} style={{ "margin-left": "38px", "margin-top": "5px" }}>
({inputValues().content.length} / 300)
Expand Down Expand Up @@ -691,7 +694,7 @@ function ChannelNoticeBlock(props: { botToken?: string | null }) {
/>
</Show>
<Show when={updatedInputValues().content}>
<Button label="Save" iconName="save" onClick={save} />
<Button label={t("settings.account.saveButton")} iconName="save" onClick={save} />
</Show>
</div>
</SettingsBlock>
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/ActivityStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function WindowSettings() {
return (
<Container>
<Breadcrumb>
<BreadcrumbItem href="/app" icon="home" title="Dashboard" />
<BreadcrumbItem href="/app" icon="home" title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.activity-status")!} />
</Breadcrumb>

Expand Down
4 changes: 2 additions & 2 deletions src/components/settings/CallSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Container = styled("div")`



export default function NotificationsSettings() {
export default function CallSettings() {
const { header } = useStore();


Expand All @@ -38,7 +38,7 @@ export default function NotificationsSettings() {
return (
<Container>
<Breadcrumb>
<BreadcrumbItem href='/app' icon='home' title="Dashboard" />
<BreadcrumbItem href='/app' icon='home' title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.call-settings")} />
</Breadcrumb>
<Notice type="info" description="Changes will be applied on your next calls." />
Expand Down
8 changes: 4 additions & 4 deletions src/components/settings/ConnectionsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const Container = styled("div")`
padding: 10px;
`;

export default function NotificationsSettings() {
export default function ConnectionsSettings() {
const { header } = useStore();

createEffect(() => {
header.updateHeader({
title: "Settings - Notifications",
title: "Settings - Connections",
iconName: "settings"
});
});
Expand All @@ -29,7 +29,7 @@ export default function NotificationsSettings() {
return (
<Container>
<Breadcrumb>
<BreadcrumbItem href='/app' icon='home' title="Dashboard" />
<BreadcrumbItem href='/app' icon='home' title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.connections")} />
</Breadcrumb>
<Connections/>
Expand All @@ -50,7 +50,7 @@ function Connections() {

function GoogleLink() {
const {account} = useStore();
const isConnected = () => account.user()?.connections.find(c => c.provider === "GOOGLE");
const isConnected = () => account.user()?.connections?.find(c => c.provider === "GOOGLE");

const linkGoogle = () => {
createGoogleAccountLink().then(url => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/CustomCssSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function CustomCssSettings() {
return (
<Container>
<Breadcrumb style={{ "margin-bottom": "8px" }}>
<BreadcrumbItem href="/app" icon="home" title="Dashboard" />
<BreadcrumbItem href="/app" icon="home" title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.interface")} href="../" />
<BreadcrumbItem title="Custom CSS" />
</Breadcrumb>
Expand Down
4 changes: 2 additions & 2 deletions src/components/settings/ExperimentSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Container = styled("div")`
padding: 10px;
`;

export default function LanguageSettings() {
export default function ExperimentsSettings() {
const { header } = useStore();

createEffect(() => {
Expand All @@ -33,7 +33,7 @@ export default function LanguageSettings() {
return (
<Container>
<Breadcrumb>
<BreadcrumbItem href="/app" icon="home" title="Dashboard" />
<BreadcrumbItem href="/app" icon="home" title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.experiments")} />
</Breadcrumb>

Expand Down
4 changes: 2 additions & 2 deletions src/components/settings/InterfaceSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ export default function InterfaceSettings() {

createEffect(() => {
header.updateHeader({
title: "Settings - Notifications",
title: "Settings - Interface",
iconName: "settings",
});
});

return (
<Container>
<Breadcrumb>
<BreadcrumbItem href="/app" icon="home" title="Dashboard" />
<BreadcrumbItem href="/app" icon="home" title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.interface")} />
</Breadcrumb>
<BlurEffect />
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/LanguageSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function LanguageSettings() {
return (
<Container>
<Breadcrumb>
<BreadcrumbItem href='/app' icon='home' title="Dashboard" />
<BreadcrumbItem href='/app' icon='home' title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.language")} />
</Breadcrumb>
<For each={languageKeys}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings/NotificationsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function NotificationsSettings() {
return (
<Container>
<Breadcrumb>
<BreadcrumbItem href="/app" icon="home" title="Dashboard" />
<BreadcrumbItem href="/app" icon="home" title={t("dashboard.title")} />
<BreadcrumbItem title={t("settings.drawer.notifications")} />
</Breadcrumb>
<DesktopNotification />
Expand Down
Loading

0 comments on commit 11eefb7

Please sign in to comment.