code4recovery / tsml-ui

Embeddable recovery meeting finder
https://tsml-ui.code4recovery.org/
MIT License
23 stars 17 forks source link

Unexpected Application Error #380

Closed bubfcg closed 6 months ago

bubfcg commented 7 months ago

When using the new tsml ui, I get this error: Unexpected Application Error! Cannot convert undefined or null to object TypeError: Cannot convert undefined or null to object at Function.keys () at Eu (https://tsml-ui.code4recovery.org/app.js?ver=6.5.2:5:60173) image

gkovats commented 7 months ago

Hi @bubfcg , could you give us some details on where this is running? It'd be helpful to see your TSML-UI config to recreate the issue. It appears to be an issue with the translation config.

bubfcg commented 7 months ago

Hi @gkovats it is running on https://ca-nn.nl/meetings/ but I am using the old interface now. What info do you need from me?

gkovats commented 7 months ago

@bubfcg Sorry, could you try enabling the TSML UI meeting display, and then sending over a snapshot of the meetings page HTML? The issue appears to be with the configuration object responsible for offering translations of the UI, I assume to Dutch. Looking at the object would be able to see where it's failing and recreate the issue.

bubfcg commented 7 months ago

Sure, see attached textfile for html @gkovats html.txt

gkovats commented 7 months ago

Hey @bubfcg it looks like even with the fix, many of the UI labels don't get translated. Would you have time to possibly translate the JS object values from English in this attached file? We'll patch it in as nl for use: nl.js.txt

You can ignore any strings inside % characters, and see how the other languages are handled: https://github.com/code4recovery/tsml-ui/tree/main/src/i18n

bubfcg commented 7 months ago

Hey @gkovats I have translated it. Instead of A.A. I wrote C.A. or Cocaine Anonymous in the file, since that's where I need it for. If that shouldn't be done in this file, please change it ;) nl.js.txt

bubfcg commented 7 months ago

Can I upload the file myself somewhere @gkovats ? Or should I wait for an update from your side?

joshreisner commented 7 months ago

i've created a PR, @gkovats when you get a chance if you could take a 👀: https://github.com/code4recovery/tsml-ui/pull/384

gkovats commented 7 months ago

Thanks @joshreisner, sat on this long enough. Looks good, seeing Dutch on my end.

bubfcg commented 7 months ago

Hey @gkovats I have translated it. Instead of A.A. I wrote C.A. or Cocaine Anonymous in the file, since that's where I need it for. If that shouldn't be done in this file, please change it ;) nl.js.txt

@gkovats and @joshreisner as I mentioned before, I have changed A.A. / Alcoholics Anonymous in the Dutch translations for C.A. / Cocaine Anonymous because that's what I need for my website. You can change that if needed.

By the way, if you need any more files translated to Dutch: I'm happy to help ;)

gkovats commented 7 months ago

@bubfcg - Dude! If you have time, could you go through these poorly Google translated meeting types? They're obviously not all very CA centric, but anything you add helps. types.json.txt

bubfcg commented 7 months ago

@gkovats Sure, I translated everything I knew the Dutch words for we use in our AA and CA meetings in The Netherlands. types.json.txt