Skip to content

Use generated message as a default one in sourceLocale catalog #212

Closed
@sladek-jan

Description

@sladek-jan

Hi,

In an attempt to add metadata ("context" for linguists) to translations, I used this new feature as follows:
i18n('Word // some context here')`Word`

The docs say Generated message is used as a default one. If I understand it correctly, in this case a key Word // some context here should be created in the catalog, with a default English translation Word (as long as sourceLang="en").

This is not what happens. The entry created in the catalog for en is:

"Word // some context here": {
    "translation": "Word // some context here",
    "origin": [
     ...
    ]
  },

This is logical, because of this commit which copies translation IDs over as default translations into source locale. But isn't this in conflict with what the docs say?

I am currently using version 2.0.1 until another issue is resolved.
Thank you for the great lib btw.

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