mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 14:37:07 -04:00
Cleanup Translation Implementation in UI
This commit is contained in:
parent
1f209848dc
commit
993144b67a
1 changed files with 3 additions and 7 deletions
|
@ -1,22 +1,18 @@
|
|||
import $ from 'jquery';
|
||||
import createAjaxRequest from 'Utilities/createAjaxRequest';
|
||||
|
||||
function getTranslations() {
|
||||
let localization = null;
|
||||
const ajaxOptions = {
|
||||
async: false,
|
||||
type: 'GET',
|
||||
global: false,
|
||||
dataType: 'json',
|
||||
url: `${window.Radarr.apiRoot}/localization`,
|
||||
url: '/localization',
|
||||
success: function(data) {
|
||||
localization = data.Strings;
|
||||
}
|
||||
};
|
||||
|
||||
ajaxOptions.headers = ajaxOptions.headers || {};
|
||||
ajaxOptions.headers['X-Api-Key'] = window.Radarr.apiKey;
|
||||
createAjaxRequest(ajaxOptions);
|
||||
|
||||
$.ajax(ajaxOptions);
|
||||
return localization;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue