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

Replace OOTB browser messages with constant strings #17

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

ravise5
Copy link

@ravise5 ravise5 commented Apr 17, 2024

Context:

The OOTB browser messages cannot be localised as they are not part of our code and these messages often vary from
browser to browser.
In this PR these browser validity messages are replaced by a set of fixed strings maintained in the constants.js file ,
so that OOTB error messages are consistent across browsers and localisable.

cc: @vdua

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):

Fix #

Test URLs:

Copy link

aem-code-sync bot commented Apr 17, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Apr 17, 2024

Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@ravise5 ravise5 requested review from amit-mnnit and vdua April 17, 2024 11:56
@vdua
Copy link
Collaborator

vdua commented Apr 18, 2024

shouldn't this be added along with the localisation change to keep the context why it was done.

@ravise5
Copy link
Author

ravise5 commented Apr 18, 2024

shouldn't this be added along with the localisation change to keep the context why it was done.

Wanted to keep things less cluttered. Localisation PR is not yet merged, I'll raise it once this is merged.

@amit-mnnit
Copy link

Context:

The OOTB browser messages cannot be localised as they are not part of our code and these messages often vary from browser to browser. In this PR these browser validity messages are replaced by a set of fixed strings maintained in the constants.js file , so that OOTB error messages are consistent across browsers and localisable.

cc: @vdua

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):

Fix #

Test URLs:

According to the documentation, element.validationMessage returns the localized message.
please check https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage

@vdua
Copy link
Collaborator

vdua commented Apr 18, 2024

According to the documentation, element.validationMessage returns the localized message.
please check https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage

I also thought so, but it is not localised as per the page language. @ravise5 has confirmed that.

@ravise5 ravise5 merged commit 17f6f67 into dev Apr 19, 2024
3 checks passed
ravise5 added a commit that referenced this pull request Jul 10, 2024
* Replace OOTB browser messages with constant strings

* Minor correction in testcase message

---------

Co-authored-by: Ravisanker E <rae@adobe.com>
nit23uec pushed a commit that referenced this pull request Aug 20, 2024
nit23uec pushed a commit that referenced this pull request Aug 20, 2024
* Replace OOTB browser messages with constant strings

* Minor correction in testcase message

---------

Co-authored-by: Ravisanker E <rae@adobe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants