forked from MapComplete/MapComplete
		
	Tooling: move translations for "mapcomplete-changes" into .proto.json to add more stability
This commit is contained in:
		
							parent
							
								
									fdd80154c8
								
							
						
					
					
						commit
						a6b5017069
					
				
					 2 changed files with 74 additions and 30 deletions
				
			
		| 
						 | 
					@ -1,13 +1,17 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "id": "mapcomplete-changes",
 | 
					  "id": "mapcomplete-changes",
 | 
				
			||||||
  "title": {
 | 
					  "title": {
 | 
				
			||||||
    "en": "Changes made with MapComplete"
 | 
					    "en": "Changes made with MapComplete",
 | 
				
			||||||
 | 
					    "de": "Änderungen mit MapComplete"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "shortDescription": {
 | 
					  "shortDescription": {
 | 
				
			||||||
    "en": "Shows changes made by MapComplete"
 | 
					    "en": "Shows changes made by MapComplete",
 | 
				
			||||||
 | 
					    "de": "Zeigt die von MapComplete vorgenommenen Änderungen an"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "description": {
 | 
					  "description": {
 | 
				
			||||||
    "en": "This maps shows all the changes made with MapComplete"
 | 
					    "en": "This maps shows all the changes made with MapComplete",
 | 
				
			||||||
 | 
					    "de": "Diese Karte zeigt alle mit MapComplete vorgenommenen Änderungen",
 | 
				
			||||||
 | 
					    "es": "Este mapa muestra todos los cambios realizados con MapComplete"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "icon": "./assets/svg/logo.svg",
 | 
					  "icon": "./assets/svg/logo.svg",
 | 
				
			||||||
  "hideFromOverview": true,
 | 
					  "hideFromOverview": true,
 | 
				
			||||||
| 
						 | 
					@ -18,7 +22,8 @@
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "id": "mapcomplete-changes",
 | 
					      "id": "mapcomplete-changes",
 | 
				
			||||||
      "name": {
 | 
					      "name": {
 | 
				
			||||||
        "en": "Changeset centers"
 | 
					        "en": "Changeset centers",
 | 
				
			||||||
 | 
					        "de": "Changeset-Zentren"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "minzoom": 0,
 | 
					      "minzoom": 0,
 | 
				
			||||||
      "source": {
 | 
					      "source": {
 | 
				
			||||||
| 
						 | 
					@ -28,41 +33,49 @@
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "title": {
 | 
					      "title": {
 | 
				
			||||||
        "render": {
 | 
					        "render": {
 | 
				
			||||||
          "en": "Changeset for {theme}"
 | 
					          "en": "Changeset for {theme}",
 | 
				
			||||||
 | 
					          "de": "Änderungssatz für {theme}"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "description": {
 | 
					      "description": {
 | 
				
			||||||
        "en": "Shows all MapComplete changes"
 | 
					        "en": "Shows all MapComplete changes",
 | 
				
			||||||
 | 
					        "de": "Zeigt alle MapComplete-Änderungen",
 | 
				
			||||||
 | 
					        "es": "Muestra todos los cambios de MapComplete"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "tagRenderings": [
 | 
					      "tagRenderings": [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "id": "show_changeset_id",
 | 
					          "id": "show_changeset_id",
 | 
				
			||||||
          "render": {
 | 
					          "render": {
 | 
				
			||||||
            "en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
 | 
					            "en": "Changeset <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>",
 | 
				
			||||||
 | 
					            "de": "Änderungssatz <a href='https://openstreetmap.org/changeset/{id}' target='_blank'>{id}</a>"
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "id": "contributor",
 | 
					          "id": "contributor",
 | 
				
			||||||
          "question": {
 | 
					          "question": {
 | 
				
			||||||
            "en": "What contributor did make this change?"
 | 
					            "en": "What contributor did make this change?",
 | 
				
			||||||
 | 
					            "de": "Wer hat zu dieser Änderung beigetragen?"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "freeform": {
 | 
					          "freeform": {
 | 
				
			||||||
            "key": "user"
 | 
					            "key": "user"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "render": {
 | 
					          "render": {
 | 
				
			||||||
            "en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
 | 
					            "en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>",
 | 
				
			||||||
 | 
					            "de": "Änderung vorgenommen von <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "id": "theme-id",
 | 
					          "id": "theme-id",
 | 
				
			||||||
          "question": {
 | 
					          "question": {
 | 
				
			||||||
            "en": "What theme was used to make this change?"
 | 
					            "en": "What theme was used to make this change?",
 | 
				
			||||||
 | 
					            "de": "Welches Thema wurde für diese Änderung verwendet?"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "freeform": {
 | 
					          "freeform": {
 | 
				
			||||||
            "key": "theme"
 | 
					            "key": "theme"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "render": {
 | 
					          "render": {
 | 
				
			||||||
            "en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>"
 | 
					            "en": "Change with theme <a href='https://mapcomplete.org/{theme}'>{theme}</a>",
 | 
				
			||||||
 | 
					            "de": "Änderung mit Thema <a href='https://mapcomplete.org/{theme}'>{theme}</a>"
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					@ -71,19 +84,23 @@
 | 
				
			||||||
            "key": "locale"
 | 
					            "key": "locale"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "question": {
 | 
					          "question": {
 | 
				
			||||||
            "en": "What locale (language) was this change made in?"
 | 
					            "en": "What locale (language) was this change made in?",
 | 
				
			||||||
 | 
					            "de": "In welcher Sprache (Locale) wurde diese Änderung vorgenommen?"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "render": {
 | 
					          "render": {
 | 
				
			||||||
            "en": "User locale is {locale}"
 | 
					            "en": "User locale is {locale}",
 | 
				
			||||||
 | 
					            "de": "Die Benutzersprache ist {locale}"
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "id": "host",
 | 
					          "id": "host",
 | 
				
			||||||
          "render": {
 | 
					          "render": {
 | 
				
			||||||
            "en": "Change with with <a href='{host}'>{host}</a>"
 | 
					            "en": "Change with with <a href='{host}'>{host}</a>",
 | 
				
			||||||
 | 
					            "de": "Änderung mit <a href='{host}'>{host}</a>"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "question": {
 | 
					          "question": {
 | 
				
			||||||
            "en": "What host (website) was this change made with?"
 | 
					            "en": "What host (website) was this change made with?",
 | 
				
			||||||
 | 
					            "de": "Bei welchem Host (Website) wurde diese Änderung vorgenommen?"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "freeform": {
 | 
					          "freeform": {
 | 
				
			||||||
            "key": "host"
 | 
					            "key": "host"
 | 
				
			||||||
| 
						 | 
					@ -104,10 +121,12 @@
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          "id": "version",
 | 
					          "id": "version",
 | 
				
			||||||
          "question": {
 | 
					          "question": {
 | 
				
			||||||
            "en": "What version of MapComplete was used to make this change?"
 | 
					            "en": "What version of MapComplete was used to make this change?",
 | 
				
			||||||
 | 
					            "de": "Welche Version von MapComplete wurde verwendet, um diese Änderung vorzunehmen?"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "render": {
 | 
					          "render": {
 | 
				
			||||||
            "en": "Made with {editor}"
 | 
					            "en": "Made with {editor}",
 | 
				
			||||||
 | 
					            "de": "Erstellt mit {editor}"
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "freeform": {
 | 
					          "freeform": {
 | 
				
			||||||
            "key": "editor"
 | 
					            "key": "editor"
 | 
				
			||||||
| 
						 | 
					@ -143,7 +162,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Themename contains {search}"
 | 
					                "en": "Themename contains {search}",
 | 
				
			||||||
 | 
					                "de": "Themenname enthält {search}",
 | 
				
			||||||
 | 
					                "es": "El nombre contiene {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -159,7 +180,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Themename does <b>not</b> contain {search}"
 | 
					                "en": "Themename does <b>not</b> contain {search}",
 | 
				
			||||||
 | 
					                "de": "Themename enthält <b>nicht</b> {search}",
 | 
				
			||||||
 | 
					                "es": "El nombre del tema <b>no</b> contiene {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -175,7 +198,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Made by contributor {search}"
 | 
					                "en": "Made by contributor {search}",
 | 
				
			||||||
 | 
					                "de": "Erstellt von Mitwirkendem {search}",
 | 
				
			||||||
 | 
					                "es": "Hecho por el colaborador {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -191,7 +216,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "<b>Not</b> made by contributor {search}"
 | 
					                "en": "<b>Not</b> made by contributor {search}",
 | 
				
			||||||
 | 
					                "de": "<b>Nicht</b> erstellt von Mitwirkendem {search}",
 | 
				
			||||||
 | 
					                "es": "<b>No</b> realizado por el colaborador {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -208,7 +235,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Made before {search}"
 | 
					                "en": "Made before {search}",
 | 
				
			||||||
 | 
					                "de": "Erstellt vor {search}",
 | 
				
			||||||
 | 
					                "es": "Realizado antes de {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -225,7 +254,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Made after {search}"
 | 
					                "en": "Made after {search}",
 | 
				
			||||||
 | 
					                "de": "Erstellt nach {search}",
 | 
				
			||||||
 | 
					                "es": "Realizado después de {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -241,7 +272,9 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "User language (iso-code) {search}"
 | 
					                "en": "User language (iso-code) {search}",
 | 
				
			||||||
 | 
					                "de": "Benutzersprache (ISO-Code) {search}",
 | 
				
			||||||
 | 
					                "es": "Idioma del usuario (código iso) {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -257,7 +290,8 @@
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
              ],
 | 
					              ],
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Made with host {search}"
 | 
					                "en": "Made with host {search}",
 | 
				
			||||||
 | 
					                "de": "Erstellt mit Host {search}"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -268,7 +302,8 @@
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              "osmTags": "add-image>0",
 | 
					              "osmTags": "add-image>0",
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Changeset added at least one image"
 | 
					                "en": "Changeset added at least one image",
 | 
				
			||||||
 | 
					                "de": "Changeset hat mindestens ein Bild hinzugefügt"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -279,7 +314,8 @@
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              "osmTags": "theme!=grb",
 | 
					              "osmTags": "theme!=grb",
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Exclude GRB theme"
 | 
					                "en": "Exclude GRB theme",
 | 
				
			||||||
 | 
					                "de": "GRB-Thema ausschließen"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -290,7 +326,9 @@
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              "osmTags": "theme!=etymology",
 | 
					              "osmTags": "theme!=etymology",
 | 
				
			||||||
              "question": {
 | 
					              "question": {
 | 
				
			||||||
                "en": "Exclude etymology theme"
 | 
					                "en": "Exclude etymology theme",
 | 
				
			||||||
 | 
					                "de": "Etymologie-Thema ausschließen",
 | 
				
			||||||
 | 
					                "es": "Excluir el tema de la etimología"
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ]
 | 
					          ]
 | 
				
			||||||
| 
						 | 
					@ -305,7 +343,8 @@
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            "id": "link_to_more",
 | 
					            "id": "link_to_more",
 | 
				
			||||||
            "render": {
 | 
					            "render": {
 | 
				
			||||||
              "en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>"
 | 
					              "en": "More statistics can be found <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>here</a>",
 | 
				
			||||||
 | 
					              "de": "Weitere Statistiken findest du <a href='https://github.com/pietervdvn/MapComplete/tree/develop/Docs/Tools/graphs' target='_blank'>hier</a>"
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,9 +95,14 @@ export default class ScriptUtils {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static getThemePaths(): string[] {
 | 
					    public static getThemePaths(): string[] {
 | 
				
			||||||
        return ScriptUtils.readDirRecSync("./assets/themes")
 | 
					        const blacklist = ["assets/themes/mapcomplete-changes/mapcomplete-changes.json"]
 | 
				
			||||||
 | 
					        const normalFiles = ScriptUtils.readDirRecSync("./assets/themes")
 | 
				
			||||||
            .filter((path) => path.endsWith(".json") && !path.endsWith(".proto.json"))
 | 
					            .filter((path) => path.endsWith(".json") && !path.endsWith(".proto.json"))
 | 
				
			||||||
            .filter((path) => path.indexOf("license_info.json") < 0)
 | 
					            .filter((path) => path.indexOf("license_info.json") < 0)
 | 
				
			||||||
 | 
					            .filter(path => !blacklist.some(black => path.endsWith(black)))
 | 
				
			||||||
 | 
					        const specialfiles = ["./assets/themes/mapcomplete-changes/mapcomplete-changes.proto.json"]
 | 
				
			||||||
 | 
					        return normalFiles.concat(specialfiles)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static getThemeFiles(): { parsed: LayoutConfigJson; path: string; raw: string }[] {
 | 
					    public static getThemeFiles(): { parsed: LayoutConfigJson; path: string; raw: string }[] {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue