Concatenating translatable strings is not allowed

Created on 16 June 2023, almost 2 years ago
Updated 4 July 2023, almost 2 years ago
📌 Task
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

  • Issue created by @sonam_sharma
  • 🇮🇳India sonam_sharma

    hello,
    I have fixed the issue reported by phpcs

  • Issue was unassigned.
  • Status changed to Needs work almost 2 years ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what should be fixed/changed. Neither the title nor screenshots are sufficient to describe what the issue is, even in the case a patch is provided.
    In the case of a bug, the description should also list the steps necessary to reproduce the issue, starting from when the module/theme is installed.

  • Status changed to Closed: works as designed almost 2 years ago
  • 🇮🇳India ashutosh ahirwal India

    @sonam_sharma I have checked your patch the $i is use to add the increment value of number of slides on form and to differentiate the name of each field in slides.
    And removing the $i is not a correct way to solve the phpcs issue.

    -        '#title' => t('Slide ' . $i),
    +        '#title' => t('Slide'),
    

    Kindly install and test the project in actual scenario before creating issues.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The patch is wrong, but the first argument passed to t() needs to be a literal string. t('Slide ' . $i) needs to be replaced by t('Slide @number', ['@number' => $i]), for example.

Production build 0.71.5 2024