Skip to content

Commit

Permalink
fix: use translation for the text in tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
rayacers committed Mar 8, 2023
1 parent 6027d90 commit 7651325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/item/settings/ItemSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const ItemSettings: FC<Props> = ({ item }) => {

const renderSaveActionsSetting = () => {
const control = (
<Tooltip title="Coming soon!">
<Tooltip title={translateBuilder(BUILDER.SAVE_ACTIONS_TOGGLE_TOOLTIP)}>
<span>
<Switch
id={SETTINGS_SAVE_ACTIONS_TOGGLE_ID}
Expand Down
8 changes: 6 additions & 2 deletions src/components/member/MemberProfileScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@mui/material';

import { MUTATION_KEYS } from '@graasp/query-client';
import { ACCOUNT, COMMON } from '@graasp/translations';
import { ACCOUNT, BUILDER, COMMON } from '@graasp/translations';
import { Loader } from '@graasp/ui';

import {
Expand All @@ -19,6 +19,7 @@ import {
} from '../../config/constants';
import i18n, {
useAccountTranslation,
useBuilderTranslation,
useCommonTranslation,
} from '../../config/i18n';
import notifier from '../../config/notifier';
Expand Down Expand Up @@ -47,6 +48,7 @@ import PasswordSetting from './PasswordSetting';
const MemberProfileScreen = (): JSX.Element => {
const { t } = useAccountTranslation();
const { t: translateCommon } = useCommonTranslation();
const { t: translateBuilder } = useBuilderTranslation();
const { data: member, isLoading } = useCurrentUserContext();
const { mutate: editMember } = useMutation<
any,
Expand Down Expand Up @@ -160,7 +162,9 @@ const MemberProfileScreen = (): JSX.Element => {
<Typography>{t(ACCOUNT.PROFILE_SAVE_ACTIONS_TITLE)}</Typography>
</Grid>
<Grid item xs={8}>
<Tooltip title="Coming soon!">
<Tooltip
title={translateBuilder(BUILDER.SAVE_ACTIONS_TOGGLE_TOOLTIP)}
>
<span>
<Switch
id={MEMBER_PROFILE_SAVE_ACTIONS_TOGGLE_ID}
Expand Down

0 comments on commit 7651325

Please sign in to comment.