clubcapra / clubcapra.github.io

Official homepage for Club Capra, infos and list of projets
https://www.clubcapra.com
MIT License
3 stars 1 forks source link

Add translation for teams page #91

Closed Flip-HH closed 6 months ago

Flip-HH commented 6 months ago

Don't hesitate to comment if there are typos :/

McCaroon commented 6 months ago

Function-wise, it looks good. Text-wise, it looks good. I'd just wait to see if @Leuchak has anything relevant to point out before merging, since web design isn't my forte. Good job! 👍

Flip-HH commented 6 months ago

As he said

The change is necessary in this case, because the old method was checking if the string was undefined, then printing the other one. In the case where it is not undefined, it is simply printed to the html page.

When using the translation object, we need to check that the string is undefined before putting it in the object. If i simply added the $t around the string and left it as it was, the translation object tries to fetch a translation string based on the locale but since it's undefined, it doesn't work, which is why i changed the method to check that the string is undefined before doing the outputs.

Leuchak commented 6 months ago

good