Add translation getter

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-10-27 09:52:21 -06:00
parent 36ac61d848
commit cafbb156af
7 changed files with 212 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -233,4 +233,23 @@ function exportTranslation(){
window.location.href = data;
}
});
}
function showTranslationDownloader() {
$.get('/Home/GetAvailableTranslations', function(data){
$('#translationDownloadModalContent').html(data);
$('#translationDownloadModal').modal('show');
})
}
function hideTranslationDownloader() {
$('#translationDownloadModal').modal('hide');
}
function downloadTranslation(continent, name) {
$.get(`/Home/DownloadTranslation?continent=${continent}&name=${name}`, function (data) {
if (data) {
successToast("Translation Downloaded");
updateSettings();
} else {
errorToast(genericErrorMessage());
}
})
}