Comments

Hardik_Patel_12 created an issue. See original summary.

hardik_patel_12’s picture

StatusFileSize
new1.35 KB

Kindly review a patch.

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
hardik_patel_12’s picture

StatusFileSize
new25.95 KB

Replacing t() calls with in $this->t() in more files from node module.

hardik_patel_12’s picture

Title: t() calls should be avoided in classes, use dependency injection and $this->t() instead in NodeForm.php » t() calls should be avoided in classes, use dependency injection and $this->t() instead in Node module

Status: Needs review » Needs work

The last submitted patch, 4: 3106762-4.patch, failed testing. View results

hardik_patel_12’s picture

StatusFileSize
new24.64 KB

Kindly review a new patch.

hardik_patel_12’s picture

Status: Needs work » Needs review
longwave’s picture

@Hardik_Patel_12: when you update a patch it is helpful to provide an interdiff against the previous patch so reviewers can easily see what was changed between the patches. See https://www.drupal.org/documentation/git/interdiff for documentation on this.

hardik_patel_12’s picture

ok sure.

hardik_patel_12’s picture

StatusFileSize
new1.37 KB

Interdiff of #4 and #7

hash6’s picture

Assigned: Unassigned » hash6
hash6’s picture

Assigned: hash6 » Unassigned
Status: Needs review » Reviewed & tested by the community

Thanks @Hardik_Patel_12 for the patch, reviewed and tested successfully.

swatichouhan012’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/node/src/NodeTypeForm.php
@@ -146,20 +146,20 @@ public function form(array $form, FormStateInterface $form_state) {
-      '#description' => t('Users with the <em>Administer content</em> permission will be able to override these options.'),
+      '#description' => $this->t('Users with the <em>Administer content</em> permission will be able to override these options.'),

This is conflicting with a recent change. When re-rolling we need to ensure that the new and not the old text is used.

swatichouhan012’s picture

Status: Needs work » Needs review
StatusFileSize
new26.67 KB

#16 patch failed to apply, i have rerolled a new one to remove all t calls, kindly review.

Status: Needs review » Needs work

The last submitted patch, 16: 3106762-16.patch, failed testing. View results

jungle’s picture

Assigned: Unassigned » jungle

Working on this

jungle’s picture

Assigned: jungle » Unassigned
Status: Needs work » Needs review
StatusFileSize
new28.08 KB
new1.96 KB

#15 checked

$ cat 3106762-19.patch | grep "Administer content"
# the output is empty
jungle’s picture

Should move MigrationDeriverTrait and StringTranslationTrait to DeriverBase? Both D6NodeDeriver and D7NodeDeriver use the two traits.

xjm’s picture

Status: Needs review » Closed (duplicate)

Thanks 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!