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

Logic of missing translations #26

Closed
crizant opened this issue Mar 7, 2020 · 1 comment
Closed

Logic of missing translations #26

crizant opened this issue Mar 7, 2020 · 1 comment

Comments

@crizant
Copy link
Contributor

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.

@crizant crizant changed the title Missing translations logic Logic of missing translations 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

No branches or pull requests

2 participants