Skip to content

Incorrect arb output from json with plurals #9

Description

@orestesgaolin

Consider following json file:

{
    "button_pressed": {
        "one": "You pressed button once",
        "other": "You have pressed button {count} times"
    },
    "hello_name": "Hello {name}!"
}

The converted arb via following command has wrong format:

arb-converter to-arb ~/Downloads/json --from-hierarchical-json ~/Downloads/arb/

Output arb:

{
    "@@last_modified": "2020-02-17T21:21:02.388Z",
    "@@author": "arb-converter-cli",
    "button_pressed": {
        "one": "You pressed button once",
        "other": "You have pressed button {count} times"
    },
    "hello_name": "Hello {name}!"
}

Whereas correct file should look more or less like follows:

{
    "@@last_modified": "2020-02-17T21:21:02.388Z",
    "@@author": "arb-converter-cli",
    "button_pressed": "{count, plural, one{You have pressed button once} other{You have pressed button {count} times}}",
    "hello_name": "Hello {name}!"
}

Is there any chance for such support?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions