[WEB-5430] feat: allow users to change email (#8120)

* feat: change user email

* chore: optimised the logic

* feat: add email change functionality and related modals in profile form

* refactor: format checkEmail method for improved readability

* chore: added rate limit exceeded validation

* feat: implement change email modal with localization support

- Added translation support for the change email modal, including titles, descriptions, and error messages.
- Integrated the useTranslation hook for dynamic text rendering.
- Updated form validation messages to utilize localized strings.
- Enhanced user feedback with localized success and error toast messages.
- Updated button labels and placeholders to reflect localization changes.

* chore: added extra validation in cache key

* fix: format files

---------

Co-authored-by: b-saikrishnakanth <bsaikrishnakanth97@gmail.com>
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Bavisetti Narayan 2025-11-24 21:21:52 +05:30 committed by GitHub
parent d6fce114d6
commit ce6299937f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 2457 additions and 5 deletions

View file

@ -1530,6 +1530,47 @@ export default {
"Jika Anda mengonfirmasi, semua opsi pengurutan, filter, dan tampilan + tata letak yang telah Anda pilih untuk tampilan ini akan dihapus secara permanen tanpa cara untuk memulihkannya.",
},
},
account_settings: {
profile: {
change_email_modal: {
title: "Ubah email",
description: "Masukkan alamat email baru untuk menerima tautan verifikasi.",
toasts: {
success_title: "Berhasil!",
success_message: "Email berhasil diperbarui. Silakan masuk kembali.",
},
form: {
email: {
label: "Email baru",
placeholder: "Masukkan email Anda",
errors: {
required: "Email wajib diisi",
invalid: "Email tidak valid",
exists: "Email sudah ada. Gunakan yang lain.",
validation_failed: "Validasi email gagal. Coba lagi.",
},
},
code: {
label: "Kode unik",
placeholder: "gets-sets-flys",
helper_text: "Kode verifikasi dikirim ke email baru Anda.",
errors: {
required: "Kode unik wajib diisi",
invalid: "Kode verifikasi tidak valid. Coba lagi.",
},
},
},
actions: {
continue: "Lanjutkan",
confirm: "Konfirmasi",
cancel: "Batal",
},
states: {
sending: "Mengirim…",
},
},
},
},
workspace_settings: {
label: "Pengaturan ruang kerja",
page_label: "{workspace} - Pengaturan Umum",