This module translates strings that are outputted from the Symfony validation constraints objects.
It does so by decorating the Drupal translation manager and adding new behavior that will pick up the Symfony translations.
The user is free to override the Symfony translation as described in the read me file.

Project link

https://www.drupal.org/project/symfony_validator_translator

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/symfony_validator_translator.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-symfony_valida...

Comments

bonrita created an issue. See original summary.

bonrita’s picture

Status: Active » Needs review
apaderno’s picture

Thank you for applying! I added the Git instructions for non-maintainer users. Reviewers will check the project and post comments to list what should be changed.

apaderno’s picture

Check the Git settings on the computer used to make commits. Since the commits aren't associated to your Drupal.org account, that email is not one used from your Drupal.org account.

bonrita’s picture

Hi kiamlaluno, indeed the email is from my company and my profile has my personal mail. Let me update my git settings and then push. Thanks again.

bonrita’s picture

Hi kiamlaluno, l have added my company's email address to my Drupal profile. I hope that helps with the commits I committed with the company's email.

apaderno’s picture

For those, you need to ask the Drupal.org Infrastructure Team to associate the commits you have done before adding the email to your account.

bonrita’s picture

Hi Kiamlaluno,
the commits have been associated with the new email that I added to the Drupal profile. For more info please see https://www.drupal.org/project/infrastructure/issues/3102310

klausi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for you contribution!

  1. "Trait LanguageTraitor." is not a good doc comment for a trait. Why is the trait needed? Which classes typically use this trait? Same for your classes, please document why they exist, what they are replacements for and how they modify Drupal core's behavior.
  2. Same for getSymfonyTranslation() and the comment "Get a symfony translation.". It just repeats the method name. What is a Symfony translation compared to a Drupal translation? Where does it get those extra special translations from?
  3. Tests: I see some unit tests, but no integration tests. Since this module decorates a core services it probably would make sense to implement some Kernel or Browser tests. That would make sure that standard translations still work and special Symfony translations work on top of it.
  4. Patching modules: I think it would make sense to link to issues for entity_clone and entity_browser where people post patches to switch them to interfaces.

Otherwise looks good to me, did not see any security issues.

apaderno’s picture

Assigned: Unassigned » apaderno
Status: Reviewed & tested by the community » Fixed
Issue tags: -PAreview: project created less than ten days ago

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

apaderno’s picture

Title: [D8] Symfony validation message translation. » [D8] Symfony validation message translation
bonrita’s picture

Hi Klausi, thanks for reviewing the code.

l have updated or fixed all the issues you mentioned.
That is

  1. Added reasonable comments to all the classes.
  2. Added reasonable comments to the methods.
  3. Added kernel tests.
  4. Linked patches in the documentation.

PAReview checklist
https://pareview.sh/pareview/https-git.drupal.org-project-symfony_valida...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.