add translation for PARTIAL_IMPORT and CONFIGURATION_FILE_MISMATCH

This commit is contained in:
gabryon99 2020-10-01 22:08:04 +02:00
parent a375a3b925
commit db46c48d7a
4 changed files with 7 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -760,7 +760,7 @@ class NtopUtils {
try { jsonConfiguration = JSON.parse(reader.result); } catch (e) { }
if (!jsonConfiguration) {
$("#import-error").text(`${i18n.invalid_file}`).show();
$("#import-error").text(i18n.rest_consts[responseJSON.rc_str] || 'Not Implemented Yet').show();
$button.removeAttr("disabled");
return;
}
@ -799,8 +799,8 @@ class NtopUtils {
if (responseJSON && responseJSON.rc > 0) return;
// TODO: better error message
$("#import-error").text(`OPS`).show();
console.log(responseJSON);
$("#import-error").text(i18n.rest_consts[responseJSON.rc_str] || 'Not Implemented Yet').show();
})
.always(() => {

View file

@ -3769,6 +3769,7 @@ local lang = {
["BAD_FORMAT"] = "Bad format",
["BIND_POOL_MEMBER_ALREADY_BOUND"] = "Unable to bind member which is already bound to another pool",
["BIND_POOL_MEMBER_FAILED"] = "Unable to bind the sumbitted member to the pool",
["CONFIGURATION_FILE_MISMATCH"] = "The uploaded file is not a valid configuration file!",
["DELETE_POOL_FAILED"] = "Unable to delete a pool with the submitted params",
["EDIT_POOL_FAILED"] = "Unable to edit a pool with the submitted params",
["INTERNAL_ERROR"] = "Internal error",
@ -3780,6 +3781,7 @@ local lang = {
["NOT_GRANTED"] = "Not authorized",
["NO_SNMP_DEVICE_DISCOVERED"] = "No SNMP device discovered",
["OK"] = "Success",
["PARTIAL_IMPORT"] = "The configuration has been imported successfully, but some elements haven't be replaced.",
["POOL_ADDED_SUCCESSFULLY"] = "Pool added successfully",
["POOL_DELETED_SUCCESSFULLY"] = "Pool deleted successfully",
["POOL_EDITED_SUCCESSFULLY"] = "Pool edited successfully",