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.
Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables
File /core/modules/views/views.tokens.inc
Line 77: Unused local variable $langcode
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal-2065115-1.patch | 514 bytes | sergeypavlenko |
#1 | drupal8.other_.2065115-1.patch | 0 bytes | sergeypavlenko |
Comments
Comment #1
sergeypavlenko CreditAttribution: sergeypavlenko commentedComment #2
sergeypavlenko CreditAttribution: sergeypavlenko commentedComment #3
victor-shelepen CreditAttribution: victor-shelepen commentedIt is the empty patch file.
Comment #4
victor-shelepen CreditAttribution: victor-shelepen commentedSorry. I am wrong.
Comment #5
victor-shelepen CreditAttribution: victor-shelepen commentedYes. The variable $language is unused.
Comment #6
webchickWonder if this is an oversight, though... Should that $langcode variable actually be getting passed into some of the code below?
Moving components and tagging VDC.
Comment #7
sergeypavlenko CreditAttribution: sergeypavlenko commentedThe variable $langcode below in the code is not used. I think it should be removed.
Comment #8
webchickYes, I realize that. I'm asking whether that's actually a bug. :)
Comment #9
dawehnerI am not sure but can you actually translate something of description/label(admin)/title ... of a view?
Comment #10
andypostSuppose we should get rid of all unused variables, as I know views uses config translation now
Comment #11
webchickok cool, just checking.
Committed and pushed to 8.x. Thanks!