- 🇩🇪Germany geek-merlin Freiburg, Germany
@mably: Please look what the string is in the original widget, and use the same one (apart from the format). That way, no re-translation is necessary.
- 🇫🇷France mably
Original widget string is defined here.
// Adds the HTML5 attributes. $extra_attributes = [ 'type' => $element['#date_time_element'], 'step' => $element['#date_increment'], ]; $element['time'] = [ '#type' => 'date', '#title' => t('Time'), '#title_display' => 'invisible', '#value' => $time_value, '#attributes' => $element['#attributes'] + $extra_attributes, '#required' => $element['#required'], '#size' => 12, '#error_no_message' => TRUE, ];
So OP's suggestion is ok.
- 🇩🇪Germany geek-merlin Freiburg, Germany
Thanks for the research! Since #2, where i was open to this, i learnt a lot about translations.
Setting to wontfix for reasons:
- A t() string should be hard to mis-contextualize, because translators on localize.drupal.org do not see the UI.
- String changes should only be made if absolutely necessary, as they invalidate existing community translations.
- Anyone can translate the string as they like, even to english.