Skip to content

symfony/translation export files ordered by key #33014

Closed
@Dandrum

Description

@Dandrum

Description
Is it possible for the extraction command to order the translations by key ?
For example we use json files and like to have it ordered by key, we use keys like "menu.label.heading".

Example

From:
{
"label.edit-user": "Edit user",
"form.label.update": "Update",
"link.back-to-list": "Back to list",
"link.create-new-user": "Create new user",
"label.id": "ID",
}
To:
{
"form.label.update": "Update",
"label.id": "ID",
"label.edit-user": "Edit user",
"link.back-to-list": "Back to list",
"link.create-new-user": "Create new user",
}

The command can be look like this:
bin/console translation:update --clean -- force --output-format=json --ordered en

Greetings
Dan

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