Closed (duplicate)
Project:
Drupal core
Version:
9.0.x-dev
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Jan 2020 at 09:55 UTC
Updated:
23 Mar 2020 at 22:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hardik_patel_12 commentedKindly review a patch.
Comment #3
hardik_patel_12 commentedComment #4
longwaveWhy not combine #3106261: t() calls should be avoided , use $this->t() instead in RegionalForm.php with this? This sort of thing feels like we should have one issue per module.
Comment #5
hardik_patel_12 commentedShould i include all error in 1 issue , i thought it would be better to add different issue for different file.
Comment #6
pandaski commentedSecond #4 it is good to do with this issue in a bulk to reduce the small piece of commits.
Comment #7
hardik_patel_12 commentedCombining with #3106452: t() calls should be avoided , use $this->t() instead in system module multiple files . and #3106258: t() calls should be avoided , use $this->t() instead in ThemeSettingsForm.php and #3106261: t() calls should be avoided , use $this->t() instead in RegionalForm.php
Comment #8
hardik_patel_12 commentedComment #9
hash6 commentedComment #10
hash6 commentedThank @Hardik_Patel_12 for the patch, reviewed the patch successfully.
Comment #11
hash6 commentedComment #12
hash6 commentedComment #13
pandaski commentedChecked 120 changes, great job. thanks RTBC +1
Comment #14
andyposttesting of last patch fails https://dispatcher.drupalci.org/job/drupal_patches/31784/
Comment #15
andypostre-roll and fix usage in systemmanager, should be green now
Comment #17
andypostAll 3 failed tests are passing locally, requeued
Comment #19
swatichouhan012 commentedWe will work on this in #VbContribution2020.
Comment #20
andypostthis controller has no t() method
Comment #21
andypostFixed remains, few methods are static so should use class directly (instead of trait)
Also fixed few CS issues (only for changed lines)
Comment #22
swatichouhan012 commentedComment #23
longwaveThis looks good now.
Comment #24
alexpottNeeds a reroll.
Comment #25
jungleComment #26
jungleNo interdiff, rerolled form #21
Comment #27
hardik_patel_12 commentedComment #28
jungleComment #29
alexpottComment #30
alexpottComment #31
alexpottShould we extend from ControllerBase
This poses the question whether PluginFormBase should use the trait. I think it should because it is about building forms. But this needs a separate issue as it should also change \Drupal\system\Form\SystemMenuOffCanvasForm - and should discuss which traits to use.
This is a service and so we should inject the string translation service. But also this really calls into question the relationship between SystemController and SystemManager - and where different responsibilities lie.
Comment #32
jungleWorking on comments form #31
Comment #33
jungleChanges made to 1 and 3, ignored 2 according to comment #31
Comment #34
xjmThanks for working on this.
In general, issues should not be scoped by file or module; instead, they should be scoped by making the exact specific change across as much of core as possible. Reference: https://www.drupal.org/core/scope#files
In particular,
t()calls should be replaced based on whether the translation service is already available in the class, and more specifically, based on which base class it extends. (So, for example, one issue for form builders, one for controllers, one for list builders, and then splitting that up further only if the resulting patch is too large to be manageable.) We also need to decide the approach before we proceed with child issues. See #3113904: [META] Replace t() calls inside of classes for more discussion. So, closing as a duplicate of the parent issue in #3113904: [META] Replace t() calls inside of classes .Thanks!