| Comment | File | Size | Author |
|---|---|---|---|
| #11 | drupal-core_action_module_string_translation-2858062-11.patch | 6.17 KB | manishmittal9 |
| #8 | 2858062-8.patch | 5.19 KB | tameeshb |
| #6 | 285062-6.patch | 5.32 KB | Lal_ |
| #2 | Drupal-core-action-module-string-translation-2858062-2.patch.patch | 5.36 KB | sandeepscs |
Comments
Comment #2
sandeepscs commentedPlease find patch
Comment #3
Aanal.addweb commented@sandeepscs, Thanks for the updated patch, I checked it through manually patch uploading process in module, as per my testing it works well.
Comment #4
cilefen commentedComment #5
cilefen commentedComment #6
Lal_Comment #8
tameeshb commentedRedone patch for 8.4.x
Comment #9
joshi.rohit100ActionListBuilder is still affected.
Comment #10
manishmittal9 commentedComment #11
manishmittal9 commentedNew patch addressing the comment #9
Comment #12
manishmittal9 commentedComment #13
phenaproximaLooks perfect. Thank you!
Comment #14
phenaproximaRe-titling in accordance with @andypost's comment in #2859390: t() should be replaced with $this->t().
Comment #15
alexpottThank you for your work on cleaning up Drupal core's use of deprecated APIs!
In order to deprecate APIs in a maintainable way, converting deprecated uses should be replaced across all of core for a given kind of usage, rather than in individual modules or files. Such issues should also always be part of an overall plan to ensure all usages are removed, rather than standalone patches.
For background information on why we usually will not commit cleanups that aren't scoped in that way, see the core issue scope guidelines. See the core deprecation policy for more information on how we handle deprecations.
Contributing to the overall plan above will help ensure that your cleanups for core's deprecated code improve core in a maintainable and minimally disruptive way.
I think that we're going to need a coding standard to enforce this one because there are just too many usages. I.e. we need to add a rule to coder that can check for t() function use in a class and apply it to core.
The next steps are here are to:
Comment #16
chi commentedJust out of curiosity, do we have officially approved coding standard about disallowing t() function in OOP code?
Comment #17
alexpott@Chi - no but Coder doesn't have to be just about coding standards - it can recommend best practices. And best practices are to not use procedural methods from classes as this makes code harder to unit test. We don't need a coding standard for this.
Comment #18
manishmittal9 commentedAs suggested in comment #15, the issue is closed.
A new issue has been created on coder project https://www.drupal.org/node/2860116 recommending the practice of using $this->t() instead of t()
Issue https://www.drupal.org/node/2859390 is open for work to patch to all the modules of the core
Comment #19
chi commentedWell, the description of Drupal ruleset says "Drupal coding standard", but another ruleset called Drupal best practice seems to be the right place for this rule. But I am not aware if it is used by drupal.org CI system.
There were multiple issues of this type raised recently (I've closed a couple - details). I propose this best practice to be established and documented somewhere first.