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

BUG: Missing translation on markdown validations #7456

Open
Comoque1 opened this issue Jan 16, 2025 · 2 comments
Open

BUG: Missing translation on markdown validations #7456

Comoque1 opened this issue Jan 16, 2025 · 2 comments
Assignees
Labels
bug squash bug Something isn't working client Rhea Team Issues and Epics worked on by team Rhea

Comments

@Comoque1
Copy link
Member

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://dev-alkem.io/user/admin-alkemio/settings/account
  2. Start process for template creation
  3. On the dialog click on the markdown field
  4. Click outside - validation error is shown, but is not translated

image.png

Expected behavior
There is MD validation error translation.

@Comoque1 Comoque1 added bug Something isn't working client Rhea Team Issues and Epics worked on by team Rhea labels Jan 16, 2025
@reactoholic reactoholic self-assigned this Jan 21, 2025
@reactoholic
Copy link
Contributor

This task isn't straightforward because the current translation approach relies on a common hook that takes a key, which must match the key in the translation file.

Challenges:

Error Message Handling: We're passing the entire error message from Formik (e.g., "profile.description" is a required field), rather than just the key.
Key-Name Dependency: The name prop of the FormikMarkdownField component must align with the Yup structure used in Formik. Simply extracting keys from the full error message won't work, as it would result in a messy, top-level error message structure in the translation file—something we want to avoid.

Recommendations:

  • Unify Error Messages: Create a ZenHub issue to standardize error messages across the application. Currently, there are three or more variations for the same type of error, which leads to inconsistency.
  • Update Translation Logic: Create a ZenHub issue to improve the error translation logic within the FormikMarkdownField component.

CC: @bobbykolev @ccanos @SimoneZaza

@reactoholic
Copy link
Contributor

When opening the PR for this ticket for some reason Travis is not building it successfully. Will investigate additionally why this is hapenning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug squash bug Something isn't working client Rhea Team Issues and Epics worked on by team Rhea
Projects
None yet
Development

No branches or pull requests

3 participants