Skip to content

Commit

Permalink
fix: add translations for notifier profile update and creation (#65)
Browse files Browse the repository at this point in the history
fix(ui): remove IconButtons for start adornment in social links
  • Loading branch information
spaenleh authored Jan 10, 2024
1 parent 5833b00 commit 3db33c0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/components/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Root = (): JSX.Element => (
<App />
</ThemeProvider>
</I18nextProvider>
{import.meta.env.DEV && <ReactQueryDevtools initialIsOpen />}
{import.meta.env.DEV && <ReactQueryDevtools />}
</QueryClientProvider>
);

Expand Down
6 changes: 2 additions & 4 deletions src/components/common/TextField.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { IconButton, InputAdornment, SvgIcon, TextField } from '@mui/material';
import { InputAdornment, SvgIcon, TextField } from '@mui/material';

interface Props {
label: string;
Expand Down Expand Up @@ -44,9 +44,7 @@ const TextFieldWithValidation = ({
Icon && {
startAdornment: (
<InputAdornment position="start">
<IconButton edge="end">
<Icon />
</IconButton>
<Icon />
</InputAdornment>
),
}
Expand Down
5 changes: 0 additions & 5 deletions src/components/main/StatusBar.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import React from 'react';

import CloseIcon from '@mui/icons-material/Close';
import { styled } from '@mui/material';
import IconButton from '@mui/material/IconButton';
import Snackbar from '@mui/material/Snackbar';
import SnackbarContent from '@mui/material/SnackbarContent';
import { grey } from '@mui/material/colors';

// eslint-disable-next-line import/no-extraneous-dependencies
import Uppy from '@uppy/core';
// eslint-disable-next-line import/no-extraneous-dependencies
import { StatusBar as UppyStatusBar } from '@uppy/react';
// eslint-disable-next-line import/no-extraneous-dependencies
import '@uppy/status-bar/dist/style.css';

const StyledSnackbarContent = styled(SnackbarContent)(() => ({
Expand Down
6 changes: 4 additions & 2 deletions src/config/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const getErrorMessageFromPayload = (
};

const getSuccessMessageFromPayload = (payload?: SuccessPayload) =>
i18n.t(payload?.message ?? 'The operation successfully proceeded');
payload?.message ?? 'The operation successfully proceeded';

export default ({
type,
Expand All @@ -70,7 +70,9 @@ export default ({
}
case postPublicProfileRoutine.SUCCESS:
case patchPublicProfileRoutine.SUCCESS: {
message = getSuccessMessageFromPayload(payload);
message = i18n.t(
payload?.message ?? 'The operation successfully proceeded',
);
break;
}

Expand Down
15 changes: 3 additions & 12 deletions src/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"STORAGE_TITLE": "Storage",
"STORAGE_TEXT": "Graasp provides a limited free storage for its users. In a near future, user plans will be available to unlock more data storage. If you are interested, let us know by contacting <0>{{email}}</0>.",
"STORAGE_INFO": "Storage takes into account all uploaded files such as PDF, images, videos, audio, etc. Folders, apps and Graasp documents are not included.",

"CROP_IMAGE_MODAL_CONTENT_TEXT": "Crop your chosen image to fit the image size requirements.",
"CROP_IMAGE_MODAL_TITLE": "Crop Image",
"CONFIRM_BUTTON": "Confirm",
Expand All @@ -12,7 +11,6 @@
"MAIN_MENU_PUBLIC_PROFILE": "Public Profile",
"MAIN_MENU_STORAGE": "Storage",
"SAVE_ACTIONS_TOGGLE_TOOLTIP": "Coming soon!",

"PROFILE_TITLE": "Profile",
"PROFILE_MEMBER_ID_TITLE": "Member ID",
"PROFILE_LANGUAGE_TITLE": "Language",
Expand All @@ -24,41 +22,34 @@
"PROFILE_DELETE_ACCOUNT_MODAL_INFORMATION": "Your account will be deleted permanently.",
"PROFILE_DELETE_ACCOUNT_MODAL_CONFIRM_BUTTON": "Delete Permanently",
"PROFILE_DELETE_ACCOUNT_MODAL_CANCEL_BUTTON": "Cancel",

"PROFILE_DELETE_ACCOUNT_TITLE": "Delete my account",
"PROFILE_DELETE_ACCOUNT_BUTTON": "Delete Account",
"PROFILE_DELETE_ACCOUNT_INFORMATION": "Once you delete an account, there is no going back. Please be certain.",

"PROFILE_AVATAR_TITLE": "Profile Picture",
"PROFILE_AVATAR_INFORMATION": "Update Profile picture",
"PROFILE_AVATAR_CURRENT_ALT": "Profile Picture",

"PASSWORD_SETTINGS_TITLE": "Change Password",
"PASSWORD_SETTINGS_CURRENT_LABEL": "Current Password",
"PASSWORD_SETTINGS_CURRENT_INFORMATION": "Leave this field empty if you do not already have a password set.",
"PASSWORD_SETTINGS_NEW_LABEL": "New Password",
"PASSWORD_SETTINGS_NEW_CONFIRM_LABEL": "Confirm Password",
"PASSWORD_SETTINGS_CONFIRM_BUTTON": "Update password",

"PASSWORD_SETTINGS_CONFIRM_INFORMATION": "Make sure it is at least 8 characters including a number, a lowercase letter and an uppercase letter.",
"PASSWORD_SETTINGS_REQUEST_RESET_BUTTON": "Request a reset",

"STOCKAGE_INFO": "Storage takes into account all uploaded files such as PDF, images, videos, audio, etc. Folders, apps and Graasp documents are not included.",

"PUBLIC_PROFILE_TITLE": "Public Profile Setting",
"PUBLIC_PROFILE_DESCRIPTION": "Personalize your public profile to let other users interested in your work know a bit more about you. You can make it private anytime.",
"PUBLIC_PROFILE_LINKEDIN_LINK": "LinkedIn ID",
"PUBLIC_PROFILE_LINKEDIN_LINK_ERROR_MSG": "LinkedIn Link is not a valid url",
"PUBLIC_PROFILE_TWITTER_LINK": "Twitter ID",
"PUBLIC_PROFILE_TWITTER_LINK_ERROR_MSG": "Twitter Link is not a valid url",

"PUBLIC_PROFILE_FACEBOOK_LINK": "Facebook ID",
"PUBLIC_PROFILE_FACEBOOK_LINK_ERROR_MSG": "facebook Link is not a valid url",

"PUBLIC_PROFILE_BIO": "Bio",
"PUBLIC_PROFILE_BIO_ERROR_MSG": "Bio is a required field",

"PUBLIC_PROFILE_VISIBILITY": "Make this profile public",
"PUBLIC_PROFILE_SUBMIT_TEXT": "Save Changes",
"PUBLIC_PROFILE_CHECK_TEXT": "Check Profile"
"PUBLIC_PROFILE_CHECK_TEXT": "Check Profile",
"PATCH_PROFILE": "Public profile successfully updated",
"POST_PROFILE": "Public profile successfully created"
}

0 comments on commit 3db33c0

Please sign in to comment.