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

Bug with subtag in i18n middleware #906

Closed
sebilasse opened this issue Jun 11, 2021 · 7 comments · Fixed by #908
Closed

Bug with subtag in i18n middleware #906

sebilasse opened this issue Jun 11, 2021 · 7 comments · Fixed by #908

Comments

@sebilasse
Copy link
Contributor

sebilasse commented Jun 11, 2021

Bug
/core/middleware/i18n.ts :
If I have bundles like 'en' and 'de' but set a more specific locale, the middleware does nothing.
Assume the above locales with 'en' as the default bundle and

Code

i18n.set({locale: 'de-de'})

Expected behavior:

Switch language to 'de'

Actual behavior:

Nothing happens

@agubler
Copy link
Member

agubler commented Jun 11, 2021

Hey can you provide a small GitHub example please?

@sebilasse
Copy link
Contributor Author

sebilasse commented Jun 14, 2021

I hope, codesandbox is fine.
I forked the v6 i18n example (using "es-mx", fine) with v7 (bug) …
https://codesandbox.io/s/dojo-i18n-v7-bug-z93if?file=/src/widgets/LocaleSwitcher.tsx

@agubler
Copy link
Member

agubler commented Jun 15, 2021

@sebilasse thanks for the example, we've identified the issue in i18n and will look to raise a fix and back-port for 7 over the next few days. Just a note that the locale needs to be es-MX not es-mx as it is case sensitive (in cldr)

@sebilasse
Copy link
Contributor Author

Hey @agubler
thank you !
Personally using 8.0 beta …

just btw
You can see what I am working on here
https://github.com/redaktor/widgets-preview/
Currently some examples are a mess, but the exiting part is that every “atom” of the ActivityPub protocol will become a dojo widget (yay) –
It could become very useful if friends write ActivityPub clients :)

@agubler
Copy link
Member

agubler commented Jun 23, 2021

@sebilasse please can you try @dojo/framework@8.0.0-beta.7?

@sebilasse
Copy link
Contributor Author

It worked. Sorry for replying late.

@agubler
Copy link
Member

agubler commented Jul 26, 2021

Thanks for letting us know @sebilasse

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 a pull request may close this issue.

2 participants