Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set correct defaults in new and merged catalogs #233

Merged
merged 7 commits into from
Jul 4, 2018
Merged

Conversation

tricoder42
Copy link
Contributor

Fixes #199, #212, #222

New catalog:

  • translation: Message ID is copied as a translation for sourceLocale for messages with auto-generated IDs. Empty otherwise.
  • defaults: Auto-generated message for custom IDs. Empty otherwise.

Merged catalog:

  • translation is updated for sourceLocale if wasn't changed from defaults.

Minimal format:

  • always uses either translation or message defaults. This is how lingui compile resolves message in lingui format.

Known drawbacks:

  • when using custom message IDs and minimal format, once catalog for sourceLocale is generated translations must be always edited manually. Even when default translation in source code is updated, the translation in catalog won't be updated automatically because there's no way to distinguish default translations from custom ones.

This change makes it easier to run scripts locally using babel-node.
In Rollup and Babel build are module transformers disabled explicitely.
@tricoder42 tricoder42 merged commit 31e351b into stable-2.x Jul 4, 2018
@tricoder42 tricoder42 deleted the issue/199 branch July 4, 2018 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant