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

i18n: Required fields text to "{Field} required" format #33077

Merged
merged 17 commits into from
Sep 13, 2024

Conversation

rique223
Copy link
Contributor

@rique223 rique223 commented Aug 16, 2024

Proposed changes (including videos or screenshots)

Currently, mandatory fields display the following error message in production: 'The field %s is required.' For example: 'The field email is required.' Product has decided to change the format of this message to '%s required' For example: 'Email required' Since this is the default 'Field required' message, updating it across all areas of the system is necessary. This PR aims to address that change.

Demo gif:
form_example

Issue(s)

Steps to test or reproduce

Further comments

Jira task: CONN-314

…on text

Added a new text for required fields that follows design specifications. Additionally, I updated the Direct_message_creation_error text to better align with the new guidelines.
Copy link

changeset-bot bot commented Aug 16, 2024

⚠️ No Changeset found

Latest commit: f60a840

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

dionisio-bot bot commented Aug 16, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.71%. Comparing base (98b6a20) to head (f60a840).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #33077      +/-   ##
===========================================
+ Coverage    59.68%   59.71%   +0.02%     
===========================================
  Files         2551     2551              
  Lines        62819    62823       +4     
  Branches     14115    14107       -8     
===========================================
+ Hits         37496    37515      +19     
+ Misses       22908    22901       -7     
+ Partials      2415     2407       -8     
Flag Coverage Δ
unit 76.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Changed all places that used alternative forms of the "The_field_is_required" i18n string to it and refactored some forms to properly use the useForm errors object.
…' and properly implement useForm

In addition to updating the required field texts in other forms, this commit includes several refactors: the mode of useForm was changed to 'all', unique IDs were introduced where needed, inputs were refactored to improve the use of the RHF controller, and the disabled attribute was removed from submit buttons
…itDepartment wrong translation

Adapted the omnichannel tests to the new required field text and fixed a misuse of the 'The_field_is_required' translation string in which untranslated lowercase strings of the given field name were being passed to the i18n t function.
@rique223 rique223 marked this pull request as ready for review August 19, 2024 15:05
@rique223 rique223 requested review from a team as code owners August 19, 2024 15:05
packages/i18n/src/locales/en.i18n.json Outdated Show resolved Hide resolved
@rique223 rique223 added this to the 6.13 milestone Aug 26, 2024
apps/meteor/client/omnichannel/tags/TagEdit.tsx Outdated Show resolved Hide resolved
apps/meteor/client/views/admin/customSounds/EditSound.tsx Outdated Show resolved Hide resolved
packages/i18n/src/locales/en.i18n.json Outdated Show resolved Hide resolved
packages/ui-client/src/components/CustomFieldsForm.tsx Outdated Show resolved Hide resolved
tassoevan
tassoevan previously approved these changes Sep 6, 2024
Copy link
Contributor

github-actions bot commented Sep 12, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-09-13 17:33 UTC

@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA tested labels Sep 13, 2024
@kodiakhq kodiakhq bot removed the stat: ready to merge PR tested and approved waiting for merge label Sep 13, 2024
Copy link
Contributor

kodiakhq bot commented Sep 13, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the ['stat: ready to merge', 'automerge'] label.

@tassoevan tassoevan removed the request for review from aleksandernsilva September 13, 2024 16:57
@rique223 rique223 changed the title refactor: Change required fields text to "{Field} required" format i18n: Change required fields text to "{Field} required" format Sep 13, 2024
@rique223 rique223 changed the title i18n: Change required fields text to "{Field} required" format i18n: Required fields text to "{Field} required" format Sep 13, 2024
@rique223 rique223 added the stat: ready to merge PR tested and approved waiting for merge label Sep 13, 2024
@kodiakhq kodiakhq bot merged commit 399fb73 into develop Sep 13, 2024
54 checks passed
@kodiakhq kodiakhq bot deleted the refactor/required-field-copy branch September 13, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants