see requirements for 706

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-11-11 09:03:22 -07:00
parent 5411d4152c
commit 9cd8030808
4 changed files with 28 additions and 7 deletions

View File

@@ -189,6 +189,7 @@ function saveTranslation() {
errorToast(genericErrorMessage());
return;
}
var userCanDelete = $(".translation-delete").length > 0;
Swal.fire({
title: 'Save Translation',
html: `
@@ -200,7 +201,7 @@ function saveTranslation() {
const translationFileName = $("#translationFileName").val();
if (!translationFileName || translationFileName.trim() == '') {
Swal.showValidationMessage(`Please enter a valid file name`);
} else if (translationFileName.trim() == 'en_US') {
} else if (translationFileName.trim() == 'en_US' && !userCanDelete) {
Swal.showValidationMessage(`en_US is reserved, please enter a different name`);
}
return { translationFileName }
@@ -270,6 +271,9 @@ function downloadAllTranslations() {
}
})
}
function deleteTranslationKey(e) {
$(e).parent().parent().remove();
}
//tabs reorder
function showTabReorderModal() {
//reorder the list items based on the CSS attribute