mirror of https://github.com/Radarr/Radarr
Cleanup Translation Implementation in UI
This commit is contained in:
parent
1f209848dc
commit
993144b67a
|
@ -1,22 +1,18 @@
|
||||||
import $ from 'jquery';
|
import createAjaxRequest from 'Utilities/createAjaxRequest';
|
||||||
|
|
||||||
function getTranslations() {
|
function getTranslations() {
|
||||||
let localization = null;
|
let localization = null;
|
||||||
const ajaxOptions = {
|
const ajaxOptions = {
|
||||||
async: false,
|
async: false,
|
||||||
type: 'GET',
|
|
||||||
global: false,
|
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: `${window.Radarr.apiRoot}/localization`,
|
url: '/localization',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
localization = data.Strings;
|
localization = data.Strings;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ajaxOptions.headers = ajaxOptions.headers || {};
|
createAjaxRequest(ajaxOptions);
|
||||||
ajaxOptions.headers['X-Api-Key'] = window.Radarr.apiKey;
|
|
||||||
|
|
||||||
$.ajax(ajaxOptions);
|
|
||||||
return localization;
|
return localization;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue