LaxarJS / laxar

Building large applications is hard, so don't do that!
http://laxarjs.github.io/laxar/laxar-latest
MIT License
24 stars 11 forks source link

axI18n uses incorrect locale name when widget config has no default #481

Open jpommerening opened 7 years ago

jpommerening commented 7 years ago

I found a small, fixable bug in i18n:

https://github.com/LaxarJS/laxar/blob/d7acdaa83a420b4592b8dcb16f05faba354aa714/lib/runtime/widget_services_i18n.js#L89

If the widget has no configuration and no default for the … uhm … default locale, we're calling ...forLocale( 'en', 'i18n' ). I assume this is wrong, ...forLocale( 'default', 'i18n' ) seems closer to the solution, but then when do we use the fallbackLocale and defaultLocale?

cc @x1B

x1B commented 7 years ago

Yes, defaultLocale should be changed to 'default'.