forked from MapComplete/MapComplete
		
	Fix translations
This commit is contained in:
		
							parent
							
								
									1f8eca6b8b
								
							
						
					
					
						commit
						355c9384d9
					
				
					 6 changed files with 41 additions and 4 deletions
				
			
		| 
						 | 
					@ -97,7 +97,6 @@
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "tagRenderings": [
 | 
					  "tagRenderings": [
 | 
				
			||||||
    "images",
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "question": {
 | 
					      "question": {
 | 
				
			||||||
        "en": "What kind of crossing is this?",
 | 
					        "en": "What kind of crossing is this?",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -182,7 +182,6 @@
 | 
				
			||||||
    "phone",
 | 
					    "phone",
 | 
				
			||||||
    "payment-options",
 | 
					    "payment-options",
 | 
				
			||||||
    "wheelchair-access",
 | 
					    "wheelchair-access",
 | 
				
			||||||
    "dog-access",
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "#": "Cuisine",
 | 
					      "#": "Cuisine",
 | 
				
			||||||
      "question": {
 | 
					      "question": {
 | 
				
			||||||
| 
						 | 
					@ -551,7 +550,8 @@
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      "condition": "cuisine=friture"
 | 
					      "condition": "cuisine=friture"
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
 | 
					    "dog-access"
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "filter": [
 | 
					  "filter": [
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,7 +68,7 @@
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          "then": {
 | 
					          "then": {
 | 
				
			||||||
            "nl": "Deze straat is een fietsstraat",
 | 
					            "nl": "Deze straat i een fietsstraat",
 | 
				
			||||||
            "en": "This street is a cyclestreet",
 | 
					            "en": "This street is a cyclestreet",
 | 
				
			||||||
            "ja": "この通りはcyclestreetだ",
 | 
					            "ja": "この通りはcyclestreetだ",
 | 
				
			||||||
            "nb_NO": "Denne gaten er en sykkelvei"
 | 
					            "nb_NO": "Denne gaten er en sykkelvei"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,23 @@
 | 
				
			||||||
        "description": {
 | 
					        "description": {
 | 
				
			||||||
            "question": "Is there still something relevant you couldn't give in the previous questions? Add it here.<br/><span style='font-size: small'>Don't repeat already stated facts</span>"
 | 
					            "question": "Is there still something relevant you couldn't give in the previous questions? Add it here.<br/><span style='font-size: small'>Don't repeat already stated facts</span>"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        "dog-access": {
 | 
				
			||||||
 | 
					            "mappings": {
 | 
				
			||||||
 | 
					                "0": {
 | 
				
			||||||
 | 
					                    "then": "Dogs are allowed"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "1": {
 | 
				
			||||||
 | 
					                    "then": "Dogs are <b>not</b> allowed"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "2": {
 | 
				
			||||||
 | 
					                    "then": "Dogs are allowed, but they have to be leashed"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "3": {
 | 
				
			||||||
 | 
					                    "then": "Dogs are allowed and can run around freely"
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "question": "Are dogs allowed in this business?"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        "email": {
 | 
					        "email": {
 | 
				
			||||||
            "question": "What is the email address of {name}?"
 | 
					            "question": "What is the email address of {name}?"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,6 +3,23 @@
 | 
				
			||||||
        "description": {
 | 
					        "description": {
 | 
				
			||||||
            "question": "Zijn er nog andere relevante zaken die je niet in de bovenstaande vragen kwijt kon? Vul ze hier in.<br/><span style='font-size: small'>Herhaal geen antwoorden die je reeds gaf</span>"
 | 
					            "question": "Zijn er nog andere relevante zaken die je niet in de bovenstaande vragen kwijt kon? Vul ze hier in.<br/><span style='font-size: small'>Herhaal geen antwoorden die je reeds gaf</span>"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        "dog-access": {
 | 
				
			||||||
 | 
					            "mappings": {
 | 
				
			||||||
 | 
					                "0": {
 | 
				
			||||||
 | 
					                    "then": "honden zijn toegelaten"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "1": {
 | 
				
			||||||
 | 
					                    "then": "honden zijn <b>niet</b> toegelaten"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "2": {
 | 
				
			||||||
 | 
					                    "then": "honden zijn <b>enkel aan de leiband</b> welkom"
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                "3": {
 | 
				
			||||||
 | 
					                    "then": "honden zijn welkom en mogen vrij rondlopen"
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "question": "Zijn honden toegelaten in deze zaak?"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        "email": {
 | 
					        "email": {
 | 
				
			||||||
            "question": "Wat is het e-mailadres van {name}?"
 | 
					            "question": "Wat is het e-mailadres van {name}?"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -248,7 +248,11 @@ function MergeTranslation(source: any, target: any, language: string, context: s
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (typeof sourceV === "object") {
 | 
					        if (typeof sourceV === "object") {
 | 
				
			||||||
            if (targetV === undefined) {
 | 
					            if (targetV === undefined) {
 | 
				
			||||||
 | 
					                try{
 | 
				
			||||||
                target[language] = sourceV;
 | 
					                target[language] = sourceV;
 | 
				
			||||||
 | 
					                }catch(e){
 | 
				
			||||||
 | 
					                    throw `At context${context}: Could not add a translation in language ${language} due to ${e}`
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                MergeTranslation(sourceV, targetV, language, context + "." + key);
 | 
					                MergeTranslation(sourceV, targetV, language, context + "." + key);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue