Remove mentions of twitter in all translation files
This commit is contained in:
parent
442df2fb14
commit
d1150be082
14 changed files with 32 additions and 25 deletions
8
Utils.ts
8
Utils.ts
|
@ -546,9 +546,10 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
/**
|
||||
* Walks the specified path into the object till the end.
|
||||
*
|
||||
* If a list is encountered, this is tranparently walked recursively on every object.
|
||||
* If a list is encountered, this is transparently walked recursively on every object.
|
||||
* If 'null' or 'undefined' is encountered, this method stops
|
||||
*
|
||||
* The leaf objects are replaced in the object itself by the specified function
|
||||
* The leaf objects are replaced in the object itself by the specified function.
|
||||
*/
|
||||
public static WalkPath(
|
||||
path: string[],
|
||||
|
@ -569,6 +570,9 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
object[head] = leaf.map((o) => replaceLeaf(o, travelledPath))
|
||||
} else {
|
||||
object[head] = replaceLeaf(leaf, travelledPath)
|
||||
if(object[head] === undefined){
|
||||
delete object[head]
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
|
|
|
@ -77,9 +77,7 @@
|
|||
"donate": "Podpořte MapComplete finančně",
|
||||
"editId": "Zde otevřete online editor OpenStreetMap",
|
||||
"editJosm": "Upravit zde pomocí JOSM",
|
||||
"followBridge": "Účty Mastodon a Twitter jsou propojeny",
|
||||
"followOnMastodon": "Sledujte MapComplete na Mastodonu",
|
||||
"followOnTwitter": "Sledujte MapComplete na Twitteru",
|
||||
"iconAttribution": {
|
||||
"title": "Použité ikony"
|
||||
},
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
"editId": "Åben OpenStreetMap onlineeditoren her",
|
||||
"editJosm": "Rediger her med JOSM",
|
||||
"followOnMastodon": "Følg MapComplete på Mastodon",
|
||||
"followOnTwitter": "Følg MapComplete på Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Brugte ikoner"
|
||||
},
|
||||
|
|
|
@ -124,9 +124,7 @@
|
|||
"donate": "MapComplete finanziell unterstützen",
|
||||
"editId": "Den OpenStreetMap Editor öffnen",
|
||||
"editJosm": "Mit JOSM bearbeiten",
|
||||
"followBridge": "Die Mastodon- und Twitter-Konten werden überbrückt",
|
||||
"followOnMastodon": "MapComplete auf Mastodon folgen",
|
||||
"followOnTwitter": "MapComplete auf Twitter folgen",
|
||||
"iconAttribution": {
|
||||
"title": "Verwendete Symbole"
|
||||
},
|
||||
|
|
|
@ -82,9 +82,7 @@
|
|||
"donate": "Apoya a MapComplete de manera financiera",
|
||||
"editId": "Abre el editor en línea de OpenStreetMap aquí",
|
||||
"editJosm": "Edita aquí conJOSM",
|
||||
"followBridge": "Las cuentas de Mastodon y Twitter están puenteadas",
|
||||
"followOnMastodon": "Seguir a MapComplete en Mastodon",
|
||||
"followOnTwitter": "Seguir a MapComplete en twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Iconos usados"
|
||||
},
|
||||
|
|
|
@ -90,9 +90,7 @@
|
|||
"donate": "Soutenez MapComplete financièrement",
|
||||
"editId": "Ouvrir l’éditeur en ligne OpenStreetMap ici",
|
||||
"editJosm": "Modifier ici avec JOSM",
|
||||
"followBridge": "Les comptes Mastodon et Twitter sont liés",
|
||||
"followOnMastodon": "Suivez MapComplete sur Mastodon",
|
||||
"followOnTwitter": "Suivez MapComplete sur Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Icônes utilisées"
|
||||
},
|
||||
|
|
|
@ -80,9 +80,7 @@
|
|||
"donate": "A MapComplete pénzügyi támogatása",
|
||||
"editId": "Az OpenStreetMap online szerkesztőjének megnyitása itt",
|
||||
"editJosm": "Szerkesztés itt JOSM-mal",
|
||||
"followBridge": "A Mastodon- és Twitter-fiókok összekapcsolódnak",
|
||||
"followOnMastodon": "Kövesse a MapComplete-et a Mastodonon",
|
||||
"followOnTwitter": "Kövesse a MapComplete-et a Twitteren",
|
||||
"iconAttribution": {
|
||||
"title": "Felhasznált ikonok"
|
||||
},
|
||||
|
|
|
@ -65,9 +65,7 @@
|
|||
"donate": "Dukung MapComplete secara finansial",
|
||||
"editId": "Buka penyunting daring OpenStreetMap di sini",
|
||||
"editJosm": "Sunting di sini dengan JOSM",
|
||||
"followBridge": "Akun Mastodon dan Twitter dijembatani",
|
||||
"followOnMastodon": "Ikuti MapComplete di Mastodon",
|
||||
"followOnTwitter": "Ikuti MapComplete di Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Ikon yang digunakan"
|
||||
},
|
||||
|
|
|
@ -83,9 +83,7 @@
|
|||
"donate": "Sostieni MapComplete economicamente",
|
||||
"editId": "Apri l'editor online di OpenStreetMap qui",
|
||||
"editJosm": "Modifica qui con JOSM",
|
||||
"followBridge": "Gli account Mastodon e Twitter sono collegati",
|
||||
"followOnMastodon": "Segui MapComplete su Mastodon",
|
||||
"followOnTwitter": "Segui MapComplete su Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Icone utilizzate"
|
||||
},
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
"editId": "Åpne den nettbaserte OpenStreetMap-behandleren her",
|
||||
"editJosm": "Rediger med JOSM",
|
||||
"followOnMastodon": "Følg MapComplete på Mastodon",
|
||||
"followOnTwitter": "Følg MapComplete på Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Brukte ikoner"
|
||||
},
|
||||
|
|
|
@ -124,9 +124,7 @@
|
|||
"donate": "Geef MapComplete financiële steun",
|
||||
"editId": "Hier bewerken met de OpenStreetMap online editor",
|
||||
"editJosm": "Hier bewerken met JOSM",
|
||||
"followBridge": "De Mastodon- en Twitter-accounts worden gesynchronizeerd",
|
||||
"followOnMastodon": "Volg MapComplete op Mastodon",
|
||||
"followOnTwitter": "Volg MapComplete op Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Iconen en afbeeldingen"
|
||||
},
|
||||
|
|
|
@ -83,9 +83,7 @@
|
|||
"donate": "Apoie o MapComplete financeiramente",
|
||||
"editId": "Editar aqui com o editor online OpenStreetMap",
|
||||
"editJosm": "Editar aqui com JOSM",
|
||||
"followBridge": "As contas Mastodon e Twitter estão interligadas",
|
||||
"followOnMastodon": "Siga o MapComplete no Mastodon",
|
||||
"followOnTwitter": "Siga o MapComplete no Twitter",
|
||||
"iconAttribution": {
|
||||
"title": "Ícones usados"
|
||||
},
|
||||
|
|
|
@ -89,9 +89,7 @@
|
|||
"donate": "財務上支援 MapComplete",
|
||||
"editId": "開啟開放街圖線上編輯器",
|
||||
"editJosm": "採用 JOSM 編輯",
|
||||
"followBridge": "已經連結 Mastodon 與 Twitter 帳號",
|
||||
"followOnMastodon": "在 Mastodon 追蹤 MapComplete",
|
||||
"followOnTwitter": "在 Twitter 追蹤 MapComplete",
|
||||
"iconAttribution": {
|
||||
"title": "使用的圖示"
|
||||
},
|
||||
|
|
25
scripts/removeTranslationString.ts
Normal file
25
scripts/removeTranslationString.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import ScriptUtils from "./ScriptUtils";
|
||||
import {Utils} from "../Utils";
|
||||
import * as fs from "fs"
|
||||
|
||||
async function main(args: string[]){
|
||||
if(args.length !== 1){
|
||||
console.log("Usage: first argument is the fully qualified key of the string to remove")
|
||||
return
|
||||
}
|
||||
const path = args[0].split(".")
|
||||
console.log("Removing translation string ", path, 'from the general translations')
|
||||
const files = ScriptUtils.readDirRecSync("./langs", 1).filter(f => f.endsWith(".json"))
|
||||
for (const file of files) {
|
||||
const json = JSON.parse(fs.readFileSync(file, "UTF-8"))
|
||||
Utils.WalkPath(path, json, (_ => undefined))
|
||||
fs.writeFileSync(file, JSON.stringify(json, null, " ")+"\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const args = [...process.argv]
|
||||
args.splice(0, 2)
|
||||
main(args).then((_) => {
|
||||
console.log("All done!")
|
||||
})
|
Loading…
Reference in a new issue