First proof of concept, fixing the original bug for Russian.
Added gramps/gen/datehandler/_datestrings.py, to hold
all the localized strings, with genitive/nominative
context as appropriate.
Remaining TODO:
1) other languages
2) expand the localized string into RE-style
concat via |, so that displayer uses the 1st instance,
and the parser uses the whole RE. Write the corresponding _().
3) same with short names as with long names
4) harmonize with _grampslocale code reading the names from
elsewhere for Julian/Gregorian months
5) expand to other calendars (non-Julian/non-Gregorian)
6) obsolete the public attributes in dd and replace with accessors
svn: r23173
French SDN conversion functions now accept an optional boolean
parameter that allows to block dates outside the republican period.
By default, calendar conversions are allowed.
Revert test blocked by r23139, it now passes!
svn: r23167
Unfortunately, no package on ubuntu for sdn...
Bug fixed on trunk, when sdn is present on the system.
Verified that sdn roundtrip works.
date_test now fails on 1789-13-4(French) recognized as invalid,
as it probably should -- I guess this one is a test bug.
svn: r23127
refactor _zero_adjust_ymd out of 3 cut-and-paste cases
the bug with the code inside it remains -- the negative years
should not be clamped to positive ones!!!!
svn: r23122
Now it does, but another test breaks:
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/loader.py", line 252, in _find_tests
module = self._get_module_from_name(name)
File "/usr/lib/python2.7/unittest/loader.py", line 230, in _get_module_from_name
__import__(name)
File "/home/vassilii/Gramps/gramps/gen/lib/test/date_test.py", line 136, in <module>
d.set(quality,modifier,calendar,(4,11,-90,False),"Text comment")
File "/home/vassilii/Gramps/gramps/gen/lib/date.py", line 1600, in set
format(original, value))
DateError: Invalid year -90 passed in value (4, 11, -90, False)
because the corresponding year gets adjusted from -90 to 1...
svn: r23121
This reverts commit db9a64ef7da5f26c586452c1a84a96675991d9a4.
This was tested with "runtest.sh" only, but turns out things
are broken under GUI. I'll investigate on a private branch,
reverting meanwhile to unblock the affected plugins on trunk.
svn: r23099
Now that #7061 is done, all the old code should no longer use
User.begin_.../step_.../end_progress directly any more, preferring
the context manager instead.
svn: r23096
change BatchTool to take user instead of uistate
BatchTool now uses user.prompt, properly prompting the user in CLI
scenario as well, unless "--yes" flag is given
svn: r23071