Make sure first lang letter is uppercase
Some checks are pending
Build and Publish Docker Image / main (push) Waiting to run
Run tests / tests_python (3.10) (push) Waiting to run
Run tests / tests_python (3.8) (push) Waiting to run
Run tests / tests_python (3.9) (push) Waiting to run
Run tests / test_docker_build (push) Waiting to run

This commit is contained in:
Piero Toffanin 2025-02-28 00:18:56 -05:00
parent eae3ffb5e0
commit 42520d45f0

View file

@ -464,6 +464,12 @@ function handleLangsResponse(self, response) {
return;
}
// Make sure first letter is uppercase
self.langs.forEach(l => {
if (!l.name) return;
l.name = l.name[0].toUpperCase() + l.name.slice(1);
});
self.langs.push({ name: {{ _e("Auto Detect") }}, code: "auto", targets: self.langs.map(l => l.code)})
const sourceLanguage = self.langs.find(l => l.code === self.getQueryParam("source"))