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

Values don't pre-populate the string if it is not present in the default JSON #101

Closed
ghost opened this issue Oct 29, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Oct 29, 2020

Describe the bug

If I do something like so, it displays the key as the default value for this translation.
$_("Hi!") > Hi!

However, if I do $_("Hi, {name}", { values: { name: "Bryan" } }), it does not use the key as the default value. Instead, I get the value back of Hi, {name} where I'm expecting Hi, Bryan.

To Reproduce

It's very simple, try to display a translated string with values that is not in your default language json.

Expected behavior

In my opinion, the expected behavior is that you would treat the key as the default value even if it has variables. This is how most i18n libraries work and it's also how svelte-i18n works without values.

@kaisermann kaisermann self-assigned this Nov 5, 2020
@kaisermann kaisermann added the bug Something isn't working label Nov 5, 2020
@kaisermann
Copy link
Owner

Hey @bgold0 👋 Thanks for your report 😁 Fixed in v3.2.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant