mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) missing translation
This commit is contained in:
parent
7e0ea151e6
commit
7c918ff497
@ -5,6 +5,7 @@
|
||||
- Improved calendars loading time
|
||||
- Refactored and documented the availability-slot-reservation data model
|
||||
- Display bookers names to connected users now apply to all resources
|
||||
- Fix a bug: missing translation for avatar changing
|
||||
- Fix a bug: unable to book a space's slot with an existing reservation
|
||||
- Fix a bug: Unable to import accounts from SSO when the transformation modal was opened but leaved empty
|
||||
- Fix a bug: Unable to change the group of a user
|
||||
|
@ -7,6 +7,7 @@ import { FieldPathValue } from 'react-hook-form/dist/types/path';
|
||||
import { FieldValues } from 'react-hook-form/dist/types/fields';
|
||||
import { FormInput } from '../form/form-input';
|
||||
import { Avatar } from './avatar';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface AvatarInputProps<TFieldValues> {
|
||||
register: UseFormRegister<TFieldValues>,
|
||||
@ -20,6 +21,8 @@ interface AvatarInputProps<TFieldValues> {
|
||||
* This component allows to set the user's avatar, in forms managed by react-hook-form.
|
||||
*/
|
||||
export const AvatarInput = <TFieldValues extends FieldValues>({ currentAvatar, userName, register, setValue, size }: AvatarInputProps<TFieldValues>) => {
|
||||
const { t } = useTranslation('shared');
|
||||
|
||||
const [avatar, setAvatar] = useState<string|ArrayBuffer>(currentAvatar);
|
||||
/**
|
||||
* Check if the provided user has a configured avatar
|
||||
@ -70,8 +73,8 @@ export const AvatarInput = <TFieldValues extends FieldValues>({ currentAvatar, u
|
||||
<Avatar avatar={avatar} userName={userName} size="large" />
|
||||
<div className="buttons">
|
||||
<FabButton onClick={onAddAvatar} className="select-button">
|
||||
{!hasAvatar() && <span>Add an avatar</span>}
|
||||
{hasAvatar() && <span>Change</span>}
|
||||
{!hasAvatar() && <span>{t('app.shared.avatar_input.add_an_avatar')}</span>}
|
||||
{hasAvatar() && <span>{t('app.shared.avatar_input.change')}</span>}
|
||||
<FormInput className="avatar-file-input"
|
||||
type="file"
|
||||
accept="image/*"
|
||||
|
@ -55,8 +55,10 @@ en:
|
||||
url_placeholder: "Paste url…"
|
||||
website_invalid: "The website address is not a valid URL"
|
||||
#user edition form
|
||||
user_profile_form:
|
||||
avatar_input:
|
||||
add_an_avatar: "Add an avatar"
|
||||
change: "Change"
|
||||
user_profile_form:
|
||||
personal_data: "Personal"
|
||||
account_data: "Account"
|
||||
account_networks: "Social networks"
|
||||
|
Loading…
x
Reference in New Issue
Block a user