Roundup Tracker - Issues

Message5573

Author antmail
Recipients antmail, jerrykan, rouilj
Date 2016-06-03.17:25:03
Message-id <1438760858.20160603202458@inbox.ru>
In-reply-to <1461986175.84.0.799106815042.issue2550871@psf.upfronthosting.co.za>
Yes,  this  patches  hit  many  files  but  mostly to fix translation
handling.

There  are  single  behavior change: user can set date field value in native
format such as dd.mm.yyyy.
From  system  administrator/developer/translator  point  of  view also
there  is a single change:  regular expression to parse date value may
be localized in language-translation file.

To get it you need:
1) apply patch;

2) regenerate roundup.pot file
In 'locale' dir of roundup source:
find ../roundup/ -path "../roundup/scripts/" -prune -o -iname "*.py" > rs.files
xgettext -w 80 -o roundup.pot -f rs.files
rm rs.files

3) merge new roundup.pot with target language .po file
msgmerge -U --suffix=.bak target_language.po roundup.pot

4)    In  target  language  .po  file  find  the  msgid  and  add  the
translation:
#: ../roundup/i18n.py:90
msgid ""
"^\n"
"            ((?P<y>\\d\\d\\d\\d)([/-](?P<m>\\d\\d?)([/-](?P<d>\\d\\d?))?)? # "
"yyyy[-mm[-dd]]\n"
"            |(?P<a>\\d\\d?)[/-](?P<b>\\d\\d?))?              # or mm-dd\n"
"            (?P<n>\\.)?                                   # .\n"
"            (((?P<H>\\d?\\d):(?P<M>\\d\\d))?(:(?P<S>\\d\\d?(\\.\\d+)?))?)?  "
"# hh:mm:ss\n"
"            (?P<o>[\\d\\smywd\\-+]+)?                       # offset\n"
"        $"
msgstr ""
"^\\s*\n"
"(((?P<d>\\d\\d?)\\.)?((?P<m>\\d\\d?)\\.)(?P<y>\\d\\d\\d\\d) # [dd.]"
"[mm.]yyyy \n"
"|(?P<b>\\d\\d)\\.(?P<a>\\d\\d))?  #or d.m\n"
"(?P<n>\\.)? # may be . (now)\n"
"(\\s+((?P<H>\\d\\d?):(?P<M>\\d\\d))?(:(?P<S>\\d\\d?(\\.\\d+)?))?)? #hh:mm:"
"ss\n"
"(?P<o>[\\d\\smywd\\-+]+)?                       # offset\n"
"\\s*$"

!!! You can skip 2),3) and just add to target language .po file lines from 4) !!!

5) Compile target  language .po file:
msgfmt --statistics -o target_language.mo target_language.po

6) Place target_language.mo file in roundup tracker subdir 'locale'

7)  In config.ini of roundup tracker set 'language' to target_language
such as:
language = target_language.UTF8

8) restart roundup-tracker

Now you can input date as dd.mm.yyyy, mm.yyyy etc.

> John Rouillard added the comment:

> Anthony,

> Can you address the concerns Jerry brought up and

> redo the patch removing unneeded whitespace changes
> and merge the patch from issue2550887

> as well as provide some steps we can use to compare before and after
> behavior of the patch.

> -- rouilj

> ________________________________________________
> Roundup tracker <issues@roundup-tracker.org>
> <http://issues.roundup-tracker.org/issue2550871>
> ________________________________________________
History
Date User Action Args
2016-06-03 17:25:04antmailsetrecipients: + antmail, rouilj, jerrykan
2016-06-03 17:25:04antmaillinkissue2550871 messages
2016-06-03 17:25:03antmailcreate