8000 [Translation] Add a new lint:translation command · Issue #19942 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Translation] Add a new lint:translation command #19942
Closed
@bocharsky-bw

Description

@bocharsky-bw

Hi, guys!

I'd like to open a PR for implementing a new console command for translations:

# shows the errors in the console
$ ./bin/console lint:translation <file | dir | @BundleName>

# reorders translation messages according to the message order for default locale
$ ./bin/console lint:translation --reorder <file | dir | @BundleName>

# fixes the errors modifying the translation files
$ ./bin/console lint:translation --fix <file | dir | @BundleName>

# fixes the errors modifying the translation files and
# adds empty missing translations from the original file
$ ./bin/console lint:translation --fix --add-missing <file | dir | @BundleName>

First of all, I'd like to say that maintain translations is a difficult process, especially if we want to keep them consistent with each other. I mean: fix syntax, keep message order in sync in different files, add missing translation messages, etc.).

Actually, we can see it in the example of Symfony Demo project though this is a small project. This problem is even more relevant for big projects. Symfony Web Debug Toolbar helps with missed translations, but its tips relate to the opened page only (the page that developer's viewing right now). That's why I want to suggest this new console command.

What do you think about it?

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

      0