Persian website: fix broken dates and use the Jalali calendar

Hi everyone!

I just noticed that the dates on the version of the F-Droid website are showing wrong right now. Like, for example, you might see something such as “12d Sep 26.” This happens because the current Persian(farsi) “news.date_format” is not being interpreted how it should be by Ruby’s “strftime” or is not in the way we expected. So I opened a MR to repair the Persian date display and to also show those dates on the site using the Jalali (Solar Hijri) calendar.

What the MR does:

  • fixes the broken Persian date display
  • converts Gregorian dates to Jalali for the Persian site
  • keeps the existing Gregorian date behavior for the other languages
  • adds tests for Jalali dates across a pretty wide historical and future range

I’d really like some feedback from Persian-speaking users. Also from F-Droid contributors. About the date format and also if keeping the Persian date format inside the plugin is the preferred choice rather than handling it via Weblate.

If you opened an MR, why write a post here?
Also, afaiu, it is the language issue and not a code issue. The translations happen over on weblate which get merged over on gitlab.