sufone / layl

🌙 Calculator for tahajjud, qiyam, and worship & sleep in an Islamic night!
https://layl.app
GNU Affero General Public License v3.0
21 stars 3 forks source link

First load of Arabic makes page blank, needs refresh #58

Open mr-islam opened 3 years ago

mr-islam commented 3 years ago

Maybe it works the same for English if Arabic is loaded the same

Check language loading and svelte 18n

mr-islam commented 3 years ago

This error is not there on a local build, so clearly it's something when it's built / served / making network requests…

mr-islam commented 3 years ago

I'm hitting a blank about why this is happening… maybe there's some code in some library that's not playing nice, but I don't know what…

I might just end up running a page refresh after changing the locale… that's so lazy, but ideally people should receive their device language by default, and if not they change the language once manually, and the browser remembers automatically. This can help prevent weird font/styling bugs as well I guess.

Need to remove the counter for how many times language has been changed then…

mr-islam commented 3 years ago

Even that did not work: https://github.com/sufone/layl/commit/45508e769888f9a3b4215038d574b4d51bf5c044

.......................................

Really tired of this bug… let me try a cache-free deploy from netlify

mr-islam commented 3 years ago

Um… so the netlify branch deploy was failing for the last 4~ commits so when I was testing it was still the old version...

😢

mr-islam commented 3 years ago

Alhamdulillah solved! It was setting a loading delay of zero that caused the trouble it seems. To prevent any future mess, should try:

  1. re-introduce the delay and see if the error comes back.
  2. not specify any loading delay, since svelte-i18n docs show it to be optional.