use only one entry point for trasnlation on the fly

This commit is contained in:
JcDenis 2024-04-27 18:20:33 +02:00
parent 40cd9664c6
commit e26d877231
2 changed files with 185 additions and 56 deletions

File diff suppressed because one or more lines are too long

View file

@ -37,7 +37,6 @@
"label": true "label": true
}, },
"nodes": [ "nodes": [
"c5bc483a2486391a",
"0649e79192cac511", "0649e79192cac511",
"d927741265d14171", "d927741265d14171",
"d5d8c4715ec0a26e", "d5d8c4715ec0a26e",
@ -73,12 +72,36 @@
"32a9b240b25a2502", "32a9b240b25a2502",
"11f433c750eb1ef0", "11f433c750eb1ef0",
"6d85ed8e8c797a61", "6d85ed8e8c797a61",
"882064c17728eabc" "882064c17728eabc",
"3c7edb67cf24ba2a"
],
"x": 94,
"y": 379,
"w": 762,
"h": 1402
},
{
"id": "dd7ef46856df793e",
"type": "group",
"z": "bac2b08cd7c2e421",
"name": "translate",
"style": {
"stroke": "#92d04f",
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"df0e4ab2e1efc286",
"11cf10d72d2c9472",
"636ca4080756bce2",
"03b03906a1eca939",
"3647ba89ea3a089c"
], ],
"x": 94, "x": 94,
"y": 199, "y": 199,
"w": 762, "w": 602,
"h": 1402 "h": 142
}, },
{ {
"id": "57308f5a0cd3a19c", "id": "57308f5a0cd3a19c",
@ -114,21 +137,6 @@
"y": 60, "y": 60,
"wires": [] "wires": []
}, },
{
"id": "c5bc483a2486391a",
"type": "link in",
"z": "bac2b08cd7c2e421",
"g": "c25adeeb66986f83",
"name": "translate - en to fr",
"links": [],
"x": 135,
"y": 500,
"wires": [
[
"0649e79192cac511"
]
]
},
{ {
"id": "0649e79192cac511", "id": "0649e79192cac511",
"type": "switch", "type": "switch",
@ -148,7 +156,7 @@
"repair": false, "repair": false,
"outputs": 1, "outputs": 1,
"x": 290, "x": 290,
"y": 500, "y": 680,
"wires": [ "wires": [
[ [
"d927741265d14171" "d927741265d14171"
@ -337,7 +345,7 @@
"repair": false, "repair": false,
"outputs": 34, "outputs": 34,
"x": 490, "x": 490,
"y": 500, "y": 680,
"wires": [ "wires": [
[ [
"d5d8c4715ec0a26e" "d5d8c4715ec0a26e"
@ -462,7 +470,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 240, "y": 420,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -490,7 +498,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 280, "y": 460,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -518,7 +526,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 360, "y": 540,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -534,7 +542,7 @@
"mode": "return", "mode": "return",
"links": [], "links": [],
"x": 815, "x": 815,
"y": 500, "y": 680,
"wires": [] "wires": []
}, },
{ {
@ -558,7 +566,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 400, "y": 580,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -586,7 +594,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 840, "y": 1020,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -614,7 +622,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1560, "y": 1740,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -642,7 +650,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 920, "y": 1100,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -670,7 +678,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 960, "y": 1140,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -698,7 +706,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 1000, "y": 1180,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -726,7 +734,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 600, "y": 780,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -754,7 +762,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 640, "y": 820,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -782,7 +790,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1040, "y": 1220,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -810,7 +818,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1080, "y": 1260,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -838,7 +846,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 690, "x": 690,
"y": 1120, "y": 1300,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -866,7 +874,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1160, "y": 1340,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -894,7 +902,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1200, "y": 1380,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -922,7 +930,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 680, "y": 860,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -950,7 +958,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 720, "y": 900,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -978,7 +986,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 760, "y": 940,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1006,7 +1014,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 1240, "y": 1420,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1034,7 +1042,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 880, "y": 1060,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1062,7 +1070,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 480, "y": 660,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1090,7 +1098,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 320, "y": 500,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1118,7 +1126,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 800, "y": 980,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1146,7 +1154,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1320, "y": 1500,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1174,7 +1182,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 690, "x": 690,
"y": 1360, "y": 1540,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1202,7 +1210,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1400, "y": 1580,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1230,7 +1238,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1440, "y": 1620,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1258,7 +1266,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 1280, "y": 1460,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1286,7 +1294,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 520, "y": 700,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1314,7 +1322,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 680, "x": 680,
"y": 560, "y": 740,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1342,7 +1350,7 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 1480, "y": 1660,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
@ -1370,11 +1378,132 @@
"to": "", "to": "",
"reg": false, "reg": false,
"x": 670, "x": 670,
"y": 1520, "y": 1700,
"wires": [ "wires": [
[ [
"71a537d09616f957" "71a537d09616f957"
] ]
] ]
},
{
"id": "df0e4ab2e1efc286",
"type": "link in",
"z": "bac2b08cd7c2e421",
"g": "dd7ef46856df793e",
"name": "translate",
"links": [],
"x": 135,
"y": 240,
"wires": [
[
"11cf10d72d2c9472"
]
]
},
{
"id": "11cf10d72d2c9472",
"type": "switch",
"z": "bac2b08cd7c2e421",
"g": "dd7ef46856df793e",
"name": "",
"property": "about.lang",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "fr",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 280,
"y": 240,
"wires": [
[
"3647ba89ea3a089c"
],
[
"03b03906a1eca939"
]
]
},
{
"id": "636ca4080756bce2",
"type": "link out",
"z": "bac2b08cd7c2e421",
"g": "dd7ef46856df793e",
"name": "translate",
"mode": "return",
"links": [],
"x": 655,
"y": 240,
"wires": []
},
{
"id": "03b03906a1eca939",
"type": "change",
"z": "bac2b08cd7c2e421",
"g": "dd7ef46856df793e",
"name": "trans",
"rules": [
{
"t": "set",
"p": "trans",
"pt": "msg",
"to": "field",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 300,
"wires": [
[
"636ca4080756bce2"
]
]
},
{
"id": "3647ba89ea3a089c",
"type": "link call",
"z": "bac2b08cd7c2e421",
"g": "dd7ef46856df793e",
"name": "",
"links": [
"3c7edb67cf24ba2a"
],
"linkType": "static",
"timeout": "30",
"x": 490,
"y": 240,
"wires": [
[
"636ca4080756bce2"
]
]
},
{
"id": "3c7edb67cf24ba2a",
"type": "link in",
"z": "bac2b08cd7c2e421",
"g": "c25adeeb66986f83",
"name": "translate - en to fr",
"links": [],
"x": 135,
"y": 680,
"wires": [
[
"0649e79192cac511"
]
]
} }
] ]