Add functionality to download all translations.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-10-27 19:01:53 -06:00
parent 12aaf8c209
commit 4c6ac96dd1
4 changed files with 143 additions and 6 deletions

View File

@@ -244,7 +244,9 @@ function hideTranslationDownloader() {
$('#translationDownloadModal').modal('hide');
}
function downloadTranslation(continent, name) {
sloader.show();
$.get(`/Home/DownloadTranslation?continent=${continent}&name=${name}`, function (data) {
sloader.hide();
if (data) {
successToast("Translation Downloaded");
updateSettings();
@@ -252,4 +254,16 @@ function downloadTranslation(continent, name) {
errorToast(genericErrorMessage());
}
})
}
function downloadAllTranslations() {
sloader.show();
$.get('/Home/DownloadAllTranslations', function (data) {
sloader.hide();
if (data.success) {
successToast(data.message);
updateSettings();
} else {
errorToast(data.message);
}
})
}