diff --git a/app/static/js/app.js b/app/static/js/app.js index e2bd42f..d1e9157 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -228,7 +228,8 @@ document.addEventListener('DOMContentLoaded', function(){ self.loadingTranslation = false; self.output = JSON.stringify(res, null, 4); if(self.sourceLang == "auto" && res.detectedLanguage !== undefined){ - self.detectedLangText = res.detectedLanguage.language+" ("+res.detectedLanguage.confidence+"%)"; + let lang = self.langs.find(l => l.code === res.detectedLanguage.language) + self.detectedLangText = ": " + (lang !== undefined ? lang.name : res.detectedLanguage.language) + " (" + res.detectedLanguage.confidence + "%)"; } } else{ throw new Error(res.error || "Unknown error"); diff --git a/app/templates/index.html b/app/templates/index.html index 454c49f..e9068ea 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -142,7 +142,7 @@