mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
Confirming to delete accoutn works with both English and the chosen locale of the user
This commit is contained in:
parent
ce2b38c084
commit
cb5184f2f1
@ -95,7 +95,10 @@ async function UIWindowFinalizeUserDeletion(options){
|
|||||||
$(el_window).find('.error-message').hide();
|
$(el_window).find('.error-message').hide();
|
||||||
// if user is temporary, check if they typed 'confirm'
|
// if user is temporary, check if they typed 'confirm'
|
||||||
if(window.user.is_temp){
|
if(window.user.is_temp){
|
||||||
if($(el_window).find('.confirm-temporary-user-deletion').val() !== 'confirm'){
|
const confirm = $(el_window).find('.confirm-temporary-user-deletion').val().toLowerCase();
|
||||||
|
|
||||||
|
// user must type 'confirm' or the translation of 'confirm' to delete their account
|
||||||
|
if(confirm !== 'confirm' && confirm !== i18n('confirm').toLowerCase()){
|
||||||
$(el_window).find('.error-message').html(i18n('type_confirm_to_delete_account'), false);
|
$(el_window).find('.error-message').html(i18n('type_confirm_to_delete_account'), false);
|
||||||
$(el_window).find('.error-message').show();
|
$(el_window).find('.error-message').show();
|
||||||
return;
|
return;
|
||||||
|
@ -49,6 +49,7 @@ const en = {
|
|||||||
close_all_windows_and_log_out: 'Close Windows and Log Out',
|
close_all_windows_and_log_out: 'Close Windows and Log Out',
|
||||||
change_always_open_with: "Do you want to always open this type of file with",
|
change_always_open_with: "Do you want to always open this type of file with",
|
||||||
color: 'Color',
|
color: 'Color',
|
||||||
|
confirm: 'Confirm',
|
||||||
confirm_2fa_setup: 'I have added the code to my authenticator app',
|
confirm_2fa_setup: 'I have added the code to my authenticator app',
|
||||||
confirm_2fa_recovery: 'I have saved my recovery codes in a secure location',
|
confirm_2fa_recovery: 'I have saved my recovery codes in a secure location',
|
||||||
confirm_account_for_free_referral_storage_c2a: 'Create an account and confirm your email address to receive 1 GB of free storage. Your friend will get 1 GB of free storage too.',
|
confirm_account_for_free_referral_storage_c2a: 'Create an account and confirm your email address to receive 1 GB of free storage. Your friend will get 1 GB of free storage too.',
|
||||||
|
@ -41,6 +41,7 @@ const nl = {
|
|||||||
close_all_windows_and_log_out: 'Alle schermen sluiten en afmelden',
|
close_all_windows_and_log_out: 'Alle schermen sluiten en afmelden',
|
||||||
change_always_open_with: "Dit type bestand altijd openen met",
|
change_always_open_with: "Dit type bestand altijd openen met",
|
||||||
color: 'Kleur',
|
color: 'Kleur',
|
||||||
|
confirm: 'Bevestig',
|
||||||
confirm_account_for_free_referral_storage_c2a: 'Maak een account en bevestig uw emailadres om 1 GB aan gratis opslag te ontvangen. Uw vriend krijgt ook 1 GB aan gratis opslag.',
|
confirm_account_for_free_referral_storage_c2a: 'Maak een account en bevestig uw emailadres om 1 GB aan gratis opslag te ontvangen. Uw vriend krijgt ook 1 GB aan gratis opslag.',
|
||||||
confirm_delete_multiple_items: 'Weet u zeker dat u deze bestanden permanent wilt verwijderen?',
|
confirm_delete_multiple_items: 'Weet u zeker dat u deze bestanden permanent wilt verwijderen?',
|
||||||
confirm_delete_single_item: 'Weet u zeker dat u dit bestand permanent wilt verwijderen?',
|
confirm_delete_single_item: 'Weet u zeker dat u dit bestand permanent wilt verwijderen?',
|
||||||
|
Loading…
Reference in New Issue
Block a user