mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Don't consider empty language codes when selecting language (fixes #540)
This commit is contained in:
parent
6bbf1f9355
commit
518aa30c9c
@ -95,7 +95,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
|
|||||||
for (var i = 0; i < langs.length; i++) {
|
for (var i = 0; i < langs.length; i++) {
|
||||||
lang = langs[i];
|
lang = langs[i];
|
||||||
matching = validLangs.filter(function (l) {
|
matching = validLangs.filter(function (l) {
|
||||||
return l.indexOf(lang) == 0;
|
return lang.length >= 2 && l.indexOf(lang) == 0;
|
||||||
});
|
});
|
||||||
if (matching.length >= 1) {
|
if (matching.length >= 1) {
|
||||||
$translate.use(matching[0]);
|
$translate.use(matching[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user