From b5d8a9335ac9d41f10b7e32b469d824844d2d368 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sun, 17 Mar 2024 12:27:37 +0000 Subject: [PATCH] fix for https://github.com/microsoft/jacdac/issues/1362 --- _locales/de/jacdac-strings.json | 2 +- accelerometer/_locales/de/jacdac-accelerometer-strings.json | 2 +- button/_locales/de/jacdac-button-strings.json | 2 +- genaisrc/loc-strings.genai.js | 5 ++++- .../_locales/de/jacdac-magnetic-field-level-strings.json | 4 ++-- model-runner/_locales/de/jacdac-model-runner-strings.json | 2 +- motion/_locales/de/jacdac-motion-strings.json | 2 +- sat-nav/_locales/de/jacdac-sat-nav-strings.json | 2 +- sound-level/_locales/de/jacdac-sound-level-strings.json | 4 ++-- switch/_locales/de/jacdac-switch-strings.json | 2 +- 10 files changed, 15 insertions(+), 12 deletions(-) diff --git a/_locales/de/jacdac-strings.json b/_locales/de/jacdac-strings.json index 0e6a6be88..f574b5408 100644 --- a/_locales/de/jacdac-strings.json +++ b/_locales/de/jacdac-strings.json @@ -20,7 +20,7 @@ "jacdac.BootloaderError.PacketTooSmall|block": "Paket zu klein", "jacdac.BridgeReg.Enabled": "Lese-Schreib-Bool (uint8_t).", "jacdac.Client.isConnected|block": "%client verbunden", - "jacdac.Client.onConnectionChanged|block": "bei %client $state", + "jacdac.Client.onConnectionChanged|block": "wenn %client $state", "jacdac.ClientConnectionState.Connected|block": "verbunden", "jacdac.ClientConnectionState.Disconnected|block": "getrennt", "jacdac.ControlAnnounceFlags.IsClient|block": "ist Client", diff --git a/accelerometer/_locales/de/jacdac-accelerometer-strings.json b/accelerometer/_locales/de/jacdac-accelerometer-strings.json index c4f04f5f7..139dd77bc 100644 --- a/accelerometer/_locales/de/jacdac-accelerometer-strings.json +++ b/accelerometer/_locales/de/jacdac-accelerometer-strings.json @@ -27,7 +27,7 @@ "jacdac.AccelerometerReg.ForcesError": "Nur-Lesen g u12.", "jacdac.AccelerometerReg.MaxForce": "Schreib-Lesen g u12.", "jacdac.AccelerometerReg.MaxForcesSupported": "Konstante.", - "modules.AccelerometerClient.onEvent|block": "bei %accelerometer %event", + "modules.AccelerometerClient.onEvent|block": "wenn %accelerometer %event", "modules.AccelerometerClient.x|block": "%accelerometer x (g)", "modules.AccelerometerClient.y|block": "%accelerometer y (g)", "modules.AccelerometerClient.z|block": "%accelerometer z (g)", diff --git a/button/_locales/de/jacdac-button-strings.json b/button/_locales/de/jacdac-button-strings.json index 0c69cd085..c79bcb621 100644 --- a/button/_locales/de/jacdac-button-strings.json +++ b/button/_locales/de/jacdac-button-strings.json @@ -9,7 +9,7 @@ "jacdac.ButtonReg.Pressed": "Nur-Lesen bool (uint8_t).", "jacdac.ButtonReg.Pressure": "Nur-Lesen Verhältnis u0.", "modules.ButtonClient.holdDuration|block": "%button Haltezeit (ms)", - "modules.ButtonClient.onEvent|block": "bei %button %event", + "modules.ButtonClient.onEvent|block": "wenn %button %event", "modules.ButtonClient.pressed|block": "%button gedrückt", "modules.button1|block": "knopf1", "modules.button2|block": "knopf2", diff --git a/genaisrc/loc-strings.genai.js b/genaisrc/loc-strings.genai.js index 94b2ae7c3..8d1f38815 100644 --- a/genaisrc/loc-strings.genai.js +++ b/genaisrc/loc-strings.genai.js @@ -128,7 +128,10 @@ and should be translated following these rules: // language specific instructions if (langCode === "de") { - $`- Capitalize Pipe in translations.` + $` +- Capitalize Pipe in translations. +- Always translate "on ..." with "wenn ..." +` } diff --git a/magnetic-field-level/_locales/de/jacdac-magnetic-field-level-strings.json b/magnetic-field-level/_locales/de/jacdac-magnetic-field-level-strings.json index 3d859802f..a92c8e77c 100644 --- a/magnetic-field-level/_locales/de/jacdac-magnetic-field-level-strings.json +++ b/magnetic-field-level/_locales/de/jacdac-magnetic-field-level-strings.json @@ -12,8 +12,8 @@ "jacdac.MagneticFieldLevelVariant.DigitalNS|block": "digital ns", "jacdac.MagneticFieldLevelVariant.DigitalN|block": "digital n", "jacdac.MagneticFieldLevelVariant.DigitalS|block": "digital s", - "modules.MagneticFieldLevelClient.onEvent|block": "bei %magneticfieldlevel %event", - "modules.MagneticFieldLevelClient.onStrengthChangedBy|block": "bei %magneticfieldlevel Stärkeänderung um %threshold (\\%)", + "modules.MagneticFieldLevelClient.onEvent|block": "wenn %magneticfieldlevel %event", + "modules.MagneticFieldLevelClient.onStrengthChangedBy|block": "wenn %magneticfieldlevel Stärkeänderung um %threshold (\\%)", "modules.MagneticFieldLevelClient.strength|block": "%magneticfieldlevel Stärke (\\%)", "modules.magneticFieldLevel1|block": "magnetfeldstärke1", "modules.magneticFieldLevel2|block": "magnetfeldstärke2", diff --git a/model-runner/_locales/de/jacdac-model-runner-strings.json b/model-runner/_locales/de/jacdac-model-runner-strings.json index 87c15cd86..f49ffee6f 100644 --- a/model-runner/_locales/de/jacdac-model-runner-strings.json +++ b/model-runner/_locales/de/jacdac-model-runner-strings.json @@ -1,5 +1,5 @@ { - "jacdac.ModelRunnerClient.onDetection|block": "bei %modelRunner ML Klasse %classId erkannt", + "jacdac.ModelRunnerClient.onDetection|block": "wenn %modelRunner ML Klasse %classId erkannt", "jacdac.ModelRunnerCmd.Predict": "Bericht SetModel.", "jacdac.ModelRunnerCmd.SetModel": "Argument: model_size B uint32_t.", "jacdac.ModelRunnerModelFormat.EdgeImpulseCompiled|block": "edge impulse kompiliert", diff --git a/motion/_locales/de/jacdac-motion-strings.json b/motion/_locales/de/jacdac-motion-strings.json index 5a0ec3f10..aa7a2a6ca 100644 --- a/motion/_locales/de/jacdac-motion-strings.json +++ b/motion/_locales/de/jacdac-motion-strings.json @@ -7,7 +7,7 @@ "jacdac.MotionReg.Variant": "Konstante Variante (uint8_t).", "jacdac.MotionVariant.PIR|block": "pir", "modules.MotionClient.moving|block": "%motion bewegt sich", - "modules.MotionClient.onEvent|block": "bei %motion %event", + "modules.MotionClient.onEvent|block": "wenn %motion %event", "modules.motion1|block": "motion1", "modules|block": "module", "{id:category}Jacdac": "Jacdac", diff --git a/sat-nav/_locales/de/jacdac-sat-nav-strings.json b/sat-nav/_locales/de/jacdac-sat-nav-strings.json index d7a6056a9..776b88df5 100644 --- a/sat-nav/_locales/de/jacdac-sat-nav-strings.json +++ b/sat-nav/_locales/de/jacdac-sat-nav-strings.json @@ -9,7 +9,7 @@ "modules.SatNavClient.enabled|block": "%satelittenavigationsystem aktiviert", "modules.SatNavClient.latitude|block": "%satelittenavigationsystem Breitengrad (lat)", "modules.SatNavClient.longitude|block": "%satelittenavigationsystem Längengrad (lon)", - "modules.SatNavClient.onEvent|block": "bei %satelittenavigationsystem %event", + "modules.SatNavClient.onEvent|block": "wenn %satelittenavigationsystem %event", "modules.SatNavClient.setEnabled|block": "setze %satelittenavigationsystem %value=toggleOnOff", "modules.SatNavClient.timestamp|block": "%satelittenavigationsystem Zeitstempel (ms)", "modules.satNav1|block": "sat nav1", diff --git a/sound-level/_locales/de/jacdac-sound-level-strings.json b/sound-level/_locales/de/jacdac-sound-level-strings.json index aa89217ff..f92f6f20d 100644 --- a/sound-level/_locales/de/jacdac-sound-level-strings.json +++ b/sound-level/_locales/de/jacdac-sound-level-strings.json @@ -8,8 +8,8 @@ "jacdac.SoundLevelReg.QuietThreshold": "Lese-Schreib-Verhältnis u0.", "jacdac.SoundLevelReg.SoundLevel": "Nur-Lesen-Verhältnis u0.", "modules.SoundLevelClient.enabled|block": "%soundlevel aktiviert", - "modules.SoundLevelClient.onEvent|block": "bei %soundlevel %event", - "modules.SoundLevelClient.onSoundLevelChangedBy|block": "bei %soundlevel Schallpegeländerung um %threshold (\\%)", + "modules.SoundLevelClient.onEvent|block": "wenn %soundlevel %event", + "modules.SoundLevelClient.onSoundLevelChangedBy|block": "wenn %soundlevel Schallpegeländerung um %threshold (\\%)", "modules.SoundLevelClient.setEnabled|block": "setze %soundlevel %value=toggleOnOff", "modules.SoundLevelClient.soundLevel|block": "%soundlevel Schallpegel (\\%)", "modules.soundLevel1|block": "schallpegel1", diff --git a/switch/_locales/de/jacdac-switch-strings.json b/switch/_locales/de/jacdac-switch-strings.json index c68d04931..b2d973ec4 100644 --- a/switch/_locales/de/jacdac-switch-strings.json +++ b/switch/_locales/de/jacdac-switch-strings.json @@ -14,7 +14,7 @@ "jacdac.SwitchVariant.Tilt|block": "Neigung", "jacdac.SwitchVariant.Toggle|block": "Umschalter", "modules.SwitchClient.active|block": "%switch aktiv", - "modules.SwitchClient.onEvent|block": "bei %switch %event", + "modules.SwitchClient.onEvent|block": "wenn %switch %event", "modules.switch_1|block": "Schalter1", "modules.switch_2|block": "Schalter2", "modules|block": "Module",