Closed (duplicate)
Project:
Drupal core
Version:
9.2.x-dev
Component:
field_ui.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Apr 2015 at 09:04 UTC
Updated:
8 Jan 2021 at 08:49 UTC
Jump to comment: Most recent
Comments
Comment #1
roderikFYI:
I spotted this in #2073075 which is just replacing t() with $this->t() now so I guess it should be done in the classes mentioned in the summary, too (and not in tests)...
...but tbh I don't know the best scope of this issue. (Per subsystem? Should we search for e.g. all classes using EntityHandlerBase in Drupal core, and do a patch for them in one go? Or is this cleanup part of another issue already - I couldn't find any.)
So anyone who has an opinion on that - please say it.
Comment #2
roderik(Rephrasing to current scope checked in the issue summary)
Comment #3
roderiktagging
Comment #4
yesct commentedre-scoped based on a change in #2073075: Don't call the t() function in OO code in the field_ui module
removing novice until we know how giant this might end up being.
Comment #5
roderikComment #6
xjmThanks @vanilla-bear and @roderik for finding and filing this!
As a normal task, this especially needs to be checked against the Allowed changes during the Drupal 8 beta. Following through the chart there:
t()is not marked deprecated.So, we should postpone this change to 8.1.x. It's okay to make it in 8.1.x, because there will be no BC break.
However, I noticed that the docs for
t()do not even mention the availability ofStringTranslationTrait. So maybe we could file a separate issue to add documentation suggesting the use ofStringTranslationTraitrather thant()in classes? That would be okay before 8.0.0 as it's just an improvement to documentation.Comment #17
quietone commentedLooks like the work this is to do is being done in #3113904: [META] Replace t() calls inside of classes . I think this can be closed as a duplicate.