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.
Since #1157294: Exportable, Field validation rules are exportable using Ctools exportables.
However, although strings, and specifically validation error messages, can be translated by Drupal, the generated features do not include any way for the Potx string extractor to get the error messages and add them to the generated PO file for the feature.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2211537-error-messages-translatable-3.patch | 2.72 KB | rodrigoaguilera |
#1 | 0001-Issue-2211537-export-error_code-properties-as-transl.patch | 6.34 KB | fgm |
Comments
Comment #1
fgmHere is a tiny patch exporting the strings so that Potx can see them, making it easier to distribute translations for field validation rules.
Comment #2
g089h515r806 CreditAttribution: g089h515r806 commentedlooks nice.
Comment #3
rodrigoaguileraI re-rolled the previous patch and cleaned the logic inside field_validation_ctools_export to just add the translatables at the end and don't mess with code the formatting and indentation that ctools does.
I kept the code style fixes.
Patch attached