Skip to content

Commit

Permalink
fix(editor): translations on formly/primeng components
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Feb 19, 2025
1 parent b575b74 commit 91e1c3c
Show file tree
Hide file tree
Showing 15 changed files with 434 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"readonly_changeable": "Value 1",
"hide_with_required_expression_control": "Optional",
"treeSelect": "node5",
"selectMultiple": ["value2", "value3"],
"markdown": "Hello **world**.\nGreat day.",
"array_with_multicheckbox": ["checkbox1", "checkbox2"],
"input_with_default_value": "slrofar6uh",
Expand Down
67 changes: 10 additions & 57 deletions projects/ng-core-tester/src/app/record/editor/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,7 @@
"required"
],
"propertiesOrder": [
"notes",
"oneOf",
"optional",
"required",
"optional_hide_expression_field",
"essential",
"hidden",
"defaultHidden",
"enum",
"object",
"object_of_object",
"array",
"array_min_items",
"array_of_objects",
"array_of_array",
"array_of_object_of_object",
"hidden_with_default",
"readonly_changeable",
"hide_with_required_expression_control",
"hide_with_required_expression",
"hidden_sub_property_hide_expr",
"array_of_objects_with_sub_objects",
"treeSelect",
"selectGroup",
"selectWithSort",
"selectGroupWithSort",
"selectWithPreferredOptions",
"selectMultiple",
"selectMultipleWithGroup",
"selectMultipleWithLabelTranslation",
"markdown",
"textarea",
"email",
"date_time",
"date_only",
"date_range",
"password",
"array_with_multicheckbox",
"remoteAutoCompleteWithFilters",
"remoteAutocompleteWithoutFilters",
"input_with_default_value",
"name_with_definition",
"field_expressions",
"field_with_addon_left_right",
"field_radio_button_inline"
"treeSelect"
],
"properties": {
"notes": {
Expand Down Expand Up @@ -1034,10 +990,6 @@
"type": "array",
"minItems": 1,
"uniqueItems": true,
"default": [
"value2",
"value3"
],
"items": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -1077,12 +1029,12 @@
"items": {
"type": "string",
"enum": [
"Epicea",
"Baobab",
"Foxglove",
"Crocus",
"Heather",
"Daffodil"
"epicea",
"baobab",
"foxglove",
"crocus",
"heather",
"daffodil"
]
},
"widget": {
Expand All @@ -1097,7 +1049,7 @@
"items": [
{
"label": "Epicea",
"value": "Epicea"
"value": "epicea"
},
{
"label": "Baobab",
Expand Down Expand Up @@ -1280,7 +1232,8 @@
"formlyConfig": {
"type": "passwordGenerator",
"props": {
"enabledEditMode": true
"enabledEditMode": true,
"styleClass": "surface-100"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"$schema": "https://bib.rero.ch/schemas/demo/demo.json",
"pid": "normal",
"required": "value required",
"textarea": "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un imprimeur anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker."
"textarea": "Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500, quand un imprimeur anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte. Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié. Il a été popularisé dans les années 1960 grâce à la vente de feuilles Letraset contenant des passages du Lorem Ipsum, et, plus récemment, par son inclusion dans des applications de mise en page de texte, comme Aldus PageMaker.",
"select": "car"
}
}
19 changes: 18 additions & 1 deletion projects/ng-core-tester/src/app/record/editor/simple-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"optional",
"required",
"essential",
"textarea"
"textarea",
"select"
],
"properties": {
"$schema": {
Expand Down Expand Up @@ -72,6 +73,22 @@
}
}
}
},
"select": {
"title": "Product",
"type": "string",
"widget": {
"formlyConfig": {
"type": "select",
"props": {
"options": [
{ "label": "House", "value": "house" },
{ "label": "Car", "value": "car" },
{ "label": "Window", "value": "window" }
]
}
}
}
}
}
}
22 changes: 21 additions & 1 deletion projects/ng-core-tester/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,25 @@
"Add mode": "hinzufügenmodus",
"Please select a type": "Bitte wählen Sie einen Typ",
"Full-text": "Volltext",
"Main title": "Haupttitel"
"Main title": "Haupttitel",
"House": "Haus",
"Car": "Auto",
"Window": "Fenster",
"Product": "Produkt",
"Property 1": "Eigentum 1",
"Property 2": "Eigentum 2",
"Value 1": "Wert 1",
"Value 2": "Wert 2",
"Value 3": "Wert 3",
"Select…": "Wählen…",
"Default": "Standard",
"group-preferred": "Bevorzugt",
"English": "Englisch",
"Node 1": "Node 1",
"Node 2": "Node 2",
"Node 3": "Node 3",
"Node 4": "Node 4",
"Node 5": "Node 5",
"Node 6": "Node 6",
"Node 7": "Node 7"
}
22 changes: 21 additions & 1 deletion projects/ng-core-tester/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,25 @@
"info": "Info",
"success": "Success",
"error": "Error",
"warn": "Warn"
"warn": "Warn",
"House": "House",
"Car": "Car",
"Window": "Window",
"Product": "Product",
"Property 1": "Property 1",
"Property 2": "Property 2",
"Value 1": "Value 1",
"Value 2": "Value 2",
"Value 3": "Value 3",
"Select…": "Select…",
"Default": "Default",
"group-preferred": "Preferred",
"English": "English",
"Node 1": "Node 1",
"Node 2": "Node 2",
"Node 3": "Node 3",
"Node 4": "Node 4",
"Node 5": "Node 5",
"Node 6": "Node 6",
"Node 7": "Node 7"
}
22 changes: 21 additions & 1 deletion projects/ng-core-tester/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,25 @@
"Add mode": "Mode ajout",
"Please select a type": "Veuillez sélectionner un type",
"Full-text": "Texte complet",
"Main title": "Titre principal"
"Main title": "Titre principal",
"House": "Maison",
"Car": "Voiture",
"Window": "Fenêtre",
"Product": "Produit",
"Property 1": "Propriété 1",
"Property 2": "Propriété 2",
"Value 1": "Valeur 1",
"Value 2": "Valeur 2",
"Value 3": "Valeur 3",
"Select…": "Sélectionner…",
"Default": "Défaut",
"group-preferred": "Préféré",
"English": "Anglais",
"Node 1": "Nœud 1",
"Node 2": "Nœud 2",
"Node 3": "Nœud 3",
"Node 4": "Nœud 4",
"Node 5": "Nœud 5",
"Node 6": "Nœud 6",
"Node 7": "Nœud 7"
}
22 changes: 21 additions & 1 deletion projects/ng-core-tester/src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,25 @@
"Add mode": "Aggiungi modalità",
"Please select a type": "Selezionare un tipo",
"Full-text": "Testo integrale",
"Main title": "Titolo principale"
"Main title": "Titolo principale",
"House": "Casa",
"Car": "Auto",
"Window": "Finestra",
"Product": "Prodotto",
"Property 1": "Proprietà 1",
"Property 2": "Proprietà 2",
"Value 1": "Valore 1",
"Value 2": "Valore 2",
"Value 3": "Valore 3",
"Select…": "Selezionare…",
"Default": "Predefinito",
"group-preferred": "Preferito",
"English": "Inglese",
"Node 1": "Node 1",
"Node 2": "Node 2",
"Node 3": "Node 3",
"Node 4": "Node 4",
"Node 5": "Node 5",
"Node 6": "Node 6",
"Node 7": "Node 7"
}
Loading

0 comments on commit 91e1c3c

Please sign in to comment.