Skip to content
Snippets Groups Projects

Resolve #3410128 "Remove remaining unnecessary"

4 unresolved threads

Closes #3410128

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
34 34 */
35 35 public function fields() {
36 36 $fields = [
37 'id' => $this->t('Id'),
38 'title' => $this->t('Title'),
39 'changed' => $this->t('Changed'),
37 'id' => 'Id',
38 'title' => 'Title',
39 'changed' => 'Changed',
  • 91 91
    92 92 // Base fields for the test entity types.
    93 93 $this->commonBaseFields['name'] = BaseFieldDefinition::create('string')
    94 ->setLabel(t('Name'))
    95 ->setDescription(t('The name of the test entity.'))
    94 ->setLabel('Name')
    95 ->setDescription('The name of the test entity.')
    • Comment on lines +94 to +95
      Author Maintainer

      Best practice is to mark base field labels and descriptions as translatable so I think this should stay as a good example.

    • Author Maintainer

      Hm, but this is a kernel test setup, so will anyone really copy and paste from here? Not sure.

    • The basefield definitions in this file are inconsistent with the use of t. The ones with t were added when this was converted from a unit test in this commit.

      Searched core and this is the only usage outside of core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php and core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php both of which at least use the language module. This one does not.

      All together I go for removing t. So left this for now.

    • Please register or sign in to reply
  • 85 85
    86 86 $form['submit'] = [
    87 87 '#type' => 'submit',
    88 '#value' => t('Submit'),
  • 612 612 $this->assertEquals(1, $violations->count());
    613 613
    614 614 // Test translating violation messages.
    615 $message = t('This value should be %limit or more.', ['%limit' => 5]);
    615 $message = 'This value should be 5 or more.';
  • quietone added 59 commits

    added 59 commits

    Compare with previous version

  • assigned to @quietone

  • unassigned @quietone

  • quietone added 161 commits

    added 161 commits

    Compare with previous version

  • quietone added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading