diff --git a/assets/tagRenderings/questions.json b/assets/tagRenderings/questions.json
index 2bd63ab005..634c82e7dd 100644
--- a/assets/tagRenderings/questions.json
+++ b/assets/tagRenderings/questions.json
@@ -71,12 +71,14 @@
"question": {
"en": "What are the opening hours of {name}?",
"fr": "Quelles sont les horaires d'ouverture de {name}?",
- "de": "Was sind die Öffnungszeiten von {name}?"
+ "de": "Was sind die Öffnungszeiten von {name}?",
+ "nl": "Wat zijn de openingsuren van {name}?"
},
"render": {
"de": "
Öffnungszeiten
{opening_hours_table(opening_hours)}",
"fr": "Horaires d'ouverture
{opening_hours_table(opening_hours)}",
- "en": "Opening hours
{opening_hours_table(opening_hours)}"
+ "en": "Opening hours
{opening_hours_table(opening_hours)}",
+ "nl": "Openingsuren
{opening_hours_table(opening_hours)}"
},
"freeform": {
"key": "opening_hours",
@@ -92,4 +94,4 @@
"#": "Prints all the tags",
"render": "{all_tags()}"
}
-}
+}
\ No newline at end of file
diff --git a/langs/shared-questions/de.json b/langs/shared-questions/de.json
new file mode 100644
index 0000000000..ff0b97af86
--- /dev/null
+++ b/langs/shared-questions/de.json
@@ -0,0 +1,11 @@
+{
+ "undefined": {
+ "phone": {
+ "question": "Was ist die Telefonnummer von {name}?"
+ },
+ "opening_hours": {
+ "question": "Was sind die Öffnungszeiten von {name}?",
+ "render": "Öffnungszeiten
{opening_hours_table(opening_hours)}"
+ }
+ }
+}
\ No newline at end of file
diff --git a/langs/shared-questions/en.json b/langs/shared-questions/en.json
new file mode 100644
index 0000000000..a8b983d9e6
--- /dev/null
+++ b/langs/shared-questions/en.json
@@ -0,0 +1,20 @@
+{
+ "undefined": {
+ "phone": {
+ "question": "What is the phone number of {name}?"
+ },
+ "email": {
+ "question": "What is the email address of {name}?"
+ },
+ "website": {
+ "question": "What is the website of {name}?"
+ },
+ "description": {
+ "question": "Is there still something relevant you couldn't give in the previous questions? Add it here.
Don't repeat already stated facts"
+ },
+ "opening_hours": {
+ "question": "What are the opening hours of {name}?",
+ "render": "Opening hours
{opening_hours_table(opening_hours)}"
+ }
+ }
+}
\ No newline at end of file
diff --git a/langs/shared-questions/fr.json b/langs/shared-questions/fr.json
new file mode 100644
index 0000000000..4d440d34f7
--- /dev/null
+++ b/langs/shared-questions/fr.json
@@ -0,0 +1,20 @@
+{
+ "undefined": {
+ "phone": {
+ "question": "Quel est le numéro de téléphone de {name} ?"
+ },
+ "email": {
+ "question": "Quelle est l'adresse courriel de {name} ?"
+ },
+ "website": {
+ "question": "Quel est le site internet de {name}?"
+ },
+ "description": {
+ "question": "Y a-t-il quelque chose de pertinent que vous n'avez pas pu donner à la dernière question ? Ajoutez-le ici.
Ne répétez pas des réponses déjà données"
+ },
+ "opening_hours": {
+ "question": "Quelles sont les horaires d'ouverture de {name}?",
+ "render": "Horaires d'ouverture
{opening_hours_table(opening_hours)}"
+ }
+ }
+}
\ No newline at end of file
diff --git a/langs/shared-questions/gl.json b/langs/shared-questions/gl.json
new file mode 100644
index 0000000000..2d52f7307a
--- /dev/null
+++ b/langs/shared-questions/gl.json
@@ -0,0 +1,7 @@
+{
+ "undefined": {
+ "website": {
+ "question": "Cal é a páxina web de {name}?"
+ }
+ }
+}
\ No newline at end of file
diff --git a/langs/shared-questions/nl.json b/langs/shared-questions/nl.json
new file mode 100644
index 0000000000..2e50d77b1e
--- /dev/null
+++ b/langs/shared-questions/nl.json
@@ -0,0 +1,20 @@
+{
+ "undefined": {
+ "phone": {
+ "question": "Wat is het telefoonnummer van {name}?"
+ },
+ "email": {
+ "question": "Wat is het email-adres van {name}?"
+ },
+ "website": {
+ "question": "Wat is de website van {name}?"
+ },
+ "description": {
+ "question": "Zijn er extra zaken die je niet in de bovenstaande vragen kwijt kon? Zet deze in de descriptionHerhaal geen antwoorden die je reeds gaf"
+ },
+ "opening_hours": {
+ "question": "Wat zijn de openingsuren van {name}?",
+ "render": "Openingsuren
{opening_hours_table(opening_hours)}"
+ }
+ }
+}
\ No newline at end of file
diff --git a/scripts/generateTranslations.ts b/scripts/generateTranslations.ts
index 48ac1302de..a490bff545 100644
--- a/scripts/generateTranslations.ts
+++ b/scripts/generateTranslations.ts
@@ -232,8 +232,8 @@ function MergeTranslation(source: any, target: any, language: string, context: s
targetV[language] = sourceV;
let was = ""
- if(targetV[language] !== undefined && targetV[language] !== sourceV){
- was = " (overwritten "+targetV[language]+")"
+ if (targetV[language] !== undefined && targetV[language] !== sourceV) {
+ was = " (overwritten " + targetV[language] + ")"
}
console.log(" + ", context + "." + language, "-->", sourceV, was)
continue
@@ -307,17 +307,25 @@ function mergeThemeTranslations() {
const themeOverwritesWeblate = process.argv[2] === "--ignore-weblate"
-
-if(!themeOverwritesWeblate) {
+const questionsPath = "assets/tagRenderings/questions.json"
+const questionsParsed = JSON.parse(readFileSync(questionsPath, 'utf8'))
+if (!themeOverwritesWeblate) {
mergeLayerTranslations();
mergeThemeTranslations();
-}else{
+
+ mergeLayerTranslation(questionsParsed, questionsPath, loadTranslationFilesFrom("shared-questions"))
+ writeFileSync(questionsPath, JSON.stringify(questionsParsed, null, " "))
+
+} else {
console.log("Ignore weblate")
}
generateTranslationsObjectFrom(ScriptUtils.getLayerFiles(), "layers")
generateTranslationsObjectFrom(ScriptUtils.getThemeFiles(), "themes")
-if(!themeOverwritesWeblate) {
+
+generateTranslationsObjectFrom([{path: questionsPath, parsed: questionsParsed}], "shared-questions")
+
+if (!themeOverwritesWeblate) {
// Generates the core translations
compileTranslationsFromWeblate();
}