Closed perpi closed 6 years ago
For mapping European style numbers to Arabic style numbers I use another filter. Perhaps it makes more sense to merge that filter into this repository.
Ah, thanks for the hint. Now it works well.
Anyway, 'merging' would be a nice idea.
I'll consider displaying numbers based on the language set in the context in #4
Hi. Has the plugin taken any change? I'm getting this error:
Liquid Exception: Liquid error (line 16): invalid arguments or invalid Jalali date in /_layouts/post.html
Line 16: <span>{{ page.date | jdate: "%A %d %b %Y" | habify }}</span>
@perpi which Ruby version are you using? I released a new jalalidate
gem version which uses Integer
instead of Bignum
. That's the only change that I could think of.
$ ruby --version
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
jekyll version: 3.6.2
But the GitLab deployment process is failed too, while it probably uses the latest version.
Hmmm, no idea?
@perpi you have to use either ruby 2.4 or use an older version of jalalidate
such as v0.3.3.
I also released a new version of jekyll-jalali
that solves your problem by forcing v0.3.3 of jalalidate
for the time being.
Yoohoo, Now it's working again. Thanks bro.
you have to use either ruby 2.4
Yeah, but it's not available in the Ubuntu repo yet. I'm afraid of installing stuff out of official repositories.
@perpi
After that release I am getting complains from other users to upgrade jekyll-jalali
so that they don't get FixNum is deprecated
warnings.
However, you can still pinpoint the older jekyll-jalali
release in your Gemfile
. It is actually very easy. You need to slightly change your Gemfile:
group :jekyll_plugins do
gem "jekyll-jalali", "= 0.1.1"
gem "jekyll-hinduarabic"
end
If you had any problems, please open a new issue.
{{ post.date | jdate: "%d %b %Y" | replace: "0", "۰" | replace: "1", "۱" | replace: "2", "۲" | replace: "3", "۳" | replace: "4", "۴" | replace: "5", "۵" | replace: "6", "۶" | replace: "7", "۷" | replace: "8", "۸" | replace: "9", "۹" }}
I used the code
{{ page.date | jdate: "%A %d %b %Y"}}
, but it generates english numbers like this:شنبه 12 فروردین 1396
While I was expected for:
شنبه ۱۲ فروردین ۱۳۹۶
What should I do to turn numbers to Farsi?