Skip to content

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

@javiereguiluz

Description

@javiereguiluz

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy