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->t()
should be used for translation.
Comment | File | Size | Author |
---|---|---|---|
#8 | fix_commit_changes_2845309-8.patch | 2.22 KB | Hydra |
#4 | 2845309.patch | 13.42 KB | Erik Seifert |
#2 | 2845309.patch.patch | 9.41 KB | chaitanya17 |
Comments
Comment #2
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedPlease check attached working patch.
Comment #3
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedComment #4
Erik Seifert CreditAttribution: Erik Seifert commentedComment #5
Erik Seifert CreditAttribution: Erik Seifert commentedUse StringTranslation trait
Comment #7
Hydra CreditAttribution: Hydra at erdfisch commentedThis commit is causing trouble, when you call the static method outside the object context.
Their is an issue and a patch https://www.drupal.org/node/2849226
Comment #8
Hydra CreditAttribution: Hydra at erdfisch commentedNo need to use this twice here as well, its already used by PluginBase.
On top of that, the StringTranslationTrait is already in use by the parent class "TypedData" which will cause a strict php warning. I would consider not using this twice.
The provided patch also fixes 2849226.
Comment #9
Erik Seifert CreditAttribution: Erik Seifert commentedWe need tests ;- )
Comment #11
Hydra CreditAttribution: Hydra at erdfisch commented