Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Concatenation in translatable string #29956

Copy link
Copy link
Closed
@Stadly

Description

@Stadly
Issue body actions

Symfony Translation Component 4.2.2

When translating long strings that can be pluralized, splitting the parts often improves readability (and compliance with maximum line length code style rules):

$translator->trans(
    'There must be at least one lower case letter.|'.
    'There must be at least %count% lower case letter.',
    ['%count%' => $constraint->getMin()]
);

instead of

$translator->trans(
    'There must be at least one lower case letter.|There must be at least %count% lower case letter.',
    ['%count%' => $constraint->getMin()]
);

The PhpExtractor does not recognize the string concatenation, but includes only the first string (There must be at least one lower case letter.| in this case) in the extracted translations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.