User tests: Successful: Unsuccessful:
Pull Request for Issue infograf768/j4localise#42 .
Adding a check to the form validate code to respect the "translateLabel" attribute of the field.
Currently it always tries to translate the field label. The PR changes this so you can disable the behaviour by setting the attribute "translateLabel" to "false", "off" or "0".
That attribute and the possible values already exist, I just took the same.
I'm not sure how this can be tested. Maybe by leaving a required field empty or entering a non-expected value into a field.
That should give an error with the translated field name both with or without the PR.
With com_localise, the existing error (as stated in the issue) could be prevented by setting the Attribute "translateLabel" to "false". I will add that info to the Issue.
None as it just extends the existing feature also to the validation.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
@Valc Do I understand right that your test was successful? If so, please mark your test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/35900 , using the “Test this” button, then selecting the appropriate test result and finally submitting. Thanks in advance.
I have tested this item
Labels |
Added:
?
|
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks!
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-10-29 10:26:33 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
?
|
Thx
@Bakual
To test, after apply your patch, i have edited the file:
/administrator/components/com_users/forms/user.xml
To:
The oputput without issues (also validating as not allowed if the field is empty), and "Save" without issues or log warning:
I have also tested what we basically need to display without trigger log warnings:
To test it under failure now i use:
translateLabel="true"
with the next string:Any string with 2 placeholders %1$s %2$s before a grammar comma, for example.