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

Update show missing translations logic #25

Merged
merged 1 commit into from
Mar 7, 2020

Conversation

crizant
Copy link
Contributor

@crizant crizant commented Mar 7, 2020

When using Translations.byLocale, we should not need to provide the translations of the default locale like:

var t = Translations.byLocale("en_US") +
        {
          "en_us": {
            "Hi.": "Hi.",
            "Goodbye.": "Goodbye.",
          },
        };

This is boilerplate.

But if we don't provide it, an error is shown: ➜ There are no translations in 'en_US' for "Hi".
This behavior should be fixed.

I have created #25 to fix this issue, please take a look of it. Thanks.

@marcglasberg marcglasberg merged commit fb9d922 into marcglasberg:master Mar 7, 2020
@marcglasberg
Copy link
Owner

This already works. The docs say: "Note above, since "en_us" is the default locale you don't need to provide translations for those".

But it was recording it as a missing translation. It should not. Good catch!

I've added tests, and I'm bumping the package version to 1.3.4. Thanks.

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.

None yet

2 participants