Skip to content

Commit

Permalink
Adjusting labels, adding confirm prompt when email is about to be upd…
Browse files Browse the repository at this point in the history
…ated.
  • Loading branch information
krulis-martin committed Feb 25, 2025
1 parent e5f597c commit 3163af7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"app.user.diffBox.firstName": "Křestní jméno",
"app.user.diffBox.lastLoaded": "Naposledy načteno",
"app.user.diffBox.lastName": "Příjmení",
"app.user.diffBox.login": "Login",
"app.user.diffBox.login": "LDAP ID (SIS/CAS login)",
"app.user.diffBox.notLoadedYet": "ještě nenačteno",
"app.user.diffBox.title": "Uživatelský profil",
"app.user.diffBox.titlesAfterName": "Tituly před jménem",
Expand All @@ -119,6 +119,7 @@
"app.user.sisUserFailedCallout": "Načítání dat ze SISu selhalo.",
"app.user.sisUserLoadedCallout": "Data ze SISu byla úspěšně načtena.",
"app.user.syncButton": "Aktualizovat profil v ReCodExu daty ze SISu",
"app.user.syncButtonConfirmEmail": "Chystáte se změnit váš e-mail. Po změně bude vyžadováno ověření nové e-mailové adresy v ReCodExu. E-mailová adresa je také používána jako vaše lokální přihlašovací jméno, pokud již máte lokální účet (vaše lokální heslo se nezmění).",
"app.user.title": "Osobní údaje",
"app.user.userSyncCanceledCallout": "Synchronizace uživatelských dat byla přerušena, protože profil z ReCodExu byl zastaralý a bylo nutné jej znovu načíst. Prosíme, zahajte aktualizaci dat znovu, pokud je to stále žádoucí.",
"app.user.userSyncFailedCallout": "Synchronizace uživatele selhala. Prosíme, znovu načťete stránku a opakujte akci později.",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"app.user.diffBox.firstName": "First name",
"app.user.diffBox.lastLoaded": "Last loaded",
"app.user.diffBox.lastName": "Last name",
"app.user.diffBox.login": "Login",
"app.user.diffBox.login": "LDAP ID (SIS/CAS login)",
"app.user.diffBox.notLoadedYet": "not loaded yet",
"app.user.diffBox.title": "User's profile",
"app.user.diffBox.titlesAfterName": "Titles after",
Expand All @@ -119,6 +119,7 @@
"app.user.sisUserFailedCallout": "SIS data (re)loading failed.",
"app.user.sisUserLoadedCallout": "The SIS user data were successfully (re)loaded.",
"app.user.syncButton": "Update ReCodEx profile with data from SIS",
"app.user.syncButtonConfirmEmail": "You are about to update your e-mail address so you will be required to verify it afterwards in ReCodEx. The e-mail address is also used as your local login if you already have local account (yout local password will not be changed).",
"app.user.title": "Personal Data",
"app.user.userSyncCanceledCallout": "User sync operation was canceled, because the ReCodEx profile data were outdated and needed to be reloaded. Please, re-start the operation if it is still desired.",
"app.user.userSyncFailedCallout": "User sync operation failed. Reload the page and try again later.",
Expand Down
11 changes: 10 additions & 1 deletion src/pages/User/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const comparedProperties = [
id: 'login',
key: ['sisLogin'],
sisKey: ['login'],
caption: <FormattedMessage id="app.user.diffBox.login" defaultMessage="Login" />,
caption: <FormattedMessage id="app.user.diffBox.login" defaultMessage="LDAP ID (SIS/CAS login)" />,
},
{
id: 'titlesBeforeName',
Expand Down Expand Up @@ -236,6 +236,15 @@ class User extends Component {
<Button
variant={isUserSyncFailed ? 'danger' : 'success'}
disabled={isUserSyncing}
confirm={
diffIndex.email ? (
<FormattedMessage
id="app.user.syncButtonConfirmEmail"
defaultMessage="You are about to update your e-mail address so you will be required to verify it afterwards in ReCodEx. The e-mail address is also used as your local login if you already have local account (yout local password will not be changed)."
/>
) : null
}
confirmId="email-sync-confirm"
onClick={() => syncUser(user.id)}>
{isUserSyncing ? <LoadingIcon gapRight /> : <Icon icon="left-long" gapRight />}
<FormattedMessage
Expand Down

0 comments on commit 3163af7

Please sign in to comment.