-
+
{ submitting && }
diff --git a/jam-ui/src/components/profile/JKEditPassword.js b/jam-ui/src/components/profile/JKEditPassword.js
index 55f199d81..0faec81cf 100644
--- a/jam-ui/src/components/profile/JKEditPassword.js
+++ b/jam-ui/src/components/profile/JKEditPassword.js
@@ -40,7 +40,7 @@ const JKEditPassword = ({ setAlert, toggleAlert }) => {
const { new_password, current_password } = data;
postUpdateAccountPassword(currentUser.id, { current_password, new_password })
.then(response => {
- setAlert('Your password has been successfully updated.');
+ setAlert(t('identity.password_form.alerts.updated'));
setValue('current_password', '');
setValue('new_password', '');
toggleAlert();
@@ -55,7 +55,7 @@ const JKEditPassword = ({ setAlert, toggleAlert }) => {
errors.current_password.forEach(error => {
setError('current_password', {
type: 'manual',
- message: `Current password ${error}`
+ message: `${t('identity.password_form.current_password')} ${error}`
});
});
}
@@ -63,7 +63,7 @@ const JKEditPassword = ({ setAlert, toggleAlert }) => {
errors.password.forEach(error => {
setError('new_password', {
type: 'manual',
- message: `New password ${error}`
+ message: `${t('identity.password_form.new_password')} ${error}`
});
});
}
@@ -81,9 +81,7 @@ const JKEditPassword = ({ setAlert, toggleAlert }) => {
}
try {
await requestPasswordReset(currentUser.id);
- setAlert(
- 'A password reset email has been sent to your email. Please check your email and click the link to reset your password.'
- );
+ setAlert(t('identity.password_form.alerts.password_reset_email_sent'));
toggleAlert();
} catch (error) {
console.log(error);
@@ -97,17 +95,16 @@ const JKEditPassword = ({ setAlert, toggleAlert }) => {
- To update the password associated with your account, enter your current password (for security reasons) and
- the new password, and click the "Save Password" button.
+ {t('identity.password_form.help_text')}
- If you can not remember your current password, Click here to reset
- your password, and you will receive an email with instructions on how to reset your password to the email
- address associated with your JamKazam account.
+ {t('identity.password_form.forgot_password.help_text_p1')} {t('identity.password_form.forgot_password.click_here')} {t('identity.password_form.forgot_password.help_text_p2')}
diff --git a/jam-ui/src/i18n/locales/en/account.json b/jam-ui/src/i18n/locales/en/account.json
index a78f96aae..99ce0c134 100644
--- a/jam-ui/src/i18n/locales/en/account.json
+++ b/jam-ui/src/i18n/locales/en/account.json
@@ -5,7 +5,54 @@
"update_notification": {
"title": "Account Identity Updated"
}
+ },
+ "email_form": {
+ "title": "Email",
+ "help_text": "To update the email associated with your account, enter your current password (for security reasons) and the new email, and click the \"Save Email\" button.",
+ "current_password": "Current Password",
+ "new_email": "New Email",
+ "submit": "Save Email",
+ "validations": {
+ "new_email": {
+ "required": "New Email is required",
+ "pattern": "Email is invalid"
+ },
+ "current_password": {
+ "required": "Current password is required"
+ }
+ },
+ "alerts": {
+ "updated": "Your account identity has been updated.",
+ "confirmation_email_sent": "A confirmation email has been sent to your email address. Please click the link in the email to confirm your email address."
+
+ }
+ },
+ "password_form": {
+ "title": "Password",
+ "help_text": "To update the password associated with your account, enter your current password (for security reasons) and the new password, and click the \"Save Password\" button.",
+ "current_password": "Current Password",
+ "new_password": "New Password",
+ "submit": "Save Password",
+ "validations": {
+ "new_password": {
+ "required": "New Password is required",
+ "pattern": "Password must be at least 8 characters long"
+ },
+ "current_password": {
+ "required": "Current password is required"
+ }
+ },
+ "alerts": {
+ "updated": "Your password has been successfully updated.",
+ "password_reset_email_sent": "A password reset email has been sent to your email. Please check your email and click the link to reset your password."
+ },
+ "forgot_password": {
+ "help_text_p1": "If you can not remember your current password",
+ "click_here": "click here",
+ "help_text_p2": "to reset your password, and you will receive an email with instructions on how to reset your password to the email address associated with your JamKazam account."
+ }
}
+
}
}
\ No newline at end of file
diff --git a/jam-ui/src/i18n/locales/en/profile.json b/jam-ui/src/i18n/locales/en/profile.json
index 2eade7bb7..3c0a61c4e 100644
--- a/jam-ui/src/i18n/locales/en/profile.json
+++ b/jam-ui/src/i18n/locales/en/profile.json
@@ -1,3 +1,23 @@
{
- "page_title": "Profile"
+ "page_title": "Profile",
+ "profeciency": {
+ "beginner": "Beginner",
+ "intermediate": "Intermediate",
+ "advanced": "Advanced"
+ },
+ "basics": "Basics",
+ "interests": "Interests",
+ "instruments": "Instruments",
+ "genres": "Genres",
+ "first_name": "First Name",
+ "last_name": "Last Name",
+ "change_photo": "Change Photo",
+ "country": "Country",
+ "state": "State/Province",
+ "city": "City",
+ "musical_biography": "Musical Biography",
+ "accept_emails": "Accept emails from JamKazam about the JamKazam services",
+ "interest_joining_virtual_band": "I'm interested in joining a virtual/online band",
+ "interest_joining_in_person_band": "I'm interested in joining an in-person band",
+ "interest_cowriting_songs": "I'm interested in co-writing songs with others"
}