diff --git a/.tolgee/migration-status.json b/.tolgee/migration-status.json new file mode 100644 index 0000000..2309b2e --- /dev/null +++ b/.tolgee/migration-status.json @@ -0,0 +1,62 @@ +{ + "src/components/LoginForm.jsx": { + "migrated": true, + "keys": [ + { + "name": "chat-application-title", + "description": "Error message shown when login credentials are incorrect", + "default": "Oops, incorrect credentials." + }, + { + "name": "start-chatting-button", + "description": "Title of the chat application displayed at the top of the login form", + "default": "Chat Application" + }, + { + "name": "", + "description": "Placeholder text for the username input field", + "default": "Username" + }, + { + "name": "", + "description": "Placeholder text for the password input field", + "default": "Password" + }, + { + "name": "", + "description": "Text for the button to start chatting after login", + "default": "Start chatting" + } + ] + }, + "src/components/MessageForm.jsx": { + "migrated": true, + "keys": [ + { + "name": "", + "description": "Placeholder text for the message input field in the chat", + "default": "Send a message..." + } + ] + }, + "src/components/MyMessage.jsx": { + "migrated": true, + "keys": [ + { + "name": "", + "description": "Alt text for message attachment image", + "default": "message-attachment" + } + ] + }, + "src/components/TheirMessage.jsx": { + "migrated": true, + "keys": [ + { + "name": "", + "description": "Alt text for message attachment image", + "default": "message-attachment" + } + ] + } +} \ No newline at end of file diff --git a/src/components/LoginForm.jsx b/src/components/LoginForm.jsx index 69dda80..44550a9 100644 --- a/src/components/LoginForm.jsx +++ b/src/components/LoginForm.jsx @@ -1,9 +1,11 @@ import { useState } from 'react'; import axios from 'axios'; +import { T, useTranslate } from '@tolgee/react'; const projectID = '1b7801d6-8a66-4be4-a442-89219d833dfc'; const Modal = () => { + const { t } = useTranslate(); const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); @@ -22,20 +24,25 @@ const Modal = () => { window.location.reload(); setError(''); } catch (err) { - setError('Oops, incorrect credentials.'); + setError( +t('incorrect-credentials-error')); } }; return (