Merge master

This commit is contained in:
Pieter Vander Vennet 2021-07-18 18:44:25 +02:00
commit 88cddd2367
63 changed files with 3914 additions and 2536 deletions

View file

@ -56,7 +56,8 @@ export default class ScriptUtils {
const urlObj = new URL(url)
https.get({
host: urlObj.host,
path: urlObj.pathname,
path: urlObj.pathname + urlObj.search,
port: urlObj.port,
headers: {
"accept": "application/json"

View file

@ -93,7 +93,8 @@ async function downloadRaw(targetdir: string, r: TileRange, overpass: Overpass)/
}
)
.catch(err => {
console.log("Could not download - probably hit the rate limit; waiting a bit")
console.log(url)
console.log("Could not download - probably hit the rate limit; waiting a bit. ("+err+")")
failed++;
return ScriptUtils.sleep(60000).then(() => console.log("Waiting is done"))
})

View file

@ -212,6 +212,7 @@ function generateTranslationsObjectFrom(objects: { path: string, parsed: { id: s
}
function MergeTranslation(source: any, target: any, language: string, context: string = "") {
for (const key in source) {
if (!source.hasOwnProperty(key)) {
continue
@ -220,6 +221,9 @@ function MergeTranslation(source: any, target: any, language: string, context: s
const targetV = target[key]
if (typeof sourceV === "string") {
if(targetV === undefined){
if(typeof target === "string"){
throw "Trying to merge a translation into a fixed string at "+context+" for key "+key;
}
target[key] = source[key];
continue;
}