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

Allow to define an empty prefix for translation:update command #20044

Copy link
Copy link
Closed
@javiereguiluz

Description

@javiereguiluz
Issue body actions

Context

When using the translation:update command to generate a translation file, the translated strings are just the original strings with the __ prefix (e.g. original Contact us, "translation": __Contact us). This value can be changed with the --prefix option.

Problem

When generating the translation file for the original language, I want to use an empty prefix. It seems impossible to do that because of the way Symfony Console options work:

$ ./bin/console translation:update en --dump-messages
# translation prefix = '__';

$ ./bin/console translation:update en --dump-messages --prefix=""
# translation prefix = '__';   <-- ERROR: I expected here an empty prefix

$ ./bin/console translation:update en --dump-messages --prefix=" "
# translation prefix = ' ';

$ ./bin/console translation:update en --dump-messages --prefix="aaa"
# translation prefix = 'aaa';

I think in the past we had some issues reported for the way console options work, but I can't find the issues. Considering that setting an option with an empty value is the same as not setting that option looks confusing and it could even be considered a bug.

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.