[FIX] website_event: make Attendee # translatable
On the website, when registering for an event with ticket, the placeholder `Attendee #` could not be translated, as `t-att` attributes are not translated. An alternative is to put the string to translate in a `t-set` node, which can be translated, and to use the variable assigned in this `t-set` in the `t-att` attribute. opw-678758
This commit is contained in:
@@ -117,6 +117,11 @@ msgstr ""
|
||||
msgid "All Events"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_event
|
||||
#: model:ir.ui.view,arch_db:website_event.registration_attendee_details
|
||||
msgid "Attendee #%s"
|
||||
msgstr ""
|
||||
|
||||
#. module: website_event
|
||||
#: model:ir.ui.view,arch_db:website_event.registration_attendee_details
|
||||
msgid "Cancel Registration"
|
||||
|
||||
@@ -465,7 +465,8 @@
|
||||
<t t-foreach="range(1, ticket['quantity'] + 1)" t-as="att_counter" name="attendee_loop">
|
||||
<t t-set="counter" t-value="counter + 1"/>
|
||||
<div class="row mb4">
|
||||
<div class="col-md-4"><input class='form-control' type='text' t-attf-name="#{counter}-name" required="This field is required" t-att-placeholder="'Attendee #%s' %counter"/></div>
|
||||
<t t-set="attendee_placeholder">Attendee #%s</t>
|
||||
<div class="col-md-4"><input class='form-control' type='text' t-attf-name="#{counter}-name" required="This field is required" t-att-placeholder="attendee_placeholder %counter"/></div>
|
||||
<div class="col-md-5"><input class='form-control' type='email' t-attf-name="#{counter}-email" required="This field is required"/></div>
|
||||
<div class="col-md-3"><input class='form-control' type='tel' t-attf-name="#{counter}-phone"/></div>
|
||||
<input class='hidden' type='text' t-attf-name="#{counter}-ticket_id" t-attf-value="#{ticket['id']}"/>
|
||||
|
||||
Reference in New Issue
Block a user