|
28 | 28 | {% block demo_content %} |
29 | 29 |
|
30 | 30 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
31 | | - message: 'HELLO', |
| 31 | + message: 'hello', |
32 | 32 | } %} |
33 | 33 | {% endembed %} |
34 | 34 |
|
35 | 35 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
36 | | - message: 'SAY_HELLO', |
| 36 | + message: 'say_hello', |
37 | 37 | parameters: { |
38 | 38 | name: 'Fabien' |
39 | 39 | }, |
40 | 40 | } %} |
41 | 41 | {% block parameters %} |
42 | 42 | <div> |
43 | | - <label for="SAY_HELLO-name" class="small opacity-50">Name</label> |
44 | | - <input id="SAY_HELLO-name" class="form-control" |
| 43 | + <label for="say_hello-name" class="small opacity-50">Name</label> |
| 44 | + <input id="say_hello-name" class="form-control" |
45 | 45 | type="text" name="name" value="Fabien" |
46 | 46 | data-translator-demo-block-target="parameters" |
47 | 47 | data-action="translator-demo-block#render" |
|
51 | 51 | {% endembed %} |
52 | 52 |
|
53 | 53 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
54 | | - message: 'INVITATION_TITLE', |
| 54 | + message: 'invitation_title', |
55 | 55 | parameters: { |
56 | 56 | organizer_gender: 'Fabien', |
57 | 57 | organizer_name: 'Clara', |
58 | 58 | }, |
59 | 59 | } %} |
60 | 60 | {% block parameters %} |
61 | 61 | <div> |
62 | | - <label for="INVITATION_TITLE-organizer_gender" class="small opacity-50">Gender</label> |
63 | | - <select id="INVITATION_TITLE-organizer_gender" class="form-select" |
| 62 | + <label for="invitation_title-organizer_gender" class="small opacity-50">Gender</label> |
| 63 | + <select id="invitation_title-organizer_gender" class="form-select" |
64 | 64 | name="organizer_gender" |
65 | 65 | data-translator-demo-block-target="parameters" |
66 | 66 | data-action="translator-demo-block#render" |
|
72 | 72 | </select> |
73 | 73 | </div> |
74 | 74 | <div> |
75 | | - <label for="INVITATION_TITLE-organizer_name" class="small opacity-50">Name</label> |
76 | | - <input id="INVITATION_TITLE-organizer_name" class="form-control" |
| 75 | + <label for="invitation_title-organizer_name" class="small opacity-50">Name</label> |
| 76 | + <input id="invitation_title-organizer_name" class="form-control" |
77 | 77 | name="organizer_name" |
78 | 78 | value="Clara" |
79 | 79 | data-translator-demo-block-target="parameters" |
|
84 | 84 | {% endembed %} |
85 | 85 |
|
86 | 86 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
87 | | - message: 'NUM_OF_APPLES', |
| 87 | + message: 'num_of_apples', |
88 | 88 | parameters: { |
89 | 89 | apples: 2 |
90 | 90 | }, |
91 | 91 | } %} |
92 | 92 | {% block parameters %} |
93 | 93 | <div> |
94 | | - <label for="NUM_OF_APPLES-apples" class="small opacity-50">Count</label> |
95 | | - <input id="NUM_OF_APPLES-apples" class="form-control" |
| 94 | + <label for="num_of_apples-apples" class="small opacity-50">Count</label> |
| 95 | + <input id="num_of_apples-apples" class="form-control" |
96 | 96 | name="apples" type="number" min="0" max="5" value="2" |
97 | 97 | data-translator-demo-block-target="parameters" |
98 | 98 | data-action="translator-demo-block#render" |
|
102 | 102 | {% endembed %} |
103 | 103 |
|
104 | 104 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
105 | | - message: 'FINISH_PLACE', |
| 105 | + message: 'finish_place', |
106 | 106 | parameters: { |
107 | 107 | place: 2 |
108 | 108 | }, |
109 | 109 | } %} |
110 | 110 | {% block parameters %} |
111 | 111 | <div> |
112 | | - <label for="FINISH_PLACE-apples" class="small opacity-50">Place</label> |
113 | | - <input id="FINISH_PLACE-apples" class="form-control" |
| 112 | + <label for="finish_place-place" class="small opacity-50">Place</label> |
| 113 | + <input id="finish_place-place" class="form-control" |
114 | 114 | name="place" type="number" min="0" max="5" value="1" |
115 | 115 | data-translator-demo-block-target="parameters" |
116 | 116 | data-action="translator-demo-block#render" |
|
120 | 120 | {% endembed %} |
121 | 121 |
|
122 | 122 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
123 | | - message: 'PUBLISHED_AT', |
| 123 | + message: 'published_at', |
124 | 124 | parameters: { |
125 | 125 | publication_date: '2023-04-27 08:12' |
126 | 126 | }, |
127 | 127 | } %} |
128 | 128 | {% block parameters %} |
129 | 129 | <div> |
130 | | - <label for="PUBLISHED_AT-publication_date" class="small opacity-50">Date</label> |
131 | | - <input id="PUBLISHED_AT-publication_date" class="form-control" |
| 130 | + <label for="published_at-publication_date" class="small opacity-50">Date</label> |
| 131 | + <input id="published_at-publication_date" class="form-control" |
132 | 132 | name="publication_date" type="datetime-local" value="2023-04-27 08:12" |
133 | 133 | data-translator-demo-block-target="parameters" |
134 | 134 | data-action="translator-demo-block#render" |
|
138 | 138 | {% endembed %} |
139 | 139 |
|
140 | 140 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
141 | | - message: 'PROGRESS', |
| 141 | + message: 'progress', |
142 | 142 | parameters: { |
143 | 143 | progress: 42 |
144 | 144 | }, |
145 | 145 | } %} |
146 | 146 | {% block parameters %} |
147 | 147 | <div> |
148 | | - <label for="PROGRESS-progress" class="small opacity-50">Place</label> |
149 | | - <input id="PROGRESS-progress" class="form-range" |
| 148 | + <label for="progress-progress" class="small opacity-50">Place</label> |
| 149 | + <input id="progress-progress" class="form-range" |
150 | 150 | name="progress" type="range" min="0" max="100" value="42" |
151 | 151 | data-translator-demo-block-target="parameters" |
152 | 152 | data-action="translator-demo-block#render" |
|
156 | 156 | {% endembed %} |
157 | 157 |
|
158 | 158 | {% embed 'ux_packages/translator/_translator_demo_block.html.twig' with { |
159 | | - message: 'VALUE_OF_OBJECT', |
| 159 | + message: 'value_of_object', |
160 | 160 | parameters: { |
161 | 161 | price: 30 |
162 | 162 | }, |
163 | 163 | } %} |
164 | 164 | {% block parameters %} |
165 | 165 | <div> |
166 | | - <label for="VALUE_OF_OBJECT-price" class="small opacity-50">Price</label> |
167 | | - <input id="VALUE_OF_OBJECT-price" class="form-control" |
| 166 | + <label for="value_of_object-price" class="small opacity-50">Price</label> |
| 167 | + <input id="value_of_object-price" class="form-control" |
168 | 168 | name="price" type="number" min="1" value="30" step="0.1" |
169 | 169 | data-translator-demo-block-target="parameters" |
170 | 170 | data-action="translator-demo-block#render" |
|
0 commit comments