Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.4] Form Text Field: Translate text for frontend validation #43198

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Apr 2, 2024

Pull Request for Issue #42919 .

Summary of Changes

The validation text for frontend validation right now is not translated.

Testing Instructions

Codereview

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@dgrammatiko
Copy link
Contributor

The way to set the data attributes of an element should be done through the existing API. The existing code predates the API...
In sort this should be done differently

@Hackwar
Copy link
Member Author

Hackwar commented Apr 2, 2024

That might be, however that would be a refactoring and a new feature, which we can only really do in a major or minor release, not in a patch release. Fixing the bug for now however would be possible for 4.4, which means people on 4.4 and 5.1 would both benefit from this now instead of having to wait for 5.2.

@dgrammatiko
Copy link
Contributor

I'm not sure what's the new feature here. All I said is that instead changing this in the layout you should doit in the form class. The same conditional, essentially the same code, but in the right place using the existing API for the data.
Anyways, monkey patching is also fine...

@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on ebd2d9f

tested by adding validationtext="JGLOBAL_TITLE" to the title field of administrator\components\com_content\forms\article.xml


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@Quy
Copy link
Contributor

Quy commented Jul 16, 2024

I have tested this item ✅ successfully on ebd2d9f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@Quy Quy removed the Code Review label Jul 16, 2024
@Quy
Copy link
Contributor

Quy commented Jul 16, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 16, 2024
@Quy Quy removed the RTC This Pull Request is Ready To Commit label Jul 16, 2024
@brianteeman
Copy link
Contributor

I have tested this item 🔴 unsuccessfully on ebd2d9f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@brianteeman
Copy link
Contributor

changed my test result as it needs to be escaped as Fedir pointed out.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@Hackwar
Copy link
Member Author

Hackwar commented Jul 22, 2024

@Quy @brianteeman I escaped the string. Would you be able to test this again?

@Fedik
Copy link
Member

Fedik commented Jul 22, 2024

I have tested this item ✅ successfully on 8baa931


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

1 similar comment
@fgsw
Copy link

fgsw commented Aug 7, 2024

I have tested this item ✅ successfully on 8baa931


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@Quy
Copy link
Contributor

Quy commented Aug 7, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43198.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 7, 2024
@laoneo laoneo merged commit 7aaa9d3 into joomla:4.4-dev Aug 9, 2024
3 checks passed
@laoneo
Copy link
Member

laoneo commented Aug 9, 2024

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 9, 2024
@laoneo laoneo added this to the Joomla! 4.4.7 milestone Aug 9, 2024
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Aug 11, 2024
…#43198)

* Form Text Field: Translate text for frontend validation

* Update text.php

---------

Co-authored-by: Quy <quy@nomonkeybiz.com>
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Aug 11, 2024
…#43198)

* Form Text Field: Translate text for frontend validation

* Update text.php

---------

Co-authored-by: Quy <quy@nomonkeybiz.com>
@Hackwar Hackwar deleted the 4.4-field-translate branch November 24, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants