Skip to content

Commit

Permalink
🌐 [#433] -- update Dutch translations
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Jun 27, 2023
1 parent 6bff5ef commit ac6df5a
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 22 deletions.
2 changes: 2 additions & 0 deletions bin/find_untranslated_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def main():
# skip translated messages
if trans_object["defaultMessage"] != trans_object["originalDefault"]:
continue
if trans_object.get("isTranslated", False):
continue

print(
f"ID '{unique_id}' appears untranslated, defaultMessage: {trans_object['originalDefault']}"
Expand Down
28 changes: 14 additions & 14 deletions scripts/i18n-formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ const fs = require('fs');
const argv = require('yargs').argv;

// load the existing catalog to prevent overwriting messages
const existingCatalog = JSON.parse(
fs.readFileSync(argv.outFile, 'utf-8')
);
const existingCatalog = JSON.parse(fs.readFileSync(argv.outFile, 'utf-8'));

const format = messages => {
Object.entries(messages).forEach(([id, msg]) => {
// always store the original (english) default message as a reference
msg.originalDefault = msg.defaultMessage;

const format = (messages) => {
Object.entries(messages).forEach(([id, msg]) => {
// always store the original (english) default message as a reference
msg.originalDefault = msg.defaultMessage;

// if the message with the ID is already in the catalog, re-use it
const existingMsg = existingCatalog[id];
if (!existingMsg) return;
msg.defaultMessage = existingMsg.defaultMessage;
});
return messages;
// if the message with the ID is already in the catalog, re-use it
const existingMsg = existingCatalog[id];
if (!existingMsg) return;
msg.defaultMessage = existingMsg.defaultMessage;
if (existingMsg.isTranslated) {
msg.isTranslated = true;
}
});
return messages;
};

exports.format = format;
36 changes: 36 additions & 0 deletions src/i18n/compiled/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@
"value": "This form is currently undergoing maintenance and can not be accessed at the moment."
}
],
"DBTNgI": [
{
"type": 0,
"value": "d"
}
],
"DCzTpQ": [
{
"type": 0,
Expand Down Expand Up @@ -389,6 +395,12 @@
"value": "Continue later"
}
],
"MJXZYI": [
{
"type": 0,
"value": "m"
}
],
"PCFPnE": [
{
"type": 0,
Expand Down Expand Up @@ -419,6 +431,12 @@
"value": "Yes"
}
],
"RSPyzt": [
{
"type": 0,
"value": "Month"
}
],
"Rf8Sot": [
{
"type": 0,
Expand Down Expand Up @@ -753,6 +771,12 @@
"value": ". Extend your session if you wish to continue."
}
],
"nfRRDu": [
{
"type": 0,
"value": "yyyy"
}
],
"nwQjsz": [
{
"type": 0,
Expand Down Expand Up @@ -885,6 +909,12 @@
"value": "Failed to determine the appointment"
}
],
"vCObuG": [
{
"type": 0,
"value": "Day"
}
],
"vIfXbq": [
{
"type": 0,
Expand All @@ -897,6 +927,12 @@
"value": "Amount"
}
],
"yKo62N": [
{
"type": 0,
"value": "Year"
}
],
"yW2uhj": [
{
"type": 0,
Expand Down
36 changes: 36 additions & 0 deletions src/i18n/compiled/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@
"value": "Dit formulier is momenteel in onderhoud en daardoor tijdelijk niet beschikbaar."
}
],
"DBTNgI": [
{
"type": 0,
"value": "d"
}
],
"DCzTpQ": [
{
"type": 0,
Expand Down Expand Up @@ -389,6 +395,12 @@
"value": "Later verdergaan"
}
],
"MJXZYI": [
{
"type": 0,
"value": "m"
}
],
"PCFPnE": [
{
"type": 0,
Expand Down Expand Up @@ -419,6 +431,12 @@
"value": "Ja"
}
],
"RSPyzt": [
{
"type": 0,
"value": "Maand"
}
],
"Rf8Sot": [
{
"type": 0,
Expand Down Expand Up @@ -753,6 +771,12 @@
"value": ". Verleng uw sessie indien u door wenst te gaan."
}
],
"nfRRDu": [
{
"type": 0,
"value": "jjjj"
}
],
"nwQjsz": [
{
"type": 0,
Expand Down Expand Up @@ -885,6 +909,12 @@
"value": "Het systeem kon de afspraak niet vinden"
}
],
"vCObuG": [
{
"type": 0,
"value": "Dag"
}
],
"vIfXbq": [
{
"type": 0,
Expand All @@ -897,6 +927,12 @@
"value": "Aantal"
}
],
"yKo62N": [
{
"type": 0,
"value": "Jaar"
}
],
"yW2uhj": [
{
"type": 0,
Expand Down
30 changes: 30 additions & 0 deletions src/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@
"description": "Maintenance mode message",
"originalDefault": "This form is currently undergoing maintenance and can not be accessed at the moment."
},
"DBTNgI": {
"defaultMessage": "d",
"description": "Placeholder for day part of a date",
"originalDefault": "d"
},
"DCzTpQ": {
"defaultMessage": "Remove",
"description": "Appointments: remove product/service button text",
Expand Down Expand Up @@ -259,6 +264,11 @@
"description": "Form save modal submit button",
"originalDefault": "Continue later"
},
"MJXZYI": {
"defaultMessage": "m",
"description": "Placeholder for month part of a date",
"originalDefault": "m"
},
"PCFPnE": {
"defaultMessage": "Payment is required for this product",
"description": "Payment required info text",
Expand All @@ -284,6 +294,11 @@
"description": "'True' display",
"originalDefault": "Yes"
},
"RSPyzt": {
"defaultMessage": "Month",
"description": "Date input group: month label",
"originalDefault": "Month"
},
"Rf8Sot": {
"defaultMessage": "Problem - {formName}",
"description": "Form start outage title",
Expand Down Expand Up @@ -504,6 +519,11 @@
"description": "Session expiry warning message (in modal)",
"originalDefault": "Your session is about to expire {delta}. Extend your session if you wish to continue."
},
"nfRRDu": {
"defaultMessage": "yyyy",
"description": "Placeholder for year part of a date",
"originalDefault": "yyyy"
},
"nwQjsz": {
"defaultMessage": "Your session will expire soon.",
"description": "Session expiry warning title (in modal)",
Expand Down Expand Up @@ -569,6 +589,11 @@
"description": "Appointment cancellation missing submission ID query string parameter",
"originalDefault": "Failed to determine the appointment"
},
"vCObuG": {
"defaultMessage": "Day",
"description": "Date input group: day label",
"originalDefault": "Day"
},
"vIfXbq": {
"defaultMessage": "Failed to determine the appointment time",
"description": "Appointment cancellation missing time query string parameter",
Expand All @@ -579,6 +604,11 @@
"description": "Appointments: product amount field label",
"originalDefault": "Amount"
},
"yKo62N": {
"defaultMessage": "Year",
"description": "Date input group: year label",
"originalDefault": "Year"
},
"yW2uhj": {
"defaultMessage": "Co-sign confirmation",
"description": "On succesful completion title",
Expand Down
Loading

0 comments on commit ac6df5a

Please sign in to comment.