Repository navigation
[6.x] Forms 2: Follow localization conventions - #16004
duncanmcclean wants to merge 3 commits into
Conversation
Co-authored-by: Duncan McClean <duncan@duncanmcclean.com>
5945f16 to
def8a17
Compare
|
Thanks for making the sample values in 1. Some sample values are still hard-coded In 'email' => 'name@example.com',
'url' => 'https://example.com',
'phone' => '555-0100',
'postcode' => '97477',Once names and addresses are localized, the email connection preview mixes countries. Written as a Swiss address, for example:
The same goes for the other sample values: Could all of these be wrapped in 2. The fieldtype examples in the form builder can't be translated yet The description says The values can't be translated either: "Jamie Schmidt", Wrapping the labels, options and values in 'display' => __('Your Name'),
// ...
'value' => __('Jamie Schmidt'),The playful examples are a nice touch, and translators could then adapt them to their language rather than translate them literally. |
email, url, phone and postcode samples use `messages.sample_value_*` keys since the translator would treat dotted strings like `name@example.com` as keys. Amp-Thread-ID: https://ampcode.com/threads/T-6755f1f3-3769-4eaf-9345-5bed4eb0bc04 Co-authored-by: Duncan McClean <duncan@duncanmcclean.com>
Amp-Thread-ID: https://ampcode.com/threads/T-6755f1f3-3769-4eaf-9345-5bed4eb0bc04 Co-authored-by: Duncan McClean <duncan@duncanmcclean.com>
|
Thanks @helloDanuk, good catches! I've pushed changes for both:
|
This pull request updates Forms 2 strings to follow our localization conventions.
lang/en/messages.php.lang/en/form-fieldtypes.phpunder<handle>.description, resolved the same way as titles. Fieldtypes with a$descriptionproperty, like addon fieldtypes, work as before.<handle>.example.*inlang/en/form-fieldtypes.php. Previously, they weren't picked up bytranslator generate.__nwith the count inside the string.Textfieldtype, the Lorem ipsum sentence/paragraph, and theListandLinkfieldtypes' preview values.form_builderkey and a duplicatefield_conditions_reserve_space_when_hidden_instructionskey.Amp thread: https://ampcode.com/threads/T-f5d22e52-fd5f-4032-b21e-06a349df56f3