illright / attractions

A pretty cool UI kit for Svelte
https://illright.github.io/attractions
MIT License
1.03k stars 37 forks source link

Add slots for translation #345

Closed Bluzzi closed 2 years ago

Bluzzi commented 2 years ago

This issue allows to add slots to be able to translate the messages of the components.

Close #315

Slots

Bluzzi commented 2 years ago

For the calendar, the messages are put directly into the JS code. How do you want me to implement the ability to translate this?

aabounegm commented 2 years ago

Very nicely done! Thanks for the effort. Do you think it would also be possible for you to add the new slots to the documentation? As for the calendar, it seems to me that there are 2 possible solutions:

  1. Accept the text as a prop rather than a slot
  2. Wrap the Button itself in a slot that's given the day as a prop

Both solutions are not mutually exclusive, but I'm leaning more towards the first one only.

github-actions[bot] commented 2 years ago

Docs available on https://illright.github.io/attractions/345/

Bluzzi commented 2 years ago

It's over, is it right like that?

aabounegm commented 2 years ago

Also, please make sure the CI pipeline passes. There are currently problems with Prettier formatting.