Open experimatt opened 4 years ago
@benjifs We've got a pretty major character encoding issue with regard to the drop-down!
Because the translations were dependent on the KNU Font, things that are not styled by css like a dropdown won't get the proper font applied to them. The quickest solution would be to change the select
implementation and use a styled dropdown like the ones from Bootstrap or something like this: https://codepen.io/wallaceerick/pen/ctsCz
Not really sure what an alternate approach would be since the translations only work with that font.
@benjifs @experimatt I'm also seeing an issue where other languages at times get the wrong value applied for moment values... This example in Mandarin Chinese that has unstyled Karen:
This example in Vietnamese which has Spanish:
Seems related to this issue or at least moment. Any idea what the problem could be?
I looked into this and there's two problems. Moment doesn't default to a locale if the one used isn't present so it just fails to translate in the case of Mandarin Chinese and stays with whatever the previous translation was. A quick fix is to check if the locale is defined in moment and if not, default to English.
However I noticed the locale does in fact exist it's just never imported. If I import that locale in index.js
, it'll work and translate that
See this PR from @benjifs for more details: https://github.com/Twin-Cities-Mutual-Aid/twin-cities-aid-distribution-locations/pull/182