Feature #12889

Persian Solar Calendar is needed

Added by shakib a almost 5 years ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Calendar
Target version:-
Resolution:

Description

Hi,
There is a lack of Persian Solar Calendar (Hejri Shamsi or هجری شمسی).
This calendar as the most accurate calendar in the world (http://en.wikipedia.org/wiki/Iranian_calendars) is used by more than 100 milion people and is really lacked here in this greate bug tracking software i.e. Redmine.
Thanks


Related issues

Duplicated by Redmine - Feature #7711: Jalali Calendar Closed 2011-02-24
Duplicated by Redmine - Feature #21935: Fullcalendar in Redmine Closed

History

#1 Updated by Jean-Philippe Lang almost 5 years ago

  • Description updated (diff)

Fixed wrong link syntax.

#2 Updated by Jean-Philippe Lang almost 5 years ago

  • Priority changed from High to Normal

#3 Updated by shakib a almost 5 years ago

Jean-Philippe Lang wrote:

Fixed wrong link syntax.

Is there any way to hook all the the Redmine calendar refrences and provide a Persian Calendar in reply?
I am not familiar with ruby but can program in Delphi. I also have some programs which can translate any Gregorian Calendar into the Persian equivalent. Can you guide me how to insert such a code into Redmine?
I also can create Apache SO files with Delphi.

#4 Updated by Jean-Philippe Lang almost 5 years ago

Redmine uses JQuery and this JQuery plugin provides Persian calendars: http://keith-wood.name/calendars.html. I didn't test it and don't know if we can easily replace the default JQuery Datepicker used in Redmine by this one.

#5 Updated by shakib a almost 5 years ago

I checked the files but could not correctly find the actual connection between the JQuery Calendar CDate and DatePickers with Redmine ruby files! I thought it is somewhere in the "D:\BitNami\redmine-2.2.0-0\apps\redmine\htdocs\app\helpers\application_helper.rb" but it seems to be wrong! (I changed the "i18n/jquery.ui.datepicker-#{jquery_locale}.js" but nothing changed in the date pickers) Should ruby files be compiled? I am running Redmine on Win Server 2003.

#6 Updated by Ebrahim Mohammadi almost 4 years ago

This issue is a duplicate of #7711

Supporting calendar systems other than Gregorian in Redmine takes much more than just replacing the date picker. I had developed a work-aroundish patch for version 1.2 of Redmine, but haven't updated it to newers versions.

If Redmine could provide a single pluggable point for:

  1. Rendering date and time from timestamp to a human-readable string
  2. Parsing date and time from human-readable string into timestamp

one could add a new calendar system fairly easily. The problem is currently there are many many points in the code that do these two task, and sometimes it is done implicitly under the hoods.

jplang, do you think Redmine would provide the facility to support alternative calendar systems?

#7 Updated by Toshi MARUYAMA almost 4 years ago

#8 Updated by shakib a over 3 years ago

Ebrahim Mohammadi wrote:

This issue is a duplicate of #7711

Supporting calendar systems other than Gregorian in Redmine takes much more than just replacing the date picker. I had developed a work-aroundish patch for version 1.2 of Redmine, but haven't updated it to newers versions.

If Redmine could provide a single pluggable point for:

  1. Rendering date and time from timestamp to a human-readable string
  2. Parsing date and time from human-readable string into timestamp

one could add a new calendar system fairly easily. The problem is currently there are many many points in the code that do these two task, and sometimes it is done implicitly under the hoods.

jplang, do you think Redmine would provide the facility to support alternative calendar systems?

سلام
البته من موفق شدم با نوشتن یک برنامه کوچک بخش مهمی از نمایش تاریخ ها را درست کنم (یعنی مورد اول از درخواست شما) برای اینکار یک برنامه دلفی با نام "shamsi_date.exe" نوشتم که از stdin تاریخ میلادی گرفته و تاریخ شمسی را به stdout ارسال می کند. سپس در یک نقطه خاص از فایل: i18n.rb یک کلاس (؟) نوشتم و برنامه دلفی را در بین دو علامت ` قرار دادم. سپس در کلاس (format_date(date تغییر کوچکی دادم. به این ترتیب هربار خواندن تاریخ و ساعت در سرور منجر به اجرای برنامه دلفی شده و تاریخ شمسی و ساعت برای آن ارسال می شود. کلاس مزبور به این شکل است:


    def shamsi_date(date)
    shamsi=`bin/shamsi_date #{date}`
    end

ضمنا لازم است این خط را به اول فایل اضافه کنید:


require 'cgi'

محل و موقعیت کلاس و نحوه استفاده از آن در پایین آمده (دقت کنید که همه کد را من در اینجا کپی نکرده ام چون لازم نبود):


# Redmine - project management software
# Copyright (C) 2006-2012  Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
require 'cgi'

module Redmine
  module I18n
    def self.included(base)
      base.extend Redmine::I18n
    end

    def l(*args)
      case args.size
      when 1
        ::I18n.t(*args)
      when 2
        if args.last.is_a?(Hash)
          ::I18n.t(*args)
        elsif args.last.is_a?(String)
          ::I18n.t(args.first, :value => args.last)
        else
          ::I18n.t(args.first, :count => args.last)
        end
      else
        raise "Translation string with multiple values: #{args.first}" 
      end
    end

    def l_or_humanize(s, options={})
      k = "#{options[:prefix]}#{s}".to_sym
      ::I18n.t(k, :default => s.to_s.humanize)
    end

    def l_hours(hours)
      hours = hours.to_f
      l((hours < 2.0 ? :label_f_hour : :label_f_hour_plural), :value => ("%.2f" % hours.to_f))
    end

    def ll(lang, str, value=nil)
      ::I18n.t(str.to_s, :value => value, :locale => lang.to_s.gsub(%r{(.+)\-(.+)$}) { "#{$1}-#{$2.upcase}" })
    end

    def shamsi_date(date)
    shamsi=`bin/shamsi_date #{date}`
    end

    def format_date(date)
      return nil unless date
      options = {}
      options[:format] = Setting.date_format unless Setting.date_format.blank?
      options[:locale] = User.current.language unless User.current.language.blank?
      ::I18n.l(date.to_date, options)
      shamsi_date(date)
    end

اما اینکار فقط طرف نمایش تاریخ را تقریبا درست می کند ولی ورود تاریخ همچنان میلادی است. ضمنا نمایش تاریخ گانت و تقویم هنوز میلادی است!

#9 Updated by Ebrahim Mohammadi over 3 years ago

Actually I've started providing a Persian localization of Redmine as both SaaS (hosted) and on-premises solution named Peygir. It support Persian calendar almost everywhere, including Gantt and calendar views and date input fields.

It also features a usable Persian translation, despite the official translation provided by Redmine. I guess you've seen the discussion at #7418! ;-)

I'm very excited to have your feedback. I can setup a trial service for you for free if you'd like to try it. Just contact me. :)

