mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
lint
This commit is contained in:
@@ -197,7 +197,7 @@ function getLanguage(resourceId) {
|
||||
return async (code, callback) => {
|
||||
try {
|
||||
code = code.replace(/-/g, '_');
|
||||
function delay(t) { return new Promise(resolve => setTimeout(resolve, t)); }
|
||||
// random delay to avoid rate-limit of Transifex' API
|
||||
await delay(Math.random() * 60000);
|
||||
const url = await transifexApi.ResourceTranslationsAsyncDownload.download({
|
||||
resource: {data:{type:'resources', id:`o:${transifexOrganization}:p:${transifexProject}:r:${resourceId}`}},
|
||||
@@ -308,3 +308,7 @@ function checkForDuplicateShortcuts(code, coreStrings) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delay(t) {
|
||||
return new Promise(resolve => { setTimeout(resolve, t); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user