mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
globalization fix
This commit is contained in:
parent
64354206a0
commit
ac5697b240
8 changed files with 47 additions and 35 deletions
|
@ -29,14 +29,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||
"_release": "1.0.12",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.12",
|
||||
"commit": "657f526a2382a659cdf4e13be87ecc89261588a3"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-behaviors"
|
||||
"_originalSource": "PolymerElements/iron-behaviors"
|
||||
}
|
|
@ -26,14 +26,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"main": "iron-meta.html",
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"_release": "1.1.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.1",
|
||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-meta"
|
||||
"_originalSource": "polymerelements/iron-meta"
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
"tag": "v1.0.4",
|
||||
"commit": "05f3800d37f8c5cad63ac2cf279f01bffb7d4fe8"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-material.git",
|
||||
"_source": "git://github.com/polymerelements/paper-material.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/paper-material"
|
||||
"_originalSource": "polymerelements/paper-material"
|
||||
}
|
|
@ -32,14 +32,14 @@
|
|||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
||||
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||
"_release": "1.0.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
||||
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/paper-ripple"
|
||||
"_originalSource": "polymerelements/paper-ripple"
|
||||
}
|
|
@ -44,8 +44,7 @@
|
|||
CameraUploadPath: $('#txtUploadPath', page).val()
|
||||
|
||||
}),
|
||||
contentType: "application/json",
|
||||
dataType: 'json'
|
||||
contentType: "application/json"
|
||||
|
||||
}).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
}
|
||||
|
|
|
@ -35,16 +35,9 @@
|
|||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', requestUrl, true);
|
||||
|
||||
xhr.onload = function (e) {
|
||||
var onError = function () {
|
||||
|
||||
Logger.log('Globalize response status: ' + this.status);
|
||||
|
||||
if (this.status < 400) {
|
||||
|
||||
dictionaries[url] = JSON.parse(this.response);
|
||||
resolve();
|
||||
|
||||
} else {
|
||||
Logger.log('Dictionary not found. Reverting to english');
|
||||
|
||||
// Grab the english version
|
||||
var xhr2 = new XMLHttpRequest();
|
||||
|
@ -56,9 +49,24 @@
|
|||
};
|
||||
|
||||
xhr2.send();
|
||||
};
|
||||
|
||||
xhr.onload = function (e) {
|
||||
|
||||
Logger.log('Globalize response status: ' + this.status);
|
||||
|
||||
if (this.status < 400) {
|
||||
|
||||
dictionaries[url] = JSON.parse(this.response);
|
||||
resolve();
|
||||
|
||||
} else {
|
||||
onError();
|
||||
}
|
||||
};
|
||||
|
||||
xhr.onerror = onError;
|
||||
|
||||
xhr.send();
|
||||
});
|
||||
}
|
||||
|
@ -67,7 +75,6 @@
|
|||
function setCulture(value) {
|
||||
|
||||
Logger.log('Setting culture to ' + value);
|
||||
|
||||
currentCulture = value;
|
||||
|
||||
return Promise.all([loadDictionary('html', value), loadDictionary('javascript', value)]);
|
||||
|
@ -115,14 +122,11 @@
|
|||
|
||||
Logger.log('Entering Globalize.ensure');
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
getDeviceCulture().then(function (culture) {
|
||||
return getDeviceCulture().then(function (culture) {
|
||||
|
||||
culture = normalizeLocaleName(culture || 'en-US');
|
||||
|
||||
setCulture(culture).then(resolve);
|
||||
});
|
||||
return setCulture(culture);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -76,8 +76,12 @@
|
|||
|
||||
function renderForm(options) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['paper-checkbox', 'paper-input'], function () {
|
||||
renderFormInternal(options);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -23,8 +23,9 @@
|
|||
dialogOptionsFn: getTargetDialogOptionsFn(dialogOptions),
|
||||
showName: true,
|
||||
readOnlySyncTarget: true
|
||||
});
|
||||
}).then(function () {
|
||||
fillJobValues(page, job, dialogOptions);
|
||||
});
|
||||
}
|
||||
|
||||
function getTargetDialogOptionsFn(dialogOptions) {
|
||||
|
@ -267,7 +268,11 @@
|
|||
|
||||
function fillJobValues(page, job, editOptions) {
|
||||
|
||||
$('#txtSyncJobName', page).val(job.Name);
|
||||
var txtSyncJobName = page.querySelector('#txtSyncJobName');
|
||||
if (txtSyncJobName) {
|
||||
txtSyncJobName.value = job.Name;
|
||||
}
|
||||
|
||||
$('#selectProfile', page).val(job.Profile || '').trigger('change');
|
||||
$('#selectQuality', page).val(job.Quality || '').trigger('change');
|
||||
$('#chkUnwatchedOnly', page).checked(job.UnwatchedOnly);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue