Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed title translation #318

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/stories/profile-modal/_types.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InputHTMLAttributes, LiHTMLAttributes } from "react";
import { LiHTMLAttributes } from "react";
import { NextItemArgs } from "../dropdowns/menu/_types";
import { ModalArgs } from "../modals/_types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const StyledButton = styled(Button)`
font-weight: ${(props) => props.theme.fontWeights.semibold};
padding-left: 0;
justify-content: flex-start;
border-radius: 0;
`;

export const PreviousButton = (props: ButtonArgs) => (
Expand Down
10 changes: 5 additions & 5 deletions src/stories/profile-modal/items/settingsMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const SettingsItem = (props: SettingsProps) => {
const content = (
<>
<PreviousButton onClick={() => props.setActive("")} isBasic>
{props.i18n?.settingsTitle ?? "Notifications Settings"}
{props.i18n?.settingsTitle}
</PreviousButton>
<Separator />
<StyledBody>
Expand All @@ -74,16 +74,16 @@ export const SettingsItem = (props: SettingsProps) => {
)}
<Field>
<TriggerTitle isBold>
{props.i18n?.settingsToggle?.title ?? "Allow notifications"}
{props.i18n?.settingsToggle?.title}
</TriggerTitle>
<Toggle
checked={value === 1}
onChange={() => onToggleSettings(value === 1 ? 0 : 1)}
>
<Label>
{value === 1
? props.i18n?.settingsToggle?.on ?? "Yes"
: props.i18n?.settingsToggle?.off ?? "No"}
? props.i18n?.settingsToggle?.on
: props.i18n?.settingsToggle?.off}
</Label>
</Toggle>
</Field>
Expand Down Expand Up @@ -111,7 +111,7 @@ export const SettingsItem = (props: SettingsProps) => {
setActive={props.setActive}
icon={<GearIcon color={theme.palette.blue[600]} />}
>
{props.title}
{props.i18n?.settingsTitle}
</MenuItem>
</>
);
Expand Down
4 changes: 3 additions & 1 deletion src/stories/profile-modal/userMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ export const UserMenu = (props: UserMenuArgs) => {
value={"settings"}
selectedItem={item}
setActive={(i) => toggleItem(i)}
title={props.i18n?.settingsTitle || "Notifications Settings"}
settingValue={props.settingValue}
title={props.i18n?.settingsTitle || "Notifications Settings"}
i18n={{
settingsTitle:
props.i18n?.settingsTitle || "Notifications Settings",
settingsIntroText: props.i18n?.settingsIntroText,
settingsOutroText: props.i18n?.settingsOutroText,
settingsToggle: props.i18n?.settingsToggle,
Expand Down
Loading