Update: All changes are done as plugins, hence no GPL violation. Hereby I'd like to appreciate great work of Redmine developers, specially JPL. Thanks! :)

#10 Updated by shakib a over 3 years ago

Ebrahim Mohammadi wrote:

Actually I've started providing a Persian localization of Redmine as both SaaS (hosted) and on-premises solution named Peygir. It support Persian calendar almost everywhere, including Gantt and calendar views and date input fields.

It also features a usable Persian translation, despite the official translation provided by Redmine. I guess you've seen the discussion at #7418! ;-)

I'm very excited to have your feedback. I can setup a trial service for you for free if you'd like to try it. Just contact me. :)

Update: All changes are done as plugins, hence no GPL violation. Hereby I'd like to appreciate great work of Redmine developers, specially JPL. Thanks! :)

سلام
من هم بسیار خوشحال می شوم با شما و سایر دوستان در این زمینه فعالیت کنم.
متن "پیگیر" را دیدم. بنظر ایده و کار خیلی خوبی است. اما نمی دانم که تا چه حد می توان روی بازگشت سرمایه و فروش آن حساب کرد. آیا شما برآوردی دارید یا نه. اما آنچه ظاهرا عیان است این است که در ایران برنامه نویس متن باز واقعی بسیار کم داریم و یا افراد با فرهنگ برنامه نویسی متن باز بسیار بیگانه هستند. همچنین فرهنگ مدیریت پروژه استاندارد برای پروژه های نرم افزاری بسیار ضعیف است.
لذا این حقیر معتقدم باید بنحوی در جهت رشد این فرهنگ و تشویق برنامه نویسان ایرانی به سوی حرکتی بسیجی در زمینه تولید نرم افزار تلاش نمود. حتی این ایده که یک سایت مشابه سایت HostedRedmine.com ولی با سرور های داخلی ایجاد کنیم به ذهنم رسیده و در این جهت بسیار علاقه مندم با افراد مستعد و توانمندی چون شما همکاری نمایم. مشتاقانه منتظر نظر شما هستم.

#11 Updated by hojjat nikan over 2 years ago

سلام
دوستان همچنان هیچ چیزی جهت فارسی کردن تاریخ پیدا نشده که ما هم بتوانیم استفاده کنیم
من تیکه کد بالارو تست کردم جواب نداد؟
لطفا راهنمایی بفرماید
با تشکر

#12 Updated by Jean-Philippe Lang over 2 years ago

Please, post in english.

#13 Updated by hojjat nikan over 2 years ago

hi
i need persian calendar for redmine , i tested above code but not worked .

please guide me

best regards

#14 Updated by Toshi MARUYAMA over 1 year ago

#15 Updated by Arash Shams over 1 year ago

since https://github.com/ImenDabaParsian/fullcalendar is fully support jalali day,week,month and ... can anyone replace it with current calendar ?

#16 Updated by shakib a over 1 year ago

سلام
من مشکل را حل کرده ام اگه خواستید با من از طریق ایمیل تماس بگیرید

#17 Updated by a m 11 months ago

shakib a wrote:

سلام
من مشکل را حل کرده ام اگه خواستید با من از طریق ایمیل تماس بگیرید

hi, how can I contact you by email?

#18 Updated by shakib a 8 months ago

a m wrote:

shakib a wrote:

سلام
من مشکل را حل کرده ام اگه خواستید با من از طریق ایمیل تماس بگیرید

hi, how can I contact you by email?

yes:

#19 Updated by shakib a 3 months ago

shakib a wrote:

a m wrote:

shakib a wrote:

سلام
من مشکل را حل کرده ام اگه خواستید با من از طریق ایمیل تماس بگیرید

hi, how can I contact you by email?

yes:

I have created a full ready redmine with persian calendar and many working plugins for farsi language as a vmware machine. Anyone can contact me. email:
(I am so busy and have little time to customize or deliver, so priority is for rich mans!)

Also available in: Atom PDF