TripTracer / TripTracer-web

A travelling white-label website with the leverage of Next.js
0 stars 0 forks source link

Fix: 61 i18next language prop passing issue #62

Closed sepehrsohrabii closed 4 months ago

sepehrsohrabii commented 4 months ago

Background There was a problem with passing language props everywhere that we needed to translate something. That didn't seem logical. So we decided to change the structure of the i18next library.

Description In addition, we changed the structure of the i18next library in the way that now it doesn't need any language prop to be passed for translations. After the task had been done the problem was fixed, we found that there was an issue in the first load of the website immediately after running. The problem was that the buttons like the dark mode button or the change language buttons, didn't work, like the page was frozen. After all, the fixtures were found in the globals.css import line in the layout that should been imported after the import line of the flowbite library and another solution in the tailwinf.config.ts file.

Expected behavior The expected behavior is that the above problems have been solved.

Observed behavior The expected behavior was observed correctly.

How to reproduce/test The unit test files are not completed yet and they will be complete in the #58 issue, So there isn't any testing way except running the project and testing it in the browser. To test the language switcher functionality you can use the language buttons on the home page to change the language, when you press on each of them you can see the website's language will change as is chosen. and you can see the changes also in the local storage of your browser.

haghighi251 commented 4 months ago

Please do the new changes and merge this PR yourself.