Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch enable translation of validation error messages (addViolation).
Comment | File | Size | Author |
---|---|---|---|
#4 | node_title_validation-translate-messages-2964665-3-D8.patch | 5.79 KB | Krzysztof Domański |
#4 | node_title_validation-translate-messages.JPG | 25.98 KB | Krzysztof Domański |
translations.patch | 2.56 KB | dgaspara | |
Comments
Comment #2
jcisio CreditAttribution: jcisio as a volunteer and at Axess Open Web Services for Institut français commentedWe need to use dependency injection of the translation service.
Comment #3
mahtab_alam CreditAttribution: mahtab_alam at Valuebound commented$this->t is not working here. Throwing error as Error: Call to undefined method Drupal\\node_title_validation\\Plugin\\Validation\\Constraint\\NodeTitleConstraintValidator::t()
Comment #4
Krzysztof DomańskiI use dependency injection of the translation service. Now we can translate all error messages.
Comment #5
dgaspara CreditAttribution: dgaspara at NTT DATA commentedComment #6
dgaspara CreditAttribution: dgaspara at NTT DATA commentedComment #7
dgaspara CreditAttribution: dgaspara at NTT DATA commentedComment #8
dgaspara CreditAttribution: dgaspara at NTT DATA commentedComment #10
RenrhafTested in our current site, everything works properly with the patch in #4
Comment #11
RenrhafComment #13
cgomezgMerged in 8.x-1.x-dev