Compare commits

..

1592 Commits

Author SHA1 Message Date
romjerome fe18eab251 8555: Database repair tool always modify all source objects 2016-11-26 12:54:08 +01:00
romjerome 4af6dd88c2 9003: Locality data in address was not imported 2015-10-27 09:50:28 +01:00
Ζήσης Παπαδόπουλος 1ec8a8f2c3 Update Greek translation 2015-10-05 15:19:43 +02:00
Stéphane Charette 97cc0e33b4 8213: event columns too narrow
Web_Basic-Cypress stylesheet improvements
2015-04-18 16:14:40 +02:00
Matt Keenan 39f06eb4b0 8468: GuiColorOption missing avail-changed event handler 2015-03-31 10:22:09 -07:00
Jérôme Rapinat 8374e87b4d 8103: sidebar gramplet does not fit well into Event and Citation views 2015-03-19 16:08:11 +01:00
Jérôme Rapinat bacc3ee5e8 8451: Fix crash on RelGraph report with unknown gender 2015-03-19 16:06:33 +01:00
Zdeněk Hataš 54ea8eb1b7 czech translation update 2015-03-13 17:32:07 +01:00
kulath aabf8bfe6c 0008401: NameError in GEDCOM importer 2015-03-12 14:10:35 +00:00
kulath 74aa6a3341 0008322: Event address is lost on import, i.e. disconnected from event.
On GEDCOM import, Places are only merged if the Place Title and the
whole of the main location are identical.
2015-03-12 12:33:14 +00:00
kulath 0cece69ee2 Make a zip backup if schema is to be upgraded see 8134: Error converting
python2 utf-8 strings to python3 str when loading data from database
2015-03-02 17:44:31 +00:00
kulath 962d3bc488 0007824: Regression: running gramps from crontab fails 2015-03-01 16:49:56 +00:00
kulath 79942b1d00 0008380: tag_map is not initialized 2015-02-28 20:49:22 +00:00
kulath b1457f24e6 8233: Fix bad handle in explanation note for unknown event 2015-02-27 18:23:02 +00:00
kulath 71d22c61aa 0008347: GEDCOM import of embedded notes attached to media does not work 2015-02-16 22:52:38 +00:00
Jérôme Rapinat b37438204f fix typos, thank you phcook 2015-02-16 20:04:37 +01:00
noirauds e5f437ef06 geography : bug 7615 : Filter panel on geography view displays improperly 2015-02-11 21:20:31 +01:00
kulath 65523e0442 0007014: Errors handling owner/submitter information in GEDCOM files.
Only import researcher from GEDCOM or XML if the family tree was
originally empty.
2015-02-02 18:57:05 +00:00
kulath ed921b1a53 0008283: GEDCOM export does not export media attached to citations. Fix
for gramps40
2015-01-08 17:52:15 +00:00
Jérôme Rapinat 4e7cfd759f New year... 2015-01-02 10:26:06 +01:00
kulath 8117190a52 Fix 0008234: Various problems with docgen.TextDoc.add_media_object part
(2) for gramps40 branch
2014-12-15 20:34:25 +00:00
kulath 620000e863 Fix 0008234: Various problems with docgen.TextDoc.add_media_object part
(1) for gramps40 branch
2014-12-14 17:57:44 +00:00
kulath 18308f9a32 8196: Spurious spaces in CLI List Family Trees, tab delimited output.
Print statements changed to assemble the whole line before output.
2014-11-24 18:14:46 +00:00
Nick Hall 80924b9db0 7604: Fix error setting gramplet tab label 2014-11-03 21:51:40 +00:00
John Ralls 8d391f17ad 8140: Gramps doesn't work under Turkish locale
(cherry picked from commit 4662cf1cf94c3502ca8490f213b34d3d094e2d38)
2014-10-27 11:25:02 -07:00
Jérôme Rapinat fbf3835ca0 8122: DB lock not checked when opening database from the recent opened trees 2014-10-24 09:48:13 +02:00
Craig J. Anderson 4873f5245b fix for https://gramps-project.org/bugs/view.php?id=6355
Craig A.
2014-10-23 20:53:05 -04:00
Jérôme Rapinat 1d487e9fb2 8103: sidebarfilter gramplet does not fit well into People, Events, Citations or Media views (non-english locales) 2014-10-15 21:56:07 +02:00
leonhaeuser 12ebb0d6df update German translation 2014-10-13 22:05:39 +02:00
Luigi Toscano 477a0aa0a4 Italian translation updates and fixes 2014-09-28 02:01:37 +02:00
Zdeněk Hataš 4e634b4bec 8064: translation fixes 2014-09-18 12:38:06 +02:00
Zdeněk Hataš cf54b5eca7 czech translation update 2014-09-14 20:18:10 +02:00
Jérôme Rapinat 3f9b47c48e update template and french translation 2014-09-11 17:58:45 +02:00
Jérôme Rapinat 2119126685 6934: better GUI support for embeded custom attributes list on media object (backport) 2014-09-11 17:43:50 +02:00
Petr Hejl b6f77eb4e3 8051: Can't fill in calculated and estimated dates in cs locale 2014-09-11 17:28:59 +02:00
John Ralls 5b0efea92b Update OsmGpsMap to version 1.0.2
Addresses problem with retrieving tiles from OpenStreetMap.
Note as well https://gramps-project.org/bugs/view.php?id=8037
2014-09-09 16:57:33 -07:00
Paul Franklin 85f0f344ee 8014: Importing gedcom files containing multibyte UTF-8 characters fails 2014-09-01 19:05:18 -07:00
Paul Franklin b899935d54 python3 bytes-string mismatch with ICU installed 2014-08-22 18:16:40 -07:00
Paul Franklin c640067ebe tweak to "default" CSS choice for the narrated web report 2014-08-20 07:54:41 -07:00
Paul Franklin 17bca4c260 enable the "default" CSS choice for the narrated web report
Otherwise, whenever you start the report, you get this:

WARNING: _enumeratedlist.py: line 124: Value 'default' not found for option 'StyleSheet'
2014-08-17 12:47:20 -07:00
Malcom Lewis e7b5b9f213 Update FSF address to current location. 2014-08-08 19:51:28 -07:00
Jérôme Rapinat 0fb4f949a7 7258 7618: let the win() stuff to windows, fix url handling under linux and mac (not tested under mac) 2014-07-17 14:59:54 +02:00
Jérôme Rapinat 3dcdddf039 07837: Incorrect media path when using drag & drop; backport from gramps41; incomplete for non-ascii path or filename 2014-07-17 14:41:44 +02:00
Jérôme Rapinat 85fd4a8502 07837: Incorrect media path when using drag & drop; backport from gramps41; incomplete for non-ascii path or filename 2014-07-15 21:41:17 +02:00
Jérôme Rapinat 9046ea8de5 7618: Cannot drag and drop external media object with a non-ascii filename or path; missing conv_to_unicode (typo) 2014-07-15 20:40:18 +02:00
Paul Franklin 9a4bfe190e 7861: In Ahnentafel Report, Use Christening Date if no Birth Date 2014-07-11 15:38:34 -07:00
Ondrej Krc-Jediny 1a7c827aa9 7869: Various small issues in gramps.pot 2014-07-10 12:46:42 -07:00
Paul Franklin 21c00435ad 7739: [Narweb:] Missing webpage for media [under some circumstances] 2014-07-10 09:24:53 -07:00
Paul Franklin d7fac4e750 include Gramps.py in the tarball 2014-07-10 09:05:00 -07:00
Paul Franklin aa5297b476 7839: Place report does not run 2014-06-28 13:02:54 -07:00
John Ralls 23df099e41 7851: translations don't show in many labels
Ensure python text domain gets the right encoding.

(cherry picked from commit 65dbb1bd46)
2014-06-23 20:17:46 -07:00
Mirko Leonhaeuser 680301de90 Fixed 0006655 and 00078 2014-06-22 17:57:22 +02:00
Paul Franklin 99429b36c7 add translated-output option to B.R. TOC and Index reports 2014-06-14 13:37:29 -07:00
Paul Franklin 037ac5652d Fix alphabetic index and toc bug in books
Another bad indent from master commit [796240] (and gramps40 [3196f8])
2014-06-13 09:23:18 -07:00
Nick Hall 3880914e96 7471: Fix python3 sort key errors
Ensure input to strxfrm is correct type.
Apply patch by Marc Hulsman.
2014-06-12 23:28:58 +01:00
Mirko Leonhaeuser c8df231cd7 update German translation 2014-06-12 20:02:46 +02:00
Nick Hall 13a005da79 Fix alphabetic index and toc bug in books
Bad indent introduced in commit [796240].
2014-06-11 22:41:19 +01:00
Paul Franklin e7772a2c6b 7398: Gedcom import deletes first char of notes 2014-06-11 10:05:47 -07:00
Zdeněk Hataš 6dc44c3554 czech translation update 2014-06-11 08:44:49 +02:00
lklundin b9958fe62b 7794: Typo in error message 2014-06-10 11:57:13 +02:00
Paul Franklin 5454e8c19b improve plugin warning 2014-06-08 13:02:21 -07:00
Paul Franklin ce8aa53270 7678 typo 2014-06-08 12:58:46 -07:00
Jérôme Rapinat 5cfa4a015f 7678: some gir modules were not called 2014-06-07 13:26:08 +02:00
Jérôme Rapinat 6982d37427 7678: some fixes around gettext and messages handling 2014-06-07 13:06:00 +02:00
Paul Franklin fa338e85a4 7784 "IndexError: list index out of range" on [initial CLI "gramps -t"] 2014-06-05 08:01:57 -07:00
Jérôme Rapinat 6bf8a734cf 7678: typo, missing self argument on fallback for personpos_at_angle() 2014-06-04 12:13:27 +02:00
Jérôme Rapinat c8ab33fa27 7678: typo, set_border_width was set twice on CLIVbox() 2014-06-03 21:18:32 +02:00
Nick Hall 786a8f86f3 Prevent removing idle process after it has finished 2014-06-03 14:51:19 +01:00
Jérôme Rapinat 620dca433f 7766: Fan Chart views crash with self.maxperiod = self.minperiod 2014-06-03 10:34:38 +02:00
Nick Hall 02b017c402 7711: Fix tree views in python3 2014-06-02 19:48:02 +01:00
Ondrej Krc d81071a00e Git Merge Request #10: Update Slovak date handler 2014-05-30 10:15:58 +02:00
Omar Kohl 0e91e4f51d Git Merge Request #9: Spanish typo 2014-05-29 15:52:36 +02:00
Zdeněk Hataš f58fa79801 typo 2014-05-28 21:32:34 +02:00
Nick Hall f104408968 7712: Cherry-pick [321821] and [2dd0c9] from master. 2014-05-27 15:25:30 +01:00
Luigi Toscano 442663f53a Italian translation updates (4.0.x) 2014-05-27 01:45:38 +02:00
noirauds 340aabe210 BUG #0007744 : years are displayed as floating numbers 2014-05-25 11:17:35 +02:00
Nick Hall a02f76c97f Fix for python3 2014-05-24 22:22:05 +01:00
Zdeněk Hataš 004c2044c7 czech translation update 2014-05-24 23:11:58 +02:00
John Ralls 61f2de9667 Patch PIL to build with Freetype2 2014-05-23 12:11:18 -07:00
Ondrej Krc 4751c32e02 Merge Request #8: Typo fix in slovak translation 2014-05-23 14:55:38 +01:00
John Ralls 7a415c06de 7736: MacOSX Version 4.0.4-1 missing libgtkspell3 from bundle. 2014-05-22 20:23:23 -07:00
John Ralls a166d4802d Update mac build info for 4.0.4 release. 2014-05-22 11:20:51 -07:00
Jérôme Rapinat 281e06ef26 they are all fix on spacing into dialogs, remove extra lines from NEWS 2014-05-22 14:42:51 +02:00
Jérôme Rapinat 07372cf3be bump to '4.0.5' 2014-05-22 10:17:59 +02:00
Jérôme Rapinat 2506d06100 make official '4.0.4' release 2014-05-22 10:15:18 +02:00
Jérôme Rapinat 74a30ffc21 update for 4.0.4 release 2014-05-22 10:12:21 +02:00
noirauds 56efd58004 Geography: Bug #007722 : segfault in cairo.SurfaceImage.create_from_png 2014-05-20 21:34:15 +02:00
Nick Hall 928e32d030 7152: Fix error when importing database from the CLI 2014-05-20 13:27:13 +01:00
Espen Berg a2a988b62a Some more revised Norwegian Bokmål 2014-05-17 21:26:20 +02:00
Espen Berg bfaeb73d57 Some revised Norwegian bokmål translation 2014-05-17 20:35:38 +02:00
Jérôme Rapinat 806cfa696b 7706: typo, 'val' not defined on gui.viewmanager 2014-05-17 15:36:01 +02:00
Jérôme Rapinat 4bfbb4e7ca 7648: [Unit test] database dir and environment; https://gramps-project.org/bugs/view.php?id=7648#c36301 ; works on jralls' config, not yet on mine 2014-05-17 15:19:31 +02:00
Nick Hall 3e514a9798 7710: Fix crash in fan chart view when scrolling 2014-05-17 01:16:50 +01:00
Nick Hall a2dcbebd35 Fix list size in check tool 2014-05-16 23:01:49 +01:00
Nick Hall 16ed48e46d Fix resizing of widgets in dialogs
Conflicts:
	gramps/gui/glade/tipofday.glade
2014-05-16 22:14:27 +01:00
Jérôme Rapinat 969efacc33 7705: 'uni_to_gui' not called on gui.viewmanager 2014-05-16 16:29:35 +02:00
Bob Igo aka human-being 11eed32fef 7699: update and run again tools.sh; it outputs two DB files for human inspection 2014-05-16 11:49:01 +02:00
Paul Franklin c9f80fcd7b typo (unused import) 2014-05-14 11:55:42 -07:00
Paul Franklin 5aa3a419ea 5690: Can create multiple events with same Gramps-ID 2014-05-13 14:17:15 -07:00
Jérôme Rapinat 69ff7d3e26 7657: 7648: SyntaxError with python3 on 'gramps.cli.test.cli_test' 2014-05-13 18:26:20 +02:00
Jérôme Rapinat ceb58e9b88 7659: SyntaxError with python3 on 'gramps.gen.db.test.grampsdbtestbase' 2014-05-13 18:04:39 +02:00
John Ralls b198082790 7519: "Family Tree Directory Path" with accented characters
Take 2.

(cherry picked from commit b39902eab6e927a90fbce9a721d95b35f28065bd)
2014-05-12 07:30:52 -07:00
John Ralls 8b0b29c9c2 7666: ANSEL GEDCOM import messes up foreign characters
Make the ansel code strings bytestrings.
2014-05-12 07:30:01 -07:00
Paul Franklin cb1b04ac3c 5690: Can create multiple events with same Gramps-ID 2014-05-11 10:34:45 -07:00
Jérôme Rapinat 788ff005cb 7570: descendants browser doesn't expand under Ubuntu 14.04 2014-05-11 15:51:42 +02:00
donfano 405d2bbec5 7685: Correction of the LDS ordinance names in French 2014-05-11 10:32:32 +02:00
Pitxyoki aa9d6adfd2 7671: Typo on Portuguese translation for 'third grandson/daughter' 2014-05-09 12:18:46 +02:00
erikdrgm f747441024 Update Dutch translation 2014-05-08 22:18:13 +02:00
Jérôme Rapinat 5230f89a5a typo for calling conv_to_unicode on libdjango; thank you pylint 2014-05-08 17:30:53 +02:00
Human 0910e60235 7258 7665: NameError: global name 'conv_to_unicode' is not defined 2014-05-08 16:03:12 +02:00
Jérôme Rapinat b03ce38514 7649: [Unit test] gramps type, encoding and to_struct(); specific to python2 2014-05-07 20:43:54 +02:00
Jérôme Rapinat e4f7982479 7663: readonly/readwrite and 'create_id' method into 'gen/db/test/db_test.py', no more 'create_id' in the DB code 2014-05-04 17:44:00 +02:00
Jérôme Rapinat 3b03884811 update NEWS, ready for release 2014-05-04 17:00:33 +02:00
Jérôme Rapinat 455a59615b update template; consistency on translation strings 2014-05-04 16:09:47 +02:00
Paul Franklin 753eec3960 7582: Cannot remove a primary object having a new created backreference
This removes the create_id method from gen/db/write.py, since
after a recent "from __future__ import unicode_literals" (there)
it started producing unicode.  Instead the create_id method in
gen/utils/id.py is used, as its code is essentially identical,
in use in many other places -- and does not produce unicode.
2014-05-03 15:15:52 -07:00
Paul Franklin 5180925a46 use a standard string, not a unique string 2014-05-03 15:15:52 -07:00
verthezp d5d0430ab6 7662: Missing closing bracket in Web_Basic-Spruce.css 2014-05-03 17:32:51 +02:00
Jérôme Rapinat af445f1635 7648 7258: typo, io module called twice 2014-05-01 18:20:54 +02:00
Jérôme Rapinat 89907dced1 7628: Relationship calculator not displaying data 2014-04-30 20:08:51 +02:00
John Ralls 0b1a944eb9 7646: [Unit test] typo on 'gramps.gen.utils.file.py'
Replace the call with ensuring that dirname is unicode; since
TMP_DIR is guaranteed to be, os.path.join() willl return a unicode so
further conversion is unnecessary.

(cherry picked from commit 4327f6952b)
2014-04-30 07:38:28 -07:00
Jérôme Rapinat e1e18cb6f7 Revert "7638: Better support for locales falling back into U.S. English at startup"
This reverts commit 021426fc8d.
2014-04-30 09:55:54 +02:00
Jérôme Rapinat 021426fc8d 7638: Better support for locales falling back into U.S. English at startup 2014-04-30 09:53:36 +02:00
Josip 39d1ecc030 7628: Relationship calculator not displaying data 2014-04-29 16:52:27 +02:00
Jérôme Rapinat 473c613654 update template and french translation 2014-04-29 11:01:32 +02:00
Jérôme Rapinat bfa2e78131 7630: Unable to edit citations on association 2014-04-26 09:03:41 +02:00
Paul Franklin e95fc02804 fix deferred translation of dates and places, add name-format option 2014-04-25 07:55:48 -07:00
Paul Franklin 1b028fbc4a 7258 typos 2014-04-24 08:37:31 -07:00
Paul Franklin 0b4a0576a3 translate Arabic semicolon 2014-04-24 08:03:54 -07:00
Jérôme Rapinat 8e5224708c 7258: incomplete commit; https://gramps-project.org/bugs/view.php?id=7258#c35856 2014-04-24 11:37:34 +02:00
Mirko Leonhaeuser b4de594aab update German translation 2014-04-23 18:27:39 +02:00
John Ralls 72a5a00642 Make recentfiles.do_save exception safe. 2014-04-21 14:14:17 -07:00
John Ralls 50f0936914 Fix None type exception when there's no localedir. 2014-04-21 14:09:53 -07:00
Paul Franklin 8a98d800f4 7620: 'Display as' field in Name Editor reverts to Preferences default ... 2014-04-21 13:52:53 -07:00
John Ralls d5f918040c Fix indentation errors
Thanks to Paul Franklin for noticing.
2014-04-20 19:51:48 -07:00
John Ralls a4779e8c50 Remove gramps.gen.utils.file.fix_encoding()
Yet another overly complicated way to spell conv_to_unicode().
Note that unicode() and str.decode() are alternate spellings of the same function in Py2, and unicode();
note as well that this was used on strings coming from the GUI or the database, not the shell, so that
using glocale.encoding was also incorrect.
(cherry picked from commit f0ffd6e9b9)
2014-04-20 17:18:29 -07:00
John Ralls 236a031b14 Remove get_unicode_path_from_env_var(), get_unicode_path_from_file_chooser()
Two very cumbersome ways of saying conv_to_unicode().
(cherry picked from commit 55610b6f0a)
2014-04-20 17:15:11 -07:00
John Ralls 72c5c82f7d 7258: Replace os.getcwd() with gramps.gen.constfunc.get_curr_dir()
Py2 on Win32 returns a str from os.getcwd(), which doesn't work with unicode in the path.
New function get_curr_dir() uses the Windows GetCurrentDirectoryW to return a Unicode.
(cherry picked from commit ecfad157a8)
2014-04-20 17:12:50 -07:00
John Ralls 0a61b8b4bd GrampsLocale: Don't try to set self.localedir to _first.localedir if the latter path doesn't exist.
(cherry picked from commit 10921cee29)
2014-04-20 17:12:49 -07:00
John Ralls 02e43f971f 7258: Remove all instances of sys.getfilesystemencoding()
This function reliably returns a useful value only on MacOS X. On Linux it's incorrectly determined by the
locale's encoding and on Windows it always returns 'mbcs' which is correct only on FAT file systems.
(cherry picked from commit c1dcd6f59e)
2014-04-20 17:12:30 -07:00
John Ralls 583acbd438 7258: Ensure that resource paths are set correctly when they include Unicode characters.
(cherry picked from commit efa3741579)
2014-04-20 17:10:21 -07:00
Paul Franklin 425f09fd69 flag some semicolons, for translation in Arabic 2014-04-20 16:33:36 -07:00
John Ralls aaa1256762 7258: A consequence of forcing paths to unicode is that we sometimes need to explicitly decode a path to utf8 to pass to Gtk
Only in Py2, of course, since the Py3 version of PyGObject knows what to do.
2014-04-20 08:12:19 -07:00
John Ralls 7f1a57a2cd 7258: Metadata viewer: Exiv2 can't handle Windows's UTF16 pathnames
So open the file and pass the handle.
	gramps/plugins/lib/libmetadata.py
2014-04-20 08:12:18 -07:00
John Ralls 5387cd23cf 7258: MediaEditor: Ensure that pathnames are always Unicode. 2014-04-20 08:12:17 -07:00
John Ralls 3196f8c44f 7258: Work around PyCairo path issue by opening the target file first.
PyCairo, even the latest version, insists on using the 'mbcs' codec on path names on Windows.
That destroys pathnames with characters that aren't in the current default code-page.
2014-04-20 08:12:17 -07:00
Paul Franklin 4265fc1571 translate one more Arabic string 2014-04-20 07:57:41 -07:00
John Ralls 12c95e325f Correct lambda syntax for py3
Thanks to Paul Franklin for reporting it.

(cherry picked from commit fa2be88b68)
2014-04-17 14:30:21 -07:00
Jérôme Rapinat 24016274b6 revert previous template generation 2014-04-17 16:37:06 +02:00
Jérôme Rapinat a9cc79d9fd sort translations output by file location for easier diff 2014-04-17 16:34:20 +02:00
Mirko Leonhaeuser 9e3d055a9a update German translation 2014-04-16 21:10:26 +02:00
Nick Hall dcf4f9e641 Prevent MapList action warning 2014-04-16 13:48:20 +01:00
John Ralls 8fd8d8b3e9 7258: Fix a path encoding issue when upgrading the database.
(cherry picked from commit 40cc0e9091bf4c2e1e215a31658c80216c396633)
2014-04-15 15:33:59 -07:00
John Ralls 117fbe2810 Bug 7258: Work around bug in Py2Cairo 1.8.10 and earlier on Linux 2014-04-15 11:46:42 -07:00
Jérôme Rapinat a44740a2ee spacing on french translation 2014-04-14 20:03:19 +02:00
Nick Hall 814bec98c8 Fix unicode error when saving filters 2014-04-13 14:07:42 +01:00
Jérôme Rapinat 98834658b3 support comments 2014-04-12 17:50:53 +02:00
Josip e04fb106de fix size of 'Potential Merges' dialog
(cherry picked from commit 63f0dc3447)
2014-04-11 21:02:50 +02:00
Jérôme Rapinat 26230df0c8 start to update NEWS 2014-04-11 10:48:20 +02:00
Nick Hall dd1a3f5e15 Fix family editor callback 2014-04-10 18:15:18 +01:00
Nick Hall d387bfbe77 7119: Register history objects at startup 2014-04-10 17:12:21 +01:00
Zdeněk Hataš f4c871bdaf czech translation update 2014-04-10 10:21:30 +02:00
Josip 87ae25f77c ease founding of perl in windows 2014-04-10 08:29:15 +02:00
Paul Franklin 1bb5ac82da Revert "7276: translate some punctuation marks -- partial"
This reverts commit 00c26a722e.
2014-04-09 18:52:54 -07:00
Paul Franklin 00c26a722e 7276: translate some punctuation marks -- partial 2014-04-09 18:40:17 -07:00
Josip 016b779316 backport [7fdf0f] and [6836db] from master 2014-04-09 23:43:09 +02:00
Paul Franklin 659433dd82 make gramps XML the initial default export type 2014-04-08 19:24:56 -07:00
John Ralls 137e18c41a 7258: Avoid dumb encoding error when compiling gpr files 2014-04-07 12:45:17 -07:00
John Ralls ee923e3205 7588: Can not start [in Chinese on OSX]
Force UTF-8 locale on Mac
2014-04-07 11:51:54 -07:00
Mirko Leonhaeuser 1f9d479074 update German translation 2014-04-07 18:39:03 +02:00
Josip b93fb16101 7258: transcode os.path.join args from the fs enc to prevent a crash
:35653 rename family tree with python2
:35653 self.reference_map.delete
2014-04-07 00:11:44 +02:00
John Ralls d48edcdcf7 Streamline conv_to_unicode
Also handle "None" strings and change default encoding to 'utf8' so that
it works without args when converting from UI input.
2014-04-06 13:36:24 -07:00
John Ralls 3f4596ae4c Convert the database title retrieved from the GUI to a unicode. 2014-04-06 13:33:31 -07:00
John Ralls 137afef3ab Fix up some failing tests 2014-04-06 13:33:31 -07:00
John Ralls 3b8d2bbeea Delete a bunch of superflous re-encodings of path names 2014-04-06 13:33:31 -07:00
Josip d702129296 7582: [Python2] Cannot remove a person having an event reference 2014-04-06 18:26:42 +02:00
Josip a07f411548 Change use of GetEnvironmentVariableW (#7582) 2014-04-06 00:14:33 +02:00
Nick Hall 4e166d4ccd 7584: Fix update of active object after merge 2014-04-05 17:54:38 +01:00
John Ralls 4164920d67 Fix bad open flag 2014-04-04 19:44:55 -07:00
Josip e10da882fb 6548: 'Available Gramps Updates for Addons' window not on top 2014-04-05 03:02:11 +02:00
Josip 238cf389b0 fix recentfile.py to work for both py2/py3 2014-04-05 01:32:24 +02:00
Josip f607cc98ae open ==> io.open 2014-04-04 21:54:43 +02:00
Josip b240c31631 7258: transcode os.path.join args from the fs enc to prevent a crash 2014-04-04 21:49:28 +02:00
Nick Hall 0218adae42 1772: Select row on right click in embedded lists 2014-04-04 19:39:46 +01:00
Nick Hall d085f886b4 7455: Remove hover selection from embedded lists 2014-04-04 19:39:46 +01:00
Jérôme Rapinat 5cb1a82312 Update template (~4 modified/new strings) and the french translation 2014-04-04 12:43:32 +02:00
John Ralls fd0181f4e5 Correctly encode the contents of the lock file. 2014-04-03 15:50:50 -07:00
John Ralls 328bb21cee Win32: Fix crash in gramps -L when the database path includes a non-ascii character. 2014-04-03 15:50:50 -07:00
John Ralls 89fe90a1a3 Fix some errors and Py3 deprecations in cli_test.py 2014-04-03 15:10:24 -07:00
John Ralls bb8d29dea9 Test for ability to open a DB in an arbitrary Unicode path with a Unicode name.
And fix a couple of bugs that made the test fail.
2014-04-03 15:10:24 -07:00
Nick Hall 80f9a3a5c8 More informative messages in citation editor 2014-04-03 18:41:37 +01:00
Nick Hall eec38c7c73 Fix drag & drop in citation editor 2014-04-03 17:31:25 +01:00
Paul Franklin 5ae0700e4b make the export assistant slightly wider 2014-04-03 09:16:00 -07:00
Jérôme Rapinat a741108b53 typo on french translation 2014-04-02 19:03:59 +02:00
Jérôme Rapinat b39daf09b1 7572: Do not hide categorysidebar from Plugins Manager, do not try to restore hidden gramplets, typo on grampletbar (LOG.warning) 2014-04-01 12:00:10 +02:00
Jérôme Rapinat 71ac10ef4d typo: NameError: global name 'gen' is not defined 2014-04-01 11:10:35 +02:00
Jérôme Rapinat 3b23ab4602 7559: add LOG.info for displaying recursive handles for BaseObject 2014-04-01 10:32:17 +02:00
Nick Hall 9a941503e4 7137: Fix updating of events gramplets 2014-03-29 23:55:07 +00:00
Nick Hall e0f673f937 7559: Fix bug in abandon changes and quit 2014-03-29 19:56:37 +00:00
John Ralls 3f9299a9d1 Use gramps.gen.const.HOME_DIR instead of os.environ['HOME']
$HOME doesn't exist on Windows, so os.environ['HOME'] gives the wrong answer.
(cherry picked from commit 53c878aa08)
2014-03-27 11:38:26 -07:00
John Ralls 15d1d0e6d0 7258: Replace some os.environ['foo'] lookups missed earlier.
(cherry picked from commit 71650917bf)
2014-03-27 11:37:32 -07:00
John Ralls 50f514ce51 7258: Transcode FS paths to avoid a crash
The problem is really that the paths get munged into strings in the
system codepage, losing or misinterpreting most Unicode. Python's os
module is smart enough to encode the unicode to the file system
encoding, but the bsddb module needs a little help.

Provide a new function, constfunc.get_env_var(name, default=None) to
cleanly import Unicode environment variables in Windows and use it in
place of all instances of foo = os.environ['BAR] or foo =
os.environ.get('BAR').

Os path functions are smart enough to convert unicode to the file system
encoding on their own, but Db functions aren't, so provide an _encode
function in gen.db.write.py and apply it where a path is being passed to
DBEnv.open().

Also convert paths from the UI to unicode from 'utf8' rather than
sysfilesystemencoding. The latter happens to be correct most of the time
on Linux and OSX but is wrong on Windows.
2014-03-25 15:45:41 -07:00
Jérôme Rapinat 825fac0c55 7559: more accurate word for 'Undo' on french translation 2014-03-25 12:01:19 +01:00
Jérôme Rapinat d36fdb3777 6403: minor difference around bold markup between master and gramps40 branch after merging 2014-03-25 09:40:35 +01:00
Jérôme Rapinat f61dd9b250 typo on swedish translation 2014-03-25 08:51:59 +01:00
Igal Shapira b12d08cf83 Updated Hebrew translations - update to latest gramps.pot and some minor fixes 2014-03-25 08:43:21 +01:00
Jérôme Rapinat a7f6f33511 start to update NEWS 2014-03-24 16:30:44 +01:00
Helder f6dd3c349e 7544: update Brazilian Portuguese translation 2014-03-24 12:38:28 +01:00
Luigi Toscano 591bee560a update Italian translation 2014-03-24 11:16:23 +01:00
Peter Landgren 70af0666a2 update Swedish translation 2014-03-24 11:05:23 +01:00
Paul Franklin 0edd609b92 7476: Given Name Cloud Gramplet splits up given names into words 2014-03-23 18:43:01 -07:00
John Ralls a5a7126dc4 7332-Filename-Decoding-Error-in-Graphical-Reports
Don't encode the filename for output. Python does that for you.
2014-03-23 16:34:35 -07:00
Paul Franklin b059ccb359 add new gvfamilylines strings to some po files 2014-03-23 12:17:50 -07:00
Munzir Taha (منذر طه) 1bc7c6506e Update Arabic translation 2014-03-23 08:37:23 +01:00
Jérôme Rapinat bfff63d8f7 typos on french translation (spell check) 2014-03-21 18:41:11 +01:00
Pekka Valta cc40653b97 typo on Finnish translation 2014-03-21 17:19:25 +01:00
kdau ff5265605d 7501: Notes always say 'no data exists for note' when saving 2014-03-21 15:04:40 +01:00
Munzir Taha (منذر طه) 3812183a3e update Arabic translation, review plural forms 2014-03-21 12:21:15 +01:00
Pekka Valta 93b6206744 start to review plural form 2014-03-21 11:51:21 +01:00
Mirko Leonhaeuser 5c2d301619 update German translation 2014-03-20 20:02:20 +01:00
Zdeněk Hataš 3c39bd3a28 czech translation update 2014-03-20 16:38:27 +01:00
Pekka Valta a555e793e6 update Finnish translation 2014-03-19 20:35:57 +01:00
Vassilii Khachaturov 10bda16d21 RU translation update 2014-03-19 15:37:29 +02:00
Vassilii Khachaturov 7627464e58 7212: vcard: only convert non-empty BDAY to text
Discovered in #7530.
1) Previously, tests expected invalid BDAY with DD-MM-YYYY format
to be ignored. Now they are wrapped with datestr (see #7212),
and that is already covered by
 test_birthday_invalid_format_converted_to_datestr
Corrected test expectations by removing the obsolete test.
2) Test expects that an empty BDAY record won't create any
event objects. Modified import code accordingly -- we used
to create an event object without date, regression in #7212.
2014-03-19 13:34:18 +02:00
Munzir Taha ac9099434f 7539: NotRelated and Verify data dialogs appear either too small or too big 2014-03-19 09:05:16 +01:00
Jérôme Rapinat 29606b2b10 Update template and french translation, new string on gvfamilylines [37193c] 2014-03-19 08:58:49 +01:00
Paul Franklin 37193c86a0 fix translation of children count to use ngettext 2014-03-18 17:27:28 -07:00
Mirko Leonhaeuser 03c995f52f update German translation 2014-03-18 21:23:36 +01:00
Fedik 13311e0acc Update Ukrainian translation 2014-03-18 20:44:18 +02:00
Vassilii Khachaturov 25c26dcd97 7530: gen.test.constfunc_test broken in python3
Use the `in' operator rather than has_key() method to check for
environment variables in os.environ. Works on both python2 and python3.
2014-03-18 15:50:03 +02:00
John Ralls 61cdc0b54b 7519: GRAMPs unable to handle ... Path with accented characters
This replaces commit 3535f7a79f with
removing the incorrect encoding of paths with the system filesystem
encoding. Python is mostly smart enough to do that itself.

Thanks to Paul Franklin and Josip Pisoj for their help with sorting this
out.
2014-03-17 12:54:59 -07:00
John Ralls 25b4c22a30 7026: Eliminate localedir error message 2014-03-17 12:54:59 -07:00
John Ralls 1030239cce Remove some left-over diagnostic messages.
(cherry picked from commit 38aaa671cd)
2014-03-17 12:54:59 -07:00
Munzir Taha (منذر طه) 8917f7fae8 update Arabic translation 2014-03-17 19:00:37 +01:00
Jérôme Rapinat cf0e138246 7276: [e44be0] update template and french translation 2014-03-17 18:29:18 +01:00
Paul Franklin e44be07f62 7276: translate some punctuation marks -- partial 2014-03-17 08:00:18 -07:00
Jérôme Rapinat 644aab5db9 6369 Couldn't find a target for a mnemonic activation on confidence into Citation Editor 2014-03-16 11:04:14 +01:00
Jérôme Rapinat 513c328bbc 7342 5024: typo on change column into event selector 2014-03-15 21:46:32 +01:00
Jérôme Rapinat 421688464b typo on french translation 2014-03-15 21:32:32 +01:00
Jérôme Rapinat 3e6127ac17 [824195]: update translation template and french translation, new source selection and citation editor simplification, [3a56ed] 6854: spelling messages, [a8d78e] 7434: media viewer and missing path 2014-03-15 21:10:00 +01:00
Nick Hall d88eedbc27 7536: Fix bug introduced with new column order 2014-03-15 19:57:58 +00:00
Nick Hall e046804e39 Fix bug in event gramplet 2014-03-15 19:31:31 +00:00
Nick Hall 8241953765 Simplify citation editor and add source selection 2014-03-15 18:21:51 +00:00
Jérôme Rapinat efd8a5bef6 7510: do not drag and drop more than one data into editor tabs 2014-03-15 11:12:21 +01:00
Muhammad Bashir Al-Noimi 5d90ce5ce1 update Arabic translation with contributions by Munzir Taha 2014-03-13 20:17:08 +01:00
Jérôme Rapinat 5faa635e41 7530: typo on import geneweb unit test 2014-03-13 12:01:53 +01:00
Mirko Leonhaeuser 1d58cbdd10 update German translation 2014-03-11 21:05:10 +01:00
Espen Berg 11731e81d4 Some more update of Norwegian bokmål 2014-03-11 20:36:43 +01:00
John Ralls 3535f7a79f 7519: GRAMPs unable to handle ... Path with accented characters
Much worse, actually. Gramps wasn't able to handle any non-ascii
characters in any preference setting from Python2.

repr() in Py2 effectively runs "encode(val, ascii, backslashreplace)"
on its argument, and there's no way to reconstruct the string.

(cherry picked from commit 8cbb3ef014)
2014-03-08 17:56:35 -08:00
John Ralls 3a56ed8433 6854: Spelling messages at random cause hang for a few seconds.
Improve error message to conditionally explain that there is no
dictionary if that's in fact the case; otherwise log the actual
exception string.

(cherry picked from commit 2642fc5409)
2014-03-08 16:43:39 -08:00
John Ralls d8e2713912 6808: Poor contrast mouse on mouse over
Set the Gnome-standard 'Adwaita' theme, which doesn't have gray lines.

(cherry picked from commit 9c3a40f785)
2014-03-08 13:24:56 -08:00
Josip 84e164d8cc Merge branch 'maintenance/gramps40' of ssh://git.code.sf.net/p/gramps/source into gramps40 2014-03-08 21:37:50 +01:00
Josip a8d78e3edc 7434: Media viewer list crashes during start if one try to select an entry where the media isn't available 2014-03-08 21:34:36 +01:00
Josip 06e6a76e03 7435: Media Editor error if Path value was changed to a non existing file
fix media path
2014-03-08 21:29:41 +01:00
Espen Berg b87bdf7294 Some more update of Norwegian bokmål 2014-03-08 21:29:33 +01:00
Espen Berg dd206b0030 Merge branch 'maintenance/gramps40' of ssh://git.code.sf.net/p/gramps/source into gramps40 2014-03-08 21:24:53 +01:00
Espen Berg 94bb9c41b4 Some more update of Norwegian bokmål 2014-03-08 21:24:26 +01:00
Josip fe8d5bb9cd 7435: Media Editor error if Path value was changed to a non existing file 2014-03-08 17:32:19 +01:00
Jérôme Rapinat c4a7b4c064 4220: update samples; http://sourceforge.net/p/gramps/source/merge-requests/2/ 2014-03-08 16:44:15 +01:00
John Ralls b299ac2e6e Bug 6538: Collation variants do not work properly
If ICU is available, inspect the environment for $COLLATION and on
a Mac also check the AppleCollationOrder default. Pass the results
to a special ICU Locale used for sorting.

(cherry picked from commit 49cdfe3283)
2014-03-07 16:29:49 -08:00
John Ralls 9766d81bb8 Convert two common plugin errors from unhandled exceptions to warnings.
Missing translation for the current primary locale.
Import failure because of some missing dependency.

Note that these handlers can be overridded in the module itself; this is just a fallback.

(cherry picked from commit 80c58f46d3)
2014-03-07 16:29:49 -08:00
Espen Berg 05de040e82 Some more revision of Norwegian bokmål 2014-03-07 22:20:23 +01:00
John Ralls 1be36fdef9 Bug 6696: sort failure using key=glocale.sort_key
Correct the call with a lambda.
2014-03-07 12:39:58 -08:00
Jérôme Rapinat 31583b923f update template and french translation 2014-03-07 14:56:30 +01:00
John Ralls 76017ac269 Bug 7026: misleading diagnostics when locale resources aren't built
This problem is from setup.py test, so ensure that there's a 'build'
directory before running test.
2014-03-06 15:40:25 -08:00
Espen Berg 8578e39c12 Merge branch 'maintenance/gramps40' of ssh://git.code.sf.net/p/gramps/source into gramps40 2014-03-06 22:24:34 +01:00
Espen Berg f82edf8973 Some more update of Norwegian bokmål 2014-03-06 22:24:06 +01:00
John Ralls 89e394a690 Move the icu missing warning to after setting up the log handler.
(cherry picked from commit 6eb76c8af59ee15f618b44c0755bbdde4f72e222)
2014-03-06 11:25:15 -08:00
Espen Berg bd23fce194 Merge branch 'maintenance/gramps40' of ssh://git.code.sf.net/p/gramps/source into gramps40 2014-03-06 18:08:20 +01:00
Espen Berg 6b2e26b8de Some update of nb.po 2014-03-05 21:41:06 +01:00
kulath ec4c6c4cfc 6194: Database corrupted - TypeError: unhashable type: 'list'
A couple of minor changes missed off the previous commit (427ee2d)
2014-03-05 18:03:54 +00:00
Mirko Leonhaeuser 447046060f update German translation 2014-03-04 23:15:57 +01:00
Espen Berg afe59cfa99 Some update of nb.po 2014-03-04 19:52:06 +01:00
John Ralls a5179d2460 Bug 7377 - Ver 4.0.2 starts in East Asian Language
Because there is no en.po for Gramps, so the C gettext called from
GtkBuilder skips to the next translation in the list. Fix makes sure
that there is no next translation.
2014-03-04 09:56:14 -08:00
kulath 427ee2d0fd 6194: Database corrupted - TypeError: unhashable type: 'list'
Fixed upgrade to deal with sourceref in media references in Sources.
Also fixed Check and Repair to repair previously broken databases.
2014-03-04 17:39:16 +00:00
Paul Franklin f3d993be38 partly revert 7470: Upgrade to db version 17 fails in Python3 due to use of iteritems 2014-03-01 16:44:52 -08:00
Nick Hall 0618abf89c 7342: Update column order in editor event tabs 2014-02-28 17:09:04 +00:00
Nick Hall 24a8e72c2a 7342: Split details column in events gramplet 2014-02-28 15:58:06 +00:00
Nick Hall 522296fbc2 7342: Update default columns in event view
Add main participant.
Change order to be consistent with selector.
2014-02-28 15:48:07 +00:00
Nick Hall 1614ea952e 7342: Better column order in event selector 2014-02-28 15:45:20 +00:00
Nick Hall d54e57ee8d Add author column to source selector 2014-02-28 12:20:22 +00:00
John Ralls 97d1809ac7 Remove no longer needed icu repo 2014-02-26 22:02:28 -08:00
Paul Franklin dc810fc483 7276: translate some punctuation marks -- partial 2014-02-26 10:22:13 -08:00
John Ralls c503efa849 Move icu module to gtk-osx-unsupported.modules 2014-02-25 15:19:08 -08:00
Mirko Leonhaeuser e9ffd48787 update German translation 2014-02-25 22:42:49 +01:00
Vassilii Khachaturov 4182ac0c47 7097: EditNote hangs initially on misspelled note
Disable undo during the initial note text population,
so as to avoid bombardment with gtkspell-... tags for the
misspelled text.
2014-02-25 15:44:27 +02:00
TonyG a6d491df59 7498: List in Unused Objects dialog has limited space 2014-02-24 10:30:23 +01:00
John Ralls 37b589c7dc Bug 7377 Ver 4.0.2 starts in East Asian Language
Revert "GrampsLocale: Don't set  to 'C' if LANG is en_US"

This reverts commit bdd336f38e.

It turns out that Gtk's having an 'en' translation isn't the only reason
for doing this: GtkBuilder uses $LANGUAGE too, and will look for an english
translation of strings in our Glade files. Since there's no en.po or
en_US.po, it will go to the next language in the list and produce confusing
results.
2014-02-20 14:03:47 -08:00
John Ralls 62a19e4cd9 Better fix for bug 7122. 2014-02-20 14:03:47 -08:00
John Ralls 608aca8e65 Fix up grampslocale logging a bit.
Send log messages "up the chain", make maclocale a sub-log of grampslocale.
2014-02-20 14:03:47 -08:00
Jérôme Rapinat daa26b012b New strings for Geography (#7240) and Webkit 2014-02-20 16:13:54 +01:00
Paul Franklin 9b96baf643 don't warn, WebKit is not in Mac or Windows bundles 2014-02-19 19:16:33 -08:00
noirauds 16fecf125b Geography : Adding bookmarks (follow bug 7240) 2014-02-19 23:13:20 +01:00
Benny Malengier 32c312f7d9 remove stale part of install file 2014-02-19 22:02:42 +01:00
Jérôme Rapinat 62ab0dfdab 7484: Selection lists in Attribute Editor have limited space 2014-02-19 18:46:22 +01:00
Jérôme Rapinat 22ef7a0df3 566 7477: Translate 'New Style' and 'Default' on StyleEditor; update template for translation strings 2014-02-19 15:17:25 +01:00
Vassilii Khachaturov ee9151b117 7097: add UndoableStyledBuffer.undo_disabled
Refactoring away the coupling between Spell and StyleTextEditor
innards:

1) add a context manager UndoableStyledBuffer.undo_disabled
2) add a forwarding to it as StyleTextEditor.undo_disabled
3) use that in Spell.__real_set_active_spellcheck
2014-02-19 16:01:43 +02:00
Vassilii Khachaturov c81ff4bf63 7097: attaching spell checker isn't undoable
Quick-and-dirty fix removing the hang. Needs to be refactored
in order not to expose the knowledge of StyleTextEditor's
innards to Spell.
2014-02-19 16:01:36 +02:00
Vassilii Khachaturov ef10274f4e 7097: spell.py hangs on a note for tens of secods
shave off ~15s out of 40s of the hang
2014-02-19 16:01:29 +02:00
John Ralls 73c743593b Mark osmgpsmap for version 1.0.1, matching master 2014-02-18 16:47:51 -08:00
John Ralls 2866b80f24 Mark osmgpsmap for non-srcdir builds
It uses built headers, but Makefile isn't smart enough to find them in a non-srcdir build.
2014-02-18 16:46:12 -08:00
John Ralls d512f0a0d3 Bug 6784 GraphView fails to load.
Also 7168, 7169, and 7428.
Graphview won't load if libgoocanvas isn't in the bundle. D'oh.
2014-02-18 16:46:12 -08:00
Mirko Leonhaeuser 7371c8e49e fix bug 0007487 and update German translation 2014-02-18 22:02:11 +01:00
Vassilii Khachaturov e0507074ca 7117: disallow new year unless Julian or like cal
Unit test.
2014-02-18 21:17:44 +02:00
Vassilii Khachaturov 5feeb1e7f6 7117: disallow new year unless Julian or like cal
raise an exception from Date.set for a meaningless newyear parameter
Add Date.CALENDARS to reduce cut-and-paste here and with the unit test
2014-02-18 21:17:44 +02:00
noirauds e45c1158bb 0007488: After creating narrative web report, some temporary files remains in /tmp 2014-02-17 09:47:35 +01:00
Paul Franklin 88a5b002df 7477: Users should not be allowed to delete 'default' style in Style Editor 2014-02-16 12:04:29 -08:00
Paul Franklin dafdc220b7 translate some paper names, suggested in 0566 2014-02-16 12:03:55 -08:00
Paul Franklin 6f75211730 0566: Translate the "New Style" and "Default" on StyleEditor.py 2014-02-16 12:02:22 -08:00
Vassilii Khachaturov 856ba57b6e 7117: disallow new year unless Julian or like cal 2014-02-16 20:42:22 +02:00
Zdeněk Hataš 816bc10a64 czech translation update 2014-02-16 11:34:10 +01:00
Vassilii Khachaturov 1a2f079bf9 7469: ReorderIDs: global name 'gen' is not defined 2014-02-16 11:41:55 +02:00
John Ralls 893710aa3a Bug 7122 - Gramps does not start
Handle AppleCollationOrder returning an empty string
2014-02-14 17:22:05 -08:00
Éric Doutreleau e8c4adfa8c 7465: scroll window for patchname tool didn't expand 2014-02-14 16:09:06 +01:00
Marc Hulsman 08155ba962 7470: Upgrade to db version 17 fails in Python 3 due to use of iteritems 2014-02-13 18:19:48 -08:00
Paul Franklin 4fb98d5fbb encode every "style" file in utf-8 2014-02-09 13:34:49 -08:00
noirauds f024b37501 bug 7447: HTML View fails to load on Debian unstable. 2014-02-09 13:38:31 +01:00
noirauds d0cf197430 bug 7368 : os.environ['http_proxy'] gives an error if http_proxy is not set. 2014-02-09 10:56:09 +01:00
noirauds 32d2ef4b5e bug 7368 : Geography gramplet does not communicate over proxy server with autorisation. 2014-02-08 13:11:16 +01:00
Jérôme Rapinat cab29ca2b6 update Debian files 2014-02-06 15:13:39 +01:00
Tadas Masiulionis 63b38a2bab update Lithuanian translation 2014-02-06 15:05:55 +01:00
Jérôme Rapinat 2b689746a4 typos on french translation 2014-02-06 13:00:33 +01:00
Paul Franklin 8a3b884b8c 7439: pre-load alert dialogs crash w/o DISPLAY 2014-02-04 20:30:10 -08:00
Mirko Leonhaeuser f4dda4f44a update German translation 2014-02-04 22:12:12 +01:00
Jérôme Rapinat d9dc79770d tweak changes for building .deb package, test with git revision 2014-02-04 20:04:11 +01:00
Jérôme Rapinat f08e404ab3 minor change on a debian patch 2014-02-04 19:42:31 +01:00
Jérôme Rapinat 1e7498663b Merge with Ross' work on Debian upstream (http://anonscm.debian.org/gitweb/?p=collab-maint/gramps.git) 2014-02-04 19:38:10 +01:00
Tadas Masiulionis 2c56f4fbcb update Lithuanian translation 2014-02-04 19:13:44 +01:00
Jérôme Rapinat 064bc56738 update french translation 2014-02-04 19:10:40 +01:00
Pekka Valta a2c4d9bdb1 update template and finnish translation 2014-02-04 19:08:23 +01:00
Nick Hall e4d26784c0 Fix person sidebar filter 2014-02-04 15:40:23 +00:00
Nick Hall 1fbe7ea049 Add HasDayOfWeek rule 2014-02-03 22:15:30 +00:00
Nick Hall 5e8187c539 7419: HasEventBase should not include primary role 2014-02-02 16:12:00 +00:00
Nick Hall 4c51f7d033 7429: Fix bug when an empty string is used as custom type 2014-02-02 15:42:45 +00:00
Łukasz Rymarczyk 304ce468b4 Update Polish translation 2014-01-31 20:49:36 +01:00
John Ralls 156e8095dd Release 4.0.3
Includes some module updates and fixups.
2014-01-28 16:30:54 -08:00
Mirko Leonhaeuser 4c05acd065 update German translation 2014-01-28 23:24:17 +01:00
Nick Hall 4c17d90ab4 7419: Fix HasEvent filter in sidebar gramplet 2014-01-28 19:33:49 +00:00
gzsuniq bf99af4abd 7412: Edit Note window is too small 2014-01-27 19:31:22 +01:00
Jérôme Rapinat af890ff3ee 7413: COPYING file is missing into debian package 2014-01-27 18:20:42 +01:00
Jérôme Rapinat 179ae142fa bump to '4.0.4' 2014-01-27 16:44:27 +01:00
Jérôme Rapinat 828a14c43e make official '4.0.3' release 2014-01-27 16:40:41 +01:00
Jérôme Rapinat 1710e7a515 update for 4.0.3 release 2014-01-27 16:08:18 +01:00
Jérôme Rapinat a28325eb64 6519: 3 new strings around event roles on filter rules [aedc45] 2014-01-27 15:31:08 +01:00
Nick Hall aedc453452 6519: Add primary role option to event filter 2014-01-26 16:35:57 +00:00
Jérôme Rapinat b34391ec2f 7399: Cannot copy via context menu on Views into Charts Category 2014-01-26 12:11:12 +01:00
Jérôme Rapinat 30a5c27c3d 6868: Tab sequence in Name Editor causes an error 2014-01-26 10:35:15 +01:00
Jérôme Rapinat df40640b17 7183: two new strings for a new filter rule 2014-01-25 21:20:19 +01:00
Nick Hall e1bdb17230 7183: Fix source note citation filter 2014-01-25 19:50:34 +00:00
Jérôme Rapinat 23be452169 7388: Clicking on www link in Welcome Gramplet when detached causes crash 2014-01-25 19:11:13 +01:00
Pekka Valta 0ea428bad4 Update finnish translation 2014-01-25 19:00:21 +01:00
Jérôme Rapinat 93398f416b 7232: 'TreePath' has no len(); str(TreePath) can have a len()... 2014-01-25 14:54:00 +01:00
Jérôme Rapinat 6a9d1897cb Merge branch 'maintenance/gramps40' of ssh://git.code.sf.net/p/gramps/source into gramps40 2014-01-24 15:51:22 +01:00
BennyP a0cc917cda 7409 7331: Selection lists do not expand for some edit dialogs 2014-01-24 15:50:32 +01:00
Mirko Leonhaeuser 1753a098d1 update German translation 2014-01-23 22:16:11 +01:00
Nick Hall faad965522 Make event groups consistent with event type menu 2014-01-23 19:23:27 +00:00
Jérôme Rapinat 13f1cb0f20 Minor improvements 2014-01-23 16:55:02 +01:00
Nick Hall e0d8b923bf 5123: Fix bug in associations filter 2014-01-22 16:15:47 +00:00
Jérôme Rapinat 288ef11d22 7361: Do not save column order if there is not at least one column 2014-01-22 14:45:25 +01:00
Mirko Leonhaeuser 217e1a0736 update German translation 2014-01-22 00:25:38 +01:00
Jérôme Rapinat 79680cb547 5775: rebuild template (one new string) and make french translation more consistent 2014-01-21 21:01:55 +01:00
Theophraste 15062a2d0f 5775: ID reorder tool doesn't update citation IDs
reapplied from gramps34
2014-01-21 21:50:57 +02:00
Josip 6286d938d3 7378: Starting Gramps without console not possible 2014-01-21 19:41:55 +01:00
Josip 24b65ca5ed 7313: 'utf8' codec can't decode byte 0xa0 in position 6: invalid start byte 2014-01-21 19:08:11 +01:00
Vassilii Khachaturov d6db8c46bd RU: translation update - back-merge from master
2 fuzzies resolved
2014-01-21 17:23:41 +02:00
Jérôme Rapinat 26896bf2e4 7404: update docstring 2014-01-21 15:37:49 +01:00
Vassilii Khachaturov e62cedd343 7317,7360: also use 'value-changed' signal
With gtk3 controls, the day/year changes aren't caught otherwise
2014-01-21 16:08:20 +02:00
Vassilii Khachaturov b27082b20b 7360: Calendar conversion broken in date editor
Port my fix from gramps34: [ecdcca] [aa9deb]
The enable/disable code behaves worse under gtk3, need further polish
(this is not related to the current fix). Sometimes the changes
to the d/m/y edit fields don't fire the "changed" signal with the
UI value seen by build_date_from_ui
2014-01-21 12:25:42 +02:00
Nick Hall b60ea170bf Fix bugs in the test case generator 2014-01-21 00:05:03 +00:00
Jérôme Rapinat bdc350a14d try to keep consistency on URLS with LANG code (french and GrampsDisplay) 2014-01-19 16:07:20 +01:00
Jérôme Rapinat 5b3594766f typo on message layer 2014-01-19 15:41:20 +01:00
Jérôme Rapinat 8fcd507390 One ignored translation string on FanChart view 2014-01-19 15:31:06 +01:00
Jérôme Rapinat 76ed68bd29 update finnish translation (by Pekka Valta) 2014-01-18 12:19:02 +01:00
Jérôme Rapinat 071fead878 7370: entries were set twice 2014-01-17 21:14:14 +01:00
Doug Blank 676a39ce9c 6690: Not being able to write a .gramps produces a scary message about DB corruption 2014-01-17 07:43:39 -05:00
Jérôme Rapinat 4111214e01 7370: Citation sidebar filter raises unicode exception with python3 2014-01-17 12:40:41 +01:00
Jérôme Rapinat e80d56303e 7134: fit encoding selector dialog 2014-01-17 12:16:44 +01:00
Jérôme Rapinat f8a7cdb86d Fix typo on urls (french translation) 2014-01-17 11:06:46 +01:00
Jérôme Rapinat 5b73a01ca7 Update About dialog (2013 -> 2014) 2014-01-17 10:48:45 +01:00
Jérôme Rapinat 7456d9e56b Update Template (around 10 new strings) and french translation 2014-01-17 10:42:19 +01:00
Jérôme Rapinat bfc05b2f8d Use sgettext for handling context (english locale) 2014-01-16 15:00:19 +01:00
Benny Malengier 9d4fdd0646 7157: better support for objects having citations as subobjects 2014-01-15 09:31:49 +01:00
Jérôme Rapinat 997b2683d5 7331: Events and Children selectors don't use all available space of dialog box; 3.6 < gtk+ < 3.10; patch by BennyP (missing on author list) 2014-01-15 09:12:34 +01:00
Mirko Leonhaeuser d7502ebf4f Update German translation 2014-01-14 22:22:34 +01:00
John Ralls d1034c5c41 Bug 7363: file-not-found exception when generating narrative web
document.png is in images/ not images/webstuff/

(cherry picked from commit 3b3a0338a3)
2014-01-07 10:31:15 -08:00
Vassilii Khachaturov 1a429ca644 l10n: need to disambiguate "New" at least for RU 2014-01-07 17:41:00 +02:00
Doug Blank 5fd1963855 7357: Adding link to a "Html code" note using the "Link" button has no effect 2014-01-07 10:35:30 -05:00
Doug Blank bc79cdf5db Missing file for narrative web 2014-01-07 10:34:05 -05:00
Nick Hall 8f004f0215 Enhance event type selector to use sub-menus 2014-01-06 19:36:31 +00:00
Nick Hall 8fe92e9b3f Add custom types to selection widgets 2014-01-06 19:36:31 +00:00
Josip a53bdad4bf 7339: Spell: Gramps crashes if myspell folder doesn't contain files for
the currently used LANG

With patch works like:
* default to dictionary in system locale if exist (language Gramps use)
* if no system-locale dictionary default to English dictionary if exist but
	allow selection of any other installed one
* if both English and system-locale dictionary is not available,
	disable spellchecking
2014-01-06 19:46:24 +01:00
Jérôme Rapinat 7544d66cb1 5024: add 'Last Change' column on selectors, when missing 2014-01-06 17:33:58 +01:00
Vassilii Khachaturov 2e3724f2f3 7336: Gramps changes root cursor to hand
Following the suggestion from QuLogic, change get_root_window
to get_window for the set_cursor scope, like in my #6740 fix.
2014-01-04 21:20:55 +02:00
Mirko Leonhaeuser 9b45e7652f update German translation 2014-01-02 11:45:41 +01:00
Nick Hall c0c318e2e5 7340: Performance improvement in ancestor filter 2013-12-31 17:40:26 +00:00
Vassilii Khachaturov 46eee8a252 7172: more meaningful LOG warning plug/utils.py
Reapply [5c467c] from gramps34
2013-12-30 11:10:19 +02:00
Vassilii Khachaturov 38826b6946 6380: GEDCOM export error for family _UID
Port gramps34 [429c18]
    Applying patch from 2013-12-24 by Enno Borgsteede,
    fixing attribute processing on the path that handled _UID
    and adding another extension, _FSFTID.
2013-12-30 11:03:28 +02:00
Jérôme Rapinat 67d2a8e5f8 Small correction on finnish translation (by Pekka Valta) 2013-12-29 17:57:45 +01:00
Mirko Leonhaeuser 45591f205d updated German translation and corrected Bar-Mizwa and Bat-Mizwa 2013-12-29 01:18:22 +01:00
Mirko Leonhaeuser 850be1f75a update German translation 2013-12-29 00:42:33 +01:00
Vassilii Khachaturov 487b779a90 7327: friendlier diagnostics during parsing
In preparation for fixing the bug, discovered minor glitches
in the open/lock/close logic on error paths. Using the RAII syntax
for xml_file and removing redundant unlock-before-close.

The parse errors now have friendlier verbiage, give action suggestions,
and point to the actual file location for better usability and
maintainability.
2013-12-26 19:42:59 +02:00
Nick Hall ce5de0bbb2 7333: Reduce number of columns in LDS temple selector 2013-12-26 17:36:14 +00:00
Vassilii Khachaturov 1fb8959585 remove stray debugging print
discovered by running under py3 which balked at an old-style print :-)
2013-12-26 18:59:33 +02:00
Vassilii Khachaturov 1e256c6443 6955: warn on non-primary surnames not exported
reapply from gramps34
2013-12-26 17:44:32 +02:00
Jérôme Rapinat e724894bd7 7316: use ellipsize at the begining adjusts text and make missing media dialog more fit 2013-12-23 14:22:30 +01:00
Vassilii Khachaturov 928346c1cc 7317: DateEdit statusbar to report invalid dates
Port [6b0b9f] from gramps34
    Add/remove an explanatory prompt on the statusbar along
    with disabling/enabling the "OK" button when the date
    is invalid.
2013-12-21 23:11:54 +02:00
Vassilii Khachaturov 4aa3de0aec 7317: DateEdit statusbar to report invalid dates
Port [0c80c5] from gramps34
    add the status bar to the date editor dialog
2013-12-21 23:05:51 +02:00
Vassilii Khachaturov 62207a98d0 ignore test/data 2013-12-21 22:56:41 +02:00
Doug Blank d3056d33f5 unicode literals for {} formats 2013-12-20 12:02:41 -05:00
Doug Blank 6ad2ec26f7 Added unicode_literals; thanks Nick 2013-12-20 11:18:59 -05:00
Vassilii Khachaturov 1e908f8acc add specific help links for person/name editor 2013-12-19 19:46:08 +02:00
Jérôme Rapinat 8766d9a099 7147 7001: Merge person dialog does not properly adjust context section after expand 2013-12-17 15:12:30 +01:00
Vassilii Khachaturov 2b83de38fd 7229: change active person upon a bookmark select
Port the more general fix [c7c0b2]^..[6caf08] from gramps34.
2013-12-16 21:54:04 +02:00
Doug Blank db79b0bd32 Fix for deleting tags in people model; fix for calendar graphical report when too many 2-line entries in day 2013-12-15 10:25:40 -05:00
Vassilii Khachaturov 04d69928b9 7288/7290: port image_dpi legacy gtk code to gtk3 2013-12-15 15:06:17 +02:00
Jérôme Rapinat bbcefae24e 7286: gir1.2-webkit-3.0 and others gir1.2-dependencies for debian package 2013-12-15 12:55:15 +01:00
Vassilii Khachaturov 37f4b411e3 7288/7290: image_dpi and cropping fixes for ODFdoc
Port my fixes based on the patch from Matthias Basler from gramps34
[2eca30] 7290: use simpler math in image_dpi
[2f5e22] 7290: align warning with the image_dpi fix logic
[36f84e] 7290: image_dpi default calc based on gtk.gdk
[161ce3] 7290: ImgManip.image_dpi shouldn't return None
[460e63] 7288/7290 refactor out crop_percentage_to_pixel
[a8a38f] 7288/7290 refactor out crop_percentage_to_subpixel
[0d61bb] 7288/7290: refactor fix from matthiasbasler
[088146] rm relict RCS kwd
[76df5d] 7288/7290: image cropping fixes in ODFDoc

Using legacy gtk interface in image.py at the moment, need to port
to the new style.

Tested with python2.
2013-12-14 23:12:18 +02:00
Vassilii Khachaturov b1c1466a15 7229: change active person upon a bookmark select
Reapply my fix [88d2a2] from gramps34.
2013-12-14 17:57:47 +02:00
Vassilii Khachaturov de4517dbc5 6921: Use "Bat Mitzvah" as the en_US event name
Port [109549] from gramps34
p3/3: related msgid changes in the POT
2013-12-14 17:11:29 +02:00
Vassilii Khachaturov 8643f248fb 6921: Use "Bat Mitzvah" as the en_US event name
Port [4f86a3] from gramps34
p2/3: related msgid changes in the translaion DBs
2013-12-14 17:10:17 +02:00
Vassilii Khachaturov bd29c4739e 6921: Use "Bat Mitzvah" as the en_US event name
Port [0021e8] from gramps34:
p1/3: actual change in the code. Note that the abbreviation
also has to be changed accordingly.
2013-12-14 17:05:29 +02:00
Vassilii Khachaturov 665328654e 7300: "Add citation" missing in pop-up menu 2013-12-14 16:33:33 +02:00
Jérôme Rapinat 2e6186a53d Update Finnish translation (by Pekka Valta) 2013-12-12 17:47:00 +01:00
Mirko Leonhaeuser de4e7a99b2 update German translation 2013-12-11 21:04:21 +01:00
Jérôme Rapinat aa49025c38 update template (new strings on import, modified string on listview), merge finnish and french translations with new template, update french translation 2013-12-11 10:11:48 +01:00
Jérôme Rapinat 74a630f947 update Finnish translation (by Pekka Valta) 2013-12-11 09:59:50 +01:00
Vassilii Khachaturov 9315c69886 7086: "Remove selected items?" inconsistent YES/NO 2013-12-05 17:07:16 +02:00
Vassilii Khachaturov 5ff531d09e 7273: imprecise l10n of 'before' as 'перед' in RU 2013-12-05 16:25:09 +02:00
Jérôme Rapinat 5c8781dc86 http://www.gramps-project.org/wiki/index.php?title=Debian http://sourceforge.net/projects/gramps/files/Unstable/ 2013-12-04 12:24:30 +01:00
Mirko Leonhaeuser a038cc0432 update German translation 2013-12-03 20:11:45 +01:00
Jérôme Rapinat 2f190df9d5 python2 for python-gramps-4.0.x; python3 for python-gramps-4.1.x 2013-12-03 17:14:10 +01:00
Jérôme Rapinat a10a9af0e2 Merge experimental python3 support (Ross Gammon - Debian packaging) 2013-11-30 11:04:54 +01:00
Jérôme Rapinat f862478404 6918: try to limit lintian messages by merging Ross Gammon's work on Debian packaging 2013-11-30 10:42:47 +01:00
Vassilii Khachaturov 188ad41592 7256: extra spaces in HTML GV labels 2013-11-28 23:11:11 +02:00
noirauds 2972b0d9c0 Geography : bug7240 : create a bookmark via GeoEvents leads to an empty link 2013-11-27 21:21:58 +01:00
Doug Blank 33c9e7e043 Revert changes for 7231; didn't fix main issue 2013-11-27 12:50:17 -05:00
Vassilii Khachaturov 29ebeb47a2 use logging.warning in old cases in this file, too 2013-11-27 18:02:57 +02:00
Vassilii Khachaturov c54c31cd68 7212: convert invalid date to text on .gw import
Implement the feature.
2013-11-27 18:02:56 +02:00
Vassilii Khachaturov fe6c014ab2 7212: convert invalid date to text on .gw import
Add a failing test demonstrating the feature to be implemented...
2013-11-27 18:02:56 +02:00
Doug Blank 2d147924e8 7231: recursion limit during navigation; added non-blocking lock to prevent reentrant calls over and over to prevent overflowing stack 2013-11-26 07:51:38 -05:00
Doug Blank 3e17a1586a 7231: recursion limit during navigation; added lock to prevent reentrant calls over and over to prevent overflowing stack 2013-11-26 07:00:16 -05:00
Joan Creus 2633afc555 Translation update 2013-11-25 22:50:32 +01:00
Vassilii Khachaturov 9674518322 7212: convert invalid date to text on import
Consolidate the new logic with the older code -- now malformatted
dates, as well as well-formatted invalid ones, will also be
converted to text.
2013-11-25 12:37:19 +02:00
Vassilii Khachaturov 0b0e55250c 7212: convert invalid date to text on import
Switch vcard birthday import code to use the validating Date.set
and catch the exception, convert to text mode if caught.
2013-11-25 12:24:00 +02:00
Vassilii Khachaturov 182c0f3437 7212: convert invalid dates to text on import
Make log message from [dfc3cc] use named arguments for l10n.
Thanks to Paul Franklin for finding this during code review.
2013-11-25 11:00:53 +02:00
Jérôme Rapinat aaa250f7fc Update Finnish translation (contribution by Pekka Valta), need review (fuzzy strings) 2013-11-23 20:16:45 +01:00
Vassilii Khachaturov cca72aa579 7212: convert invalid dates to text on import
If the date is invalid, it will be converted to text mode,
and the text field will be set to the problematic XML.
A warning will be printed on the console as well.
The log message will use the invalid date attached as
DateError.date, see [8e1659].
2013-11-23 19:59:19 +02:00
Vassilii Khachaturov befcd21d0b 7212: convert invalid dates to text on import
unit tests
2013-11-23 19:59:19 +02:00
Vassilii Khachaturov ca4eab8c0e 7198: Date editor crashes on invalid date
Revalidate the date upon every change, and disable
OKing the dialog when it is not valid, for usability review.

If it is not good, we can always revert this commit.
2013-11-23 19:59:18 +02:00
Vassilii Khachaturov b4a5df2622 7198: Date editor crashes on invalid date
give a name to the OK button instead of an autogenerated id
2013-11-23 19:59:18 +02:00
Vassilii Khachaturov 531e6624b0 7198: Date editor crashes on invalid date
Trying out the approach preferred by Nick, see 7198:32708
2013-11-23 19:59:18 +02:00
Vassilii Khachaturov 872bf57946 7198, 7212: attach invalid date to DateError
when Date.set throws during the date fields sanity
check validation, it now attaches an (undocumented) .date field
to the exception -- proof of concept for 7198 and potentially
for 7212 as well
2013-11-23 19:59:18 +02:00
Vassilii Khachaturov 83c6788d43 7198: Date editor crashes on invalid date
Improve user experience as promised in [98d8e6].
Now, if one clicks OK in the date editor and the date is invalid,
it's switched into text mode and the dialog remains open,
so the user can either correct the date or type it as text,
no more loss of entered data happens.
2013-11-23 19:59:18 +02:00
Vassilii Khachaturov 1d654a2b1a 7198: Date editor crashes on invalid date
Now it just autoconverts into MOD_TEXT and returns whatever
text was there. This fixes the crash on the master branch,
but is not the final user experience yet.
2013-11-23 19:59:18 +02:00
Vassilii Khachaturov 3c93c1d164 7198,7212: fix Date.set(value=None) 2013-11-23 19:59:18 +02:00
Doug Blank 4f29c6e464 7209: Custom key/value (data item) on Database difference report: Change datamap representation to allow Database Difference Report to work 2013-11-18 06:27:05 -05:00
Josip aad7b15a47 0007179: Select an existing person causes crash in searchfilter 2013-11-16 10:04:19 +01:00
Vassilii Khachaturov 68c0615bc4 7197: merge the fix from master
All date tests pass cleanly on gramps40 branch.
Merged the following commits.

	commit a90139cb9a
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Fri Nov 15 15:04:03 2013 +0200

		7197, 7100: missing recalc_sort_value in ny code

		Fix bug #7197

	commit baae6ac615
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Thu Nov 14 22:45:42 2013 +0200

		7197: readjust sanity date wrt newyear/slash

		Attempt to fix the failing
		 DateHandlerTest.test_invalid_month_with_ny
		(see 7197:32625). Tests still fail, investigation shows
		there's a problem in Date.set setting Julian+Mar25 date even if the
		date validation check is disabled by inserting a return before
		the validation block, i.e., before this line
				if modifier != Date.MOD_TEXTONLY:
		which seems to be the root cause of the remaining failing tests.
		which seems to be the root cause of the remaining failing tests.

		To investigate, add the return and try
		LC_ALL=en_GB.utf8 LANG=en_GB.utf8 GRAMPS_RESOURCES=$PWD \
		 python -m unittest -v \
		 gramps.gen.lib.test.date_test.MatchDateTest.test_match

	commit 4147721112
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Wed Nov 13 22:34:24 2013 +0200

		7197: refactor code

		extract Date._adjust_newyear out of Date.set

	commit b3ab87bc5a
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Wed Nov 13 22:02:21 2013 +0200

		7197: refactor code

		replace all copies of logging with a single point at the exception
		rethrow point

	commit c4daa151a5
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Wed Nov 13 17:39:47 2013 +0200

		7197: date sanity check breaks on Julian+Mar25

		Date.convert_calendar resets the new year setting to 0,
		so the sanity check fails. Commit the initial fix that
		unblocks the failing test.
2013-11-15 15:51:56 +02:00
Vassilii Khachaturov e097fb58c3 7197: failing tests demonstrating the bug
Merge from master:
	commit 93ca90f3b8
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Thu Nov 14 22:41:46 2013 +0200

		7197: more failing tests

	commit 78cae43a32
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Wed Nov 13 16:59:26 2013 +0200

		7197: better diagnostics from test for debugging

		Use unittest -v/--verbose flag to trigger it.

	commit 626353a0b3
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Wed Nov 13 13:52:47 2013 +0200

		7197: failing test demonstrating the bug
2013-11-15 15:41:55 +02:00
Vassilii Khachaturov 6514aed725 RU: minor libnarrate translation fix
Reapply from master
	commit dc278569c1
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Wed Nov 13 10:15:41 2013 +0200
2013-11-15 15:35:58 +02:00
John Ralls 4f07546433 Bug 7191: Cursor keys just beep on PPC with Gramps 3.4.6
It's actually on both PPC and Intel, and it's from forgetting to update
gramps.accel after upgrading Gtk past 2.24.10, which changed the mapping
of alt/option from Mod5 to Mod1.

For gramps40 and master, the problem was masked by the bundler putting
the file in the wrong directory.
2013-11-14 10:17:35 -08:00
John Ralls d3655f65de Fix gramps.modules for git conversion 2013-11-09 17:28:56 -08:00
Nick Hall 10b6c433d4 Update url to example file 2013-11-09 19:45:18 +00:00
Nick Hall ccdc4297ce Skip .git instead of .svn directories 2013-11-09 00:11:30 +00:00
Nick Hall adfafbc478 Change version string to contain git hash instead of svn revision 2013-11-08 19:54:16 +00:00
Nick Hall 93fe889a4c 7182: Avoid using private functions in GExiv2 > 0.5
svn: r23475
2013-11-08 09:26:04 -08:00
Jérôme Rapinat 56878b3205 bump to 4.0.3
svn: r23472
2013-11-08 09:25:35 -08:00
Jérôme Rapinat 9f0f9be8ea update NEWS
svn: r23470
2013-11-08 09:25:13 -08:00
John Ralls 870f5334ec Prepare mac build for 4.0.2 release.
svn: r23469
2013-11-08 09:24:53 -08:00
Doug Blank cdbcbd1446 Python3 spacing
svn: r23466
2013-11-07 11:35:21 -08:00
Doug Blank 17ac22d959 Python3 spacing
svn: r23464
2013-11-07 11:34:59 -08:00
Doug Blank 7e1eb33466 Python3 syntax
svn: r23463
2013-11-07 11:34:31 -08:00
Doug Blank 2c266cada1 Missing newline
svn: r23462
2013-11-07 11:34:05 -08:00
Mirko Leonhäuser 92f65f5628 updated german translation
svn: r23460
2013-11-07 11:33:40 -08:00
Jérôme Rapinat 959162e862 6918: http://lintian.debian.org/tags/old-fsf-address-in-copyright-file.html
svn: r23456
2013-11-07 11:33:16 -08:00
Doug Blank 61347c3093 Added callback parameter to __init__ method so that all editors have a uniform signature (called from Note Link)
svn: 23454
2013-11-07 11:32:35 -08:00
Doug Blank dd818829bd Fix long columns of text that span pages
svn: r23453
2013-11-07 11:32:09 -08:00
Paul Franklin a4c17b6573 add Greek date handler to NEWS
svn: r23452
2013-11-07 11:31:37 -08:00
Vassilii Khachaturov 4aa97e3ee9 merge gramps34 news
svn: r23451
2013-11-07 11:31:02 -08:00
Mirko Leonhäuser e127df70c5 updated german translation
svn: r23443
2013-10-30 20:33:47 +00:00
Mirko Leonhäuser 2e28011a25 updated german translation
svn: r23441
2013-10-29 22:14:52 +00:00
Jérôme Rapinat 5bb0d47b2c 7151: update start of Ramadan in France
svn: r23439
2013-10-29 17:52:02 +00:00
Paul Franklin 72aae8ea69 typos
svn: r23436
2013-10-29 15:35:14 +00:00
Mirko Leonhäuser 3c55f8c668 updated german translation
svn: r23428
2013-10-27 20:57:33 +00:00
Mirko Leonhäuser e5586c67da updated german translation
svn: r23427
2013-10-27 13:10:31 +00:00
Jérôme Rapinat 8015627b30 7154: fix Norwegian Bokmål's header
svn: r23425
2013-10-27 00:54:14 +00:00
Paul Franklin 5732e96e8b updated Arabic translation (by Muhammad Bashir Al-Noimi)
svn: r23423
2013-10-26 20:56:32 +00:00
Vassilii Khachaturov 6971d583ac RU: translation update
svn: r23403
2013-10-25 11:39:36 +00:00
Vassilii Khachaturov 1541ad9543 RU: translation update for navweb
svn: r23402
2013-10-25 11:38:55 +00:00
Vassilii Khachaturov 18fb7ac41a RU: fix name editor keywords
svn: r23400
2013-10-25 11:15:43 +00:00
Jérôme Rapinat 88314f3ccd 7154: fix Norwegian Bokmål's header
svn: r23398
2013-10-25 11:01:10 +00:00
Jérôme Rapinat e39cb42091 merge some strings (need review) for Breton
svn: r23396
2013-10-25 09:27:20 +00:00
Jérôme Rapinat 0837003bc9 merge some strings from gramps34 and Devhelp (Gtk/Gnome API)
svn: r23395
2013-10-25 09:11:25 +00:00
Jérôme Rapinat d982726200 update template
svn: r23394
2013-10-25 08:39:56 +00:00
Zdenek Hatas 395a4f6110 czech translation update
svn: r23379
2013-10-24 08:41:10 +00:00
Paul Franklin 841f5c261b 7150: crash on backup or export
svn: r23366
2013-10-22 16:52:53 +00:00
Vassilii Khachaturov 47b9144ed1 5098: fix a runaway merge artifact
svn: r23365
2013-10-22 15:07:47 +00:00
Erik De Richter 940fb10ecc updated dutch translation
svn: r23358
2013-10-20 21:20:21 +00:00
Vassilii Khachaturov ba541e6c03 7125/7102: port my fix from gramps34
svn: r23355
2013-10-20 16:47:38 +00:00
Paul Franklin 2bf775fad3 7124: Complete Individual Report does incomplete translation
svn: r23353
2013-10-20 16:46:31 +00:00
Vassilii Khachaturov e8f7341fb5 fix RU translation of WebCal
svn: r23352
2013-10-20 14:46:09 +00:00
Vassilii Khachaturov 70ad7761e6 RU translation update
svn: r23344
2013-10-20 11:05:06 +00:00
Erik De Richter 647cc6b50d updated dutch translation
svn: r23342
2013-10-19 20:43:54 +00:00
Erik De Richter ccd8490f33 updated dutch translation
svn: r23341
2013-10-19 20:37:27 +00:00
Doug Blank f488b4c33e Fixed new Gtk Drag/Drop names
svn: r23337
2013-10-19 03:02:50 +00:00
Paul Franklin 902fa3da89 added SVN properties, and SVN "Id" lines if needed
svn: r23333
2013-10-17 19:01:17 +00:00
Doug Blank 0f8e1c52e0 6678: Database Differences Report crashes 4.0 beta svn 21228
svn: r23330
2013-10-17 12:07:04 +00:00
Paul Franklin 196d52c6e5 7129: the Family Group Report doesn't show "family" attributes
svn: r23319
2013-10-13 21:10:46 +00:00
Mirko Leonhäuser 365f8e7c2e updated german translation
svn: r23317
2013-10-13 17:53:34 +00:00
Doug Blank a39ea168ab 7090: wrong age for dead people reported by webcal
svn: r23306
2013-10-11 11:46:06 +00:00
Jérôme Rapinat df8ec14bcf either fix apostrophe into 'data/tips.xml.in' to avoid message like 'byte 0xd0 in position 7', or remove unicode_literals from po/update_po.py
svn: r23304
2013-10-11 08:31:40 +00:00
Jérôme Rapinat 8149b4fe72 7110: alternate possessive form, which will limit issues on parsing
svn: r23303
2013-10-11 08:26:07 +00:00
Jérôme Rapinat 1577a6d8af 7110: typo on AppData file, improve description; 7092 7110: update template and french translation
svn: r23302
2013-10-11 08:10:55 +00:00
Paul Franklin aea3259e63 7092: API for reporting issues ["interim" solution, from Nick Hall]
svn: r23300
2013-10-11 00:00:53 +00:00
Jérôme Rapinat fe1f262312 7110: add up-to-date screenshots to AppData file; typo on the french translation
svn: r23295
2013-10-10 15:47:32 +00:00
Mirko Leonhäuser b5f614df8e updated german translation
svn: r23293
2013-10-09 20:51:48 +00:00
Paul Franklin 386205877b 7102: XML: Gramps does not export 'very low' value (0) for confidence into citation
svn: r23288
2013-10-09 16:19:47 +00:00
Josip Pisoj 75fe63893f 0007114: GtkSpell: language code in a human readable format
svn: r23283
2013-10-08 17:12:11 +00:00
Doug Blank f060bf400d 7006: double entries in de gendex.txt file
svn: r23282
2013-10-08 16:40:00 +00:00
Vassilii Khachaturov 2b1df84121 7068: back-port from trunk
svn: r23281
2013-10-08 13:05:34 +00:00
Vassilii Khachaturov 63d6fe766f 7100: reapply fix from trunk after CR by dsblank
svn: r23278
2013-10-08 12:10:20 +00:00
Doug Blank 98b54ebd8b Add Gallery 'Make Active Media', typo
svn: r23273
2013-10-08 01:29:08 +00:00
Doug Blank eb71691372 Add Gallery 'Make Active Media', typo
svn: r23272
2013-10-08 01:12:44 +00:00
Doug Blank d395c4c515 Add Gallery 'Make Active Media'
svn: r23269
2013-10-08 01:03:54 +00:00
Nick Hall 918be87230 Freeze headings when scrolling
svn: r23266
2013-10-07 22:03:12 +00:00
Jérôme Rapinat cd01cb92ef 7105: missing event_ref_list into get_citation_child_list method
svn: r23262
2013-10-07 14:41:38 +00:00
Jérôme Rapinat 13eeb38282 7110: Add AppData file
svn: r23259
2013-10-07 09:38:29 +00:00
Jérôme Rapinat 38b090de64 7110: Add AppData file
svn: r23258
2013-10-07 09:20:16 +00:00
Jérôme Rapinat 8f43a5ae44 7110: Add AppData file
svn: r23257
2013-10-07 09:12:16 +00:00
Jérôme Rapinat dfde3b7931 7110: Add AppData file
svn: r23253
2013-10-07 08:21:57 +00:00
Jérôme Rapinat 3f76c8742a minor improvement
svn: r23252
2013-10-06 16:22:03 +00:00
Jérôme Rapinat 3321252b97 typo
svn: r23251
2013-10-06 16:16:53 +00:00
Jérôme Rapinat 3947c86636 7081: QuestionDialog module moved to gramps.gui.dialog
svn: r23248
2013-10-05 16:38:57 +00:00
Erik De Richter 19ac1c6f98 updated dutch translation
svn: r23245
2013-10-03 18:43:47 +00:00
Mirko Leonhäuser 516cea49df updated german translation
svn: r23241
2013-10-02 11:35:40 +00:00
Jérôme Rapinat c25d544828 7072: fix level for citationref into person
svn: r23239
2013-10-02 08:17:21 +00:00
Jérôme Rapinat 556da18dde 7081: No QuestionDialog module into gramps.gui.utils
svn: r23238
2013-10-02 08:13:58 +00:00
Jérôme Rapinat c9b5c60634 7071: age on date now displays all individuals, update titles
svn: r23235
2013-10-01 08:54:25 +00:00
Vassilii Khachaturov 48f0826235 7088: remove SDN version reporting
Revert "7066: Reapply from trunk sdn version reporting"

This reverts commit dc5f50175abcdaa41ff07eccc688af047bc877e9.

svn: r23231
2013-09-30 19:29:04 +00:00
Nick Hall 727932794e 7066: Fix hebrew calendar and remove sdn import
svn: r23228
2013-09-30 17:41:01 +00:00
Nick Hall 74f0259505 Move missing Gtk Spell warning
svn: r23223
2013-09-30 12:44:43 +00:00
Vassilii Khachaturov 49c89c1022 7088: rm warning on `import sdn' failure
svn: r23220
2013-09-30 11:45:01 +00:00
Nick Hall 98ebecf03c Revert change to suppress warnings
svn: r23217
2013-09-28 14:00:29 +00:00
Vassilii Khachaturov 42462e4bf2 7089: same bug in 3 more reports
reapply r23214 from trunk

svn: r23215
2013-09-28 00:00:37 +00:00
Vassilii Khachaturov de6841b6cd 7089: webcal mistreats non-gregorian event dates
svn: r23208
2013-09-26 22:05:16 +00:00
Paul Franklin ef02b35311 7088: provide a config option to suppress the warning about missing "sdn"
svn: r23206
2013-09-26 21:52:44 +00:00
Vassilii Khachaturov 17bb3fa639 7037: proxy crash with complex person filter
svn: r23200
2013-09-25 22:23:37 +00:00
Vassilii Khachaturov f8009903c7 friendlier test failure diags
svn: r23198
2013-09-25 15:51:47 +00:00
Vassilii Khachaturov 1d4bb780a2 skip MatchDateTest on non-English locales
svn: r23196
2013-09-25 14:50:39 +00:00
Vassilii Khachaturov 736de69fb9 6881: latin_american broken for partial families
svn: r23192
2013-09-25 11:11:24 +00:00
Paul Franklin 8b64a00c51 enable Arabic date handler in gramps40
svn: r23190
2013-09-24 16:28:46 +00:00
Tim G L Lyons 3e2456b59a 0006802: In Narrative Web report most Family Maps are missing. Problem due to single apostrophe (closing single quotation mark) which needs to be escaped.
svn: r23188
2013-09-24 11:29:51 +00:00
Vassilii Khachaturov 2ad8bb0df2 7037: proxy crash with complex person filter
filter parameter shadowed the global filter :-)

svn: r23183
2013-09-23 15:56:46 +00:00
Vassilii Khachaturov 0908abf1a2 7045: enable cal switch in editor on empty dates
svn: r23178
2013-09-21 08:58:00 +00:00
Vassilii Khachaturov 9dc5890ca7 6940: ErrorReportAssistant_Test.test_buffer_recall
reapply from trunk

svn: r23170
2013-09-20 11:27:45 +00:00
Mirko Leonhäuser 8c25a7e9ce updated german translation
svn: r23165
2013-09-19 17:02:56 +00:00
Erik De Richter 9f04c31db8 updated dutch translation
svn: r23164
2013-09-19 07:40:10 +00:00
Vassilii Khachaturov 6df93d7182 7063: endless loop in probably_alive_range
Port from gramps34 branch my fix after retest by the bug submitter.

    Add a hack protection for descendants like we already have
    for ancestors, and add a debug printout.

svn: r23161
2013-09-18 14:48:13 +00:00
Doug Blank 2741628972 AgeOnDate: backported changes that show reasoning for dead/alive status and age estimate
svn: r23158
2013-09-17 23:52:11 +00:00
Vassilii Khachaturov 63f022348b 7034,7045,7065: back-merge my fixes from trunk
Back-merge from trunk changes to date.py and date_test.py
from the following commits (cumulative, clean apply).

Tests pass (but need to block the CAL_FRENCH on date_test.py:199,
because of bug# 7068 -- skipping it wasn't back-ported in this commit as
it is about the fully fixed issues only!)

	commit fa49752824bd58802773439b35faa39f2d34b151
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 15:44:04 2013 +0000

		provide sensible defautls for all Date.set params

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23126 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 3f32597699f3b372324ad87e6f7a04abac6d19e7
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 15:11:09 2013 +0000

		7045: Setting an invalid date does not raise

		do the sanity checks on a separate date object,
		so that the uncertainty expressed with 0 d/m isn't removed

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23124 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 12edf7e97626e01931c4063b2d94bec3b299a2ed
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 14:23:58 2013 +0000

		7065: Calendar conversion broken for negative date

		fixed, repro steps work as expected now
		date_test still broken due to further blocking issues,
		see #7045

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23123 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 091d4461e9715ab06f1ef6ab3b67517d6608daf3
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 13:24:40 2013 +0000

		7045: Date.set on invalid date does not raise

		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!!!!

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23122 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 5987046ac4cac407a4be506da9242f7a5000d878
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 13:00:19 2013 +0000

		7045: Date.set on invalid date does not raise

		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...

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23121 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit d8876cceb64629ce0a025ff714e4875768ab88a6
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 11:50:58 2013 +0000

		7034: fix test_copy_ymd_preserves_orig

		broken in r23083

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23120 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 7c163636c8e48149a5b09c211ff3dc146ebd84b2
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Tue Sep 10 17:19:16 2013 +0000

		7034: add remove_stop_date parameter

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23083 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit b45e20da3bd67d864420f99cf59fbb9929c58851
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Mon Sep 9 19:31:13 2013 +0000

		7034: probably_alive() failing when no birth-death

		further refactoring of set_.../set2_... common code
		added accessor get_stop_ymd analogous to get_ymd

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23068 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit f13a3fc23e7f0763c49e605b428b6a175c3f9eeb
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Mon Sep 9 19:31:00 2013 +0000

		7034: probably_alive() failing when no birth-death

		docstring update

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23067 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 9ee312d7ed02520b99d2ca1b28f75c87846aa3c6
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:35:15 2013 +0000

		refactor test

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23059 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 07ca997ebd885ad4d1b205907a00509099ac8f9a
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:23:23 2013 +0000

		consistency between offset and non-offset setters

		added ugly parameter _update2 to set_yr_mon_day, needs refactoring

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23058 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 67a904c529642668fbe34bfc97ef2915278ecbdb
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:23:12 2013 +0000

		fix set_yr_mon_day_offset for compound dates

		now calls set2_yr_mon_day_offset

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23057 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 3db06c36d6449ec75cde49b433349cddad40d596
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:23:02 2013 +0000

		refactor set_yr_mon_day and set2_yr_mon_day

		refactor common base

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23056 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 4192680c72cc0028c22fa207fe3f1ff0940358b3
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:22:52 2013 +0000

		raise DateError in set2_... if not is_compound()

		refactor Date to always use is_compound instead of repeating
		its logic everywhere

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23055 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 44195ede18c5a887d4440b4132bd5321f76ce5ff
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:22:40 2013 +0000

		Add some UT for Date.set2_... and fix bugs

		Cut and paste is evil ;-) fix bugs before I refactor the code...

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23054 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 14f6e3a3f35e0ff7b67006bf4996ce63ae665098
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:22:30 2013 +0000

		7034: probably_alive() failing when no birth-death

		docstring fix

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23053 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r23156
2013-09-17 18:58:06 +00:00
Jérôme Rapinat 75ca7e1f8c update template and french translation
svn: r23155
2013-09-17 15:22:01 +00:00
Doug Blank 3c488f4a6d provide a default null handler for logging; rename locale debug with leading dot
svn: r23154
2013-09-17 15:15:26 +00:00
Jérôme Rapinat d06c31dcc3 $ intltool-update -m
svn: r23152
2013-09-17 15:03:10 +00:00
Doug Blank 35933c6645 7069: Narrated Web Site media pages do not include multiple references
svn: r23147
2013-09-17 10:35:14 +00:00
Tim G L Lyons 56f1f7f22a Fix citation filters so they no longer try to filter citations with a sources filter. Citation filter now allows specification of both source and citation data. When a citation is shown in a search or a filtered citation tree view, the corresponding source is also shown.
svn: r23142
2013-09-16 21:39:09 +00:00
Doug Blank 92e5b89b8a 6774: Recursive call in GEDCOM export preview calculation
svn: r23136
2013-09-15 03:01:44 +00:00
Vassilii Khachaturov 95c805f325 7066: Reapply from trunk sdn version reporting
Merged from
	commit dbae40dd1edad52023b828d5eef0fe7eb3684fb6
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 19:42:48 2013 +0000

		7066: use sdn module from Calendar package on pypi

		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.

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23127 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	M       gramps/gen/lib/calendar.py
--->M       gramps/grampsapp.py

svn: r23132
2013-09-14 23:24:20 +00:00
Vassilii Khachaturov 1cba16a406 7066: fix our algorithm based on jewish.c in sdn
It looks like we had an earlier fork of the same code,
and the upstream had some bugs fixed.

svn: r23131
2013-09-14 23:18:44 +00:00
Vassilii Khachaturov dcf62ff1d9 Cope with UnicodeDecodeError on git svn output
svn: r23130
2013-09-14 23:18:33 +00:00
Vassilii Khachaturov 67f33a0c69 add get_git_svn_revision and fall back to it
reapply from trunk

svn: r23119
2013-09-13 21:43:58 +00:00
Jérôme Rapinat 132c3c60ac wrap description on about dialog
svn: r23114
2013-09-13 13:01:02 +00:00
Jérôme Rapinat 05b4916e68 6028: gen module should be gramps.gen
svn: r23113
2013-09-13 10:46:43 +00:00
Jérôme Rapinat 98a1397c35 test: wrap on about dialog?
svn: r23112
2013-09-13 09:47:26 +00:00
Vassilii Khachaturov 02a9501fb9 5098: refactor to use User.progress
Re-apply the reverted commit now that the underlying problem
in gramps/gui/user.py is fixed.

svn: r23108
2013-09-13 08:30:27 +00:00
Vassilii Khachaturov e49af1998c 7061: docstring update
svn: r23107
2013-09-13 08:08:15 +00:00
Paul Franklin 790753e99c add Arabic date handler to gramps40, for further testing
svn: r23105
2013-09-13 00:08:20 +00:00
Vassilii Khachaturov ceea27df84 7061: rename gui.user.User.progress to ._progress
it shadowed the gen.user.User.progress (the context manager),
breaking the ``with user.progress() ... as step:'' idiom!

svn: r23103
2013-09-12 21:30:22 +00:00
Vassilii Khachaturov acc627b06b Revert "5098: refactor to use User.progress"
OOPS. This was tested only with "runtest.sh", but turns out
things are broken with GUI :-) Reverting for now @gramps40,
will investigate on trunk!

svn: r23098
2013-09-12 20:20:19 +00:00
Vassilii Khachaturov 97799c1303 5098: refactor old code to use User.progress
Reapply from trunk.
    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.
The only reject is on gramps/gen/merge/diff.py that doesn't have
any progress callbacks on gramps40. I'm leaving it untouched.

svn: r23097
2013-09-12 19:50:15 +00:00
Vassilii Khachaturov c4f4bb2128 7061: Add User.progress context manager
reapply from trunk

svn: r23094
2013-09-12 17:56:50 +00:00
Mirko Leonhäuser 648334623e updated german translation
svn: r23088
2013-09-11 17:42:05 +00:00
Doug Blank 96438738b9 living proxy did not exclude living people with iter_people()
svn: r23085
2013-09-11 02:13:11 +00:00
Doug Blank a584c5dfed Ignore meaningless @IDENT@ on CONT or CONC line as detailed at http://www.tamurajones.net/IdentCONT.xhtml
svn: r23079
2013-09-10 16:49:29 +00:00
Vassilii Khachaturov dcd006b8e6 7013: strip underscores from accept/reject labels
reapply from trunk

svn: r23078
2013-09-10 12:42:36 +00:00
Doug Blank 5ce28808c6 7053: Narrated Website report crashes; check for family == None on lookup
svn: r23075
2013-09-10 10:09:46 +00:00
Erik De Richter 71aa77a26c updated dutch translation
svn: r23072
2013-09-10 06:43:02 +00:00
Paul Franklin 0f652ce5ef enable suppression of minor missing-package warning (spell checking)
svn: r23069
2013-09-09 20:55:05 +00:00
Serge Noiraud 828408d244 Geography : bug#0006930 : incorrect string in geoplaces
svn: r23065
2013-09-09 15:31:46 +00:00
Tim G L Lyons b26ce84857 Fix error where displaying Date or Confidence in Citation Tree View gave AttributeError: 'NoneType' object has no attribute 'encode'
svn: r23062
2013-09-09 11:27:53 +00:00
Jérôme Rapinat 1076baad72 6028: same change for cli (thank you Nick); still something wrong with my config (GrampsLocale init)
svn: r23050
2013-09-07 09:36:28 +00:00
Nick Hall 14d051aaf1 6028: Fix imports for documentation generation
svn: r23048
2013-09-06 23:09:27 +00:00
John Ralls 0b0a37e2d5 [r23046]Bug 7040: 4.0.2 svn 23029M fails to start catastrophically
svn: r23047
2013-09-06 19:10:32 +00:00
Zdenek Hatas 659f868583 czech translation update
svn: r23044
2013-09-06 13:54:25 +00:00
Vassilii Khachaturov b161383e94 7040: gramps40 svn fails to start catastrophically
indentation fix

svn: r23043
2013-09-06 11:32:30 +00:00
Jérôme Rapinat 18539be359 6028: try to update API(s) documentation
svn: r23042
2013-09-06 09:25:17 +00:00
Nick Hall 745bf7d96f Fix bug listing gramplets already in gramplet bar
svn: r23040
2013-09-05 22:46:46 +00:00
Vassilii Khachaturov 3f32fbcab0 add __main__ for stand-alone test runs
svn: r23038
2013-09-05 08:32:00 +00:00
Vassilii Khachaturov 2a6e1a2f1e rm obsolete utility pre-gramps40 file
svn: r23037
2013-09-05 08:31:49 +00:00
John Ralls 0ddc83fb52 [r23030]Bug 7040: 4.0.2 svn 23029M fails to start catastrophically
svn: r23031
2013-09-04 14:06:00 +00:00
Doug Blank d88b3dd0d0 7034 and 6965: missing method
svn: r23027
2013-09-04 10:39:26 +00:00
Jérôme Rapinat 15cf8de5e5 update french translation
svn: r23026
2013-09-04 09:05:43 +00:00
Doug Blank 7bd8ff1f5d 7034: probably_alive() failing when no birth-death dates specified; 6965: Probably Alive fails when birth date is a range
svn: r23022
2013-09-04 02:49:34 +00:00
John Ralls a45839799d [r20136]Change grampslocale logger to use __name__ instead of 'grampslocale'
Attempt to suppress 'No handler for logger grampslocale' messages by enrolling the logger in the module hierarchy.

svn: r23020
2013-09-03 23:31:20 +00:00
John Ralls c31b633134 [r23015]Simplify display_url to just use htmlview or webbrowser
svn: r23019
2013-09-03 23:31:07 +00:00
John Ralls 793e937963 [r23014]Avoid bogus rel-calc translation error message in C locale
svn: r23018
2013-09-03 23:30:53 +00:00
John Ralls ad3ccbdfa9 [r23013]minor cleanup
svn: r23017
2013-09-03 23:30:37 +00:00
John Ralls f088797e9f [r23011]Bug 7036: [Win32]Setting LANG crashes Gramps
Also fixes Bug 6919: No automatic language selection in Windows
Thanks to Helge Herz.

svn: r23012
2013-09-03 17:44:14 +00:00
John Ralls 4b7c9361e0 [r23009]Bug 7017: Consolidate run_file into open_file_with_default_application
svn: r23010
2013-09-03 16:36:00 +00:00
Jérôme Rapinat 7eb5e86acb update french translation
svn: r23000
2013-09-01 15:44:41 +00:00
Jérôme Rapinat 8655414c18 update template
svn: r22999
2013-09-01 15:31:58 +00:00
Doug Blank 2f48b52031 Webapp: update empty.sql to latest db design
svn: r22996
2013-09-01 13:04:06 +00:00
Doug Blank 0592f41f2b Webapp: search refinements
svn: r22994
2013-09-01 12:32:44 +00:00
Mirko Leonhäuser c8bcf58315 updated german translation
svn: r22991
2013-09-01 12:01:52 +00:00
Doug Blank 78db437ce7 Webapp: use cuni for python3 compatibility
svn: r22990
2013-09-01 11:42:43 +00:00
Doug Blank c771b25cb5 Use cuni rather than unicode
svn: r22987
2013-09-01 11:20:14 +00:00
Doug Blank 124eed0ac7 7025: issue with python3 and unicode string
svn: r22985
2013-09-01 11:05:02 +00:00
Vassilii Khachaturov c8bae282e0 clean up tmp test files in the end
reapply from trunk

svn: r22984
2013-09-01 07:39:30 +00:00
John Ralls e6766f5ba1 [r22981]Fix misguided change to poll_external signature
svn: r22982
2013-09-01 04:34:29 +00:00
Doug Blank 824b11fd48 7025: 4.0.2 svn 22976M fails to start catastrophically
svn: r22979
2013-09-01 02:34:16 +00:00
Doug Blank 3a7b78e74f Webapp: put .distinct() last to remove duplicate matches in queries
svn: r22978
2013-09-01 02:12:13 +00:00
Doug Blank 8cc04c5598 Webapp changes to properly show unicode data in html
svn: r22976
2013-08-31 13:46:31 +00:00
Nick Hall ad40ffe102 Remove tagging code introduced in error
svn: r22973
2013-08-31 10:15:36 +00:00
Vassilii Khachaturov 314bbe6ca0 6960: Error merging citations
Reapply from trunk these commits:
commit 1594f61ea2dbd9eddb44a800c26f170ff5702491
Author: vassilii <vassilii@4ae1f11a-8b86-4847-b8af-ab372f36d1fd>
Date:   Fri Aug 30 22:33:58 2013 +0000

    6960: Bless Source with an IndirectCitationBase

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22970
4ae1f11a-8b86-4847-b8af-ab372f36d1fd

commit 6ec4b56d6530bd98638cb66365e6205d057f48ca
Author: vassilii <vassilii@4ae1f11a-8b86-4847-b8af-ab372f36d1fd>
Date:   Fri Aug 30 22:03:14 2013 +0000

    6960: mergecitations has broken copy of MCQ

    The MergeCitations batch tool had a cut-and-pasted code
    replicating MergeCitationQuery logic. Naturally, it diverged :-)
    Removed MergeCitations.Merge and use MergeCitationQuery instead.

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22969
4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22971
2013-08-30 22:43:57 +00:00
Nick Hall 21fd8f2cfb Fix regular expressions in sidebar filters
svn: r22967
2013-08-30 20:34:01 +00:00
Vassilii Khachaturov 8c3e4701d9 Finish merging bug# 6960 fix from trunk
I don't know why git diff didn't pick up citation.py :(

svn: r22963
2013-08-30 19:14:58 +00:00
Vassilii Khachaturov d9eab10013 6960: Error merging citations
Merge back to gramps40 my work on the bug fix.

svn: r22962
2013-08-30 19:00:39 +00:00
Vassilii Khachaturov dacf5f4d3b flags HAS_CLIMERGE and HAS_EXPORTRAW to skip tests
Reapply from trunk my commit r22948

svn: r22961
2013-08-30 19:00:23 +00:00
Nick Hall a474703187 6874: Use shorter names in add gramplet list. Remove old attributes gramplet.
svn: r22958
2013-08-30 18:09:35 +00:00
Nick Hall d1c0be81f8 6786: Invoke editor on double-click in backlinks gramplet
svn: r22955
2013-08-30 16:06:31 +00:00
John Ralls 1dc39d8c1c [r22949]Bug 7017 GUI stuck when external viewer launched
subprocess.checked_call seems to wait on the process that xdg-open
starts, but subprocess.wait doesn't.

svn: r22951
2013-08-29 23:31:33 +00:00
John Ralls 649c105536 [r22842]Clean up some leftovers from 22841
svn: r22950
2013-08-29 23:31:26 +00:00
Doug Blank 0880f52c44 Fix dbdjango to be up to date with bsddb of gramps40: added checksum for Media; SourceAttribute and CitationAttribute gained a private flag; all primary objects got tags
svn: r22946
2013-08-29 19:14:52 +00:00
Tim G L Lyons 1a1420b61d 0006849: citationtreeview with search bar only searches in sources, not citation data
0006848: citationtreeview corrupts when search bar open and edit occurs
0006829: Searching into source/citation selector disallows to select all related citations, only matching rows

by fixing treebasemodel so it properly deals with secondary objects, and also citationtreemodel so it adds secondary odes even when the parent is not present.

svn: r22940
2013-08-29 18:06:12 +00:00
Vassilii Khachaturov ca929cfb2f 6960: error merging citations
merge_ref_test still fails...

svn: r22937
2013-08-29 16:20:29 +00:00
Vassilii Khachaturov 0e3c01d6aa Back-merge the UT for gui.user as well
svn: r22934
2013-08-29 12:54:10 +00:00
Vassilii Khachaturov 207ed2434c 7021: pass ArgHandler.user to import_new_db
reapply r22929 from trunk

svn: r22933
2013-08-29 12:44:55 +00:00
Vassilii Khachaturov 0afdb2e361 7016: new cmdline switches -y/--yes and -q/--quiet
reapply r22916 from trunk

testing on gramps40: UT

svn: r22932
2013-08-29 12:41:31 +00:00
Vassilii Khachaturov 4bfb2e082c 7013: Impl. User.prompt based on QuestionDialog2
Reapply r22914 from trunk

Unit tests pass

svn: r22931
2013-08-29 12:35:18 +00:00
Doug Blank 3bec0ee5aa languages was set to a list; should be a :-separated string
svn: r22928
2013-08-29 01:19:58 +00:00
Doug Blank 92ef108c94 Move css, javascript and web images to data so that they can be found by webapp
svn: r22927
2013-08-28 23:51:42 +00:00
Nick Hall 322185b339 4735: Check for updates in a separate thread
svn: r22925
2013-08-28 23:34:20 +00:00
Doug Blank 26c3aa31d7 Changes for webapp to work with gramps40
svn: r22923
2013-08-28 23:08:21 +00:00
Doug Blank 196ad8feb7 7020: Date filtering fails to work on Family Events in 3.4.6 or 4.0.2; typo, missing 'not'; changed date before and after max to be 9999
svn: r22917
2013-08-28 11:52:48 +00:00
Vassilii Khachaturov 68ed5a2838 7009: endless exception loop starting w/o DISPLAY
constfunc.has_display() was using check_init(),
which, on Gtk3, was happy to initalize even that the display was N/A.
Amended the test with an attempt to actually get the Gdk default display.

svn: r22909
2013-08-22 22:39:31 +00:00
Vassilii Khachaturov 405db681a6 7009: endless exception loop starting w/o DISPLAY
Building testing ground for the bug investigation,
after reading the grampsgui.py code...

svn: r22908
2013-08-22 22:39:17 +00:00
Mirko Leonhäuser fc0749b359 updated german translation
svn: r22907
2013-08-22 17:20:25 +00:00
Nick Hall d78136bf7c Add date validation to filters
svn: r22904
2013-08-22 17:13:25 +00:00
Vassilii Khachaturov 1524c0b7e5 6878: CLI import/export plugins broken w/o DISPLAY
Replace a hardwired ProgressMeter with proper calls to User

Tested with impex.sh with and without DISPLAY env

svn: r22901
2013-08-21 18:54:21 +00:00
Vassilii Khachaturov 09d16526e9 6957: support gender in vcard import
forgotten merge cleanup

svn: r22900
2013-08-21 18:54:05 +00:00
Vassilii Khachaturov f92f5d08bf 6953: remove "undo history warning" under CLI
Port my fix from gramps34.
In addition, the Check tool now has a hardwired dependency
on ProgressMeter. Make a nullifying mock locally and
only set it to the real thing only under GUI.

Tested with impex.sh (further stages after check still fail,
see bug #6878).

svn: r22899
2013-08-21 17:24:41 +00:00
Vassilii Khachaturov 949c41107a action 'tool' CLI handler broken w/o DISPLAY
Preparing to port my fix for 6953: remove "undo history warning"
when the BatchTool run from cli (e.g., "check")
from gramps34, the ground state was worse in gramps40...

svn: r22898
2013-08-21 17:24:18 +00:00
Paul Franklin 0bba5fcfdb add and enable Greek date handler (from Zissis Papadopoulos)
svn: r22896
2013-08-21 16:55:05 +00:00
Vassilii Khachaturov 4d2ae8df74 6871: workaround gtk RTL bug in MultiTreeView
optimizing cleanup

svn: r22890
2013-08-21 07:32:23 +00:00
Vassilii Khachaturov 9ba12c2e33 6871: workaround gtk RTL bug in MultiTreeView
Blend of Nick's and my fix for the bug.

svn: r22887
2013-08-20 21:51:44 +00:00
Nick Hall a3a9542f0f Add datehandler unit test
svn: r22884
2013-08-20 19:46:40 +00:00
Nick Hall fd53fccf5e 6871: Remove vertical grid lines for RTL display
svn: r22882
2013-08-20 16:06:14 +00:00
Erik De Richter b09ab860b7 updated dutch translation
svn: r22874
2013-08-16 20:36:05 +00:00
Nick Hall 02ca10097a Simplify status bar and fix justification of filter status
svn: r22871
2013-08-15 22:08:12 +00:00
Paul Franklin 31e5815ea4 6998: Descendant Tree Report crashes gramps 4.0.2 svn 22863M
svn: r22868
2013-08-14 22:43:47 +00:00
Mirko Leonhäuser 524348a3d5 updated german translation
svn: r22866
2013-08-14 18:26:01 +00:00
Jérôme Rapinat 736b13c04f update Lithuanian translation (contribution by Mindaugas Baranauskas)
svn: r22864
2013-08-14 10:00:52 +00:00
Espen Berg ebf8dfa311 Revised Norwegian bokmål
svn: r22863
2013-08-13 20:38:25 +00:00
Nick Hall 8f7723308f Fix bug in note filters
svn: r22861
2013-08-13 18:39:28 +00:00
Nick Hall 342e6053df 6995: Fix bug in event citation filter
svn: r22858
2013-08-13 18:23:43 +00:00
Nick Hall 12fd97eaab Automatic update for old rules using regular expressions
svn: r22854
2013-08-11 14:12:24 +00:00
Vassilii Khachaturov 8e34bc809b 6909: Gedcom export adds birth place/date in death
_remaining_events method did the _dump_event_stats indiscriminately,
even if the event in question was skipped during processing as
a birth/death one. Moving the call into the _process_person_event
thus aligning the logic with _remaining_events's docstring.

svn: r22851
2013-08-11 13:32:34 +00:00
Paul Franklin f2c6833cfc give the graphvizdialog's format_str a more-unique name
(to help distinguish it from the name displayer's format_str)


svn: r22845
2013-08-10 18:37:38 +00:00
John Ralls 6a5d9aab86 [r22840]Consolidate mslocales and self._lang_map
into a single dict for easier maintenance

Thanks to Paul Franklin for suggesting it

svn: r22841
2013-08-09 22:19:16 +00:00
Nick Hall e4efaaa7b7 Remove redundant imports
svn: r22838
2013-08-09 21:36:57 +00:00
John Ralls ee076d2c91 [r22833]Fix crash when Gramps is passed an invalid locale
svn: r22836
2013-08-09 20:01:42 +00:00
John Ralls 82ea4e8685 [r22832]Ensure en_US encoding is UTF-8
svn: r22835
2013-08-09 20:01:37 +00:00
John Ralls 6473f22f17 [r22831]GrampsLocale:Add Greek and English to MSlocales
svn: r22834
2013-08-09 20:01:31 +00:00
Nick Hall e1cd73c4fb Convert old rules to use regular expression code in the base class
svn: r22829
2013-08-09 17:31:25 +00:00
Nick Hall 27cc9e4e6e Combine three new rules with existing rules
svn: r22827
2013-08-09 14:06:27 +00:00
Peter Landgren aab10936c0 Some Swedish updates.
svn: r22825
2013-08-09 12:52:52 +00:00
Nick Hall bbc73d6442 Add regular expressions to rules
svn: r22822
2013-08-08 22:51:03 +00:00
Nick Hall b54199d7d0 python3 fix
svn: r22820
2013-08-08 13:01:57 +00:00
Nick Hall 894701e2f2 Fix for Windows line separator
svn: r22818
2013-08-08 12:45:01 +00:00
Nick Hall fe98bbd6ff 6950: Add new rule for events with places matching filter
svn: r22815
2013-08-07 23:25:57 +00:00
Vassilii Khachaturov 5a6aa0d259 comment/docstring fixes
svn: r22812
2013-08-07 08:20:32 +00:00
Vassilii Khachaturov 76d17ca38d 6883: non-Western fonts broken in PS reports
Port my fix from gramps34 branch.
Ditches old PSDrawDoc code, instead we have a common backend
for PDF and PS generation using Cairo.
Added bonus: PS is now an available backend for text reports, too!

svn: r22810
2013-08-06 22:26:05 +00:00
Vassilii Khachaturov a145b8b8f2 Added tags file
svn: r22809
2013-08-06 22:25:52 +00:00
Nick Hall ceffc5750f Convert VCard unit tests to use ElementTree
svn: r22806
2013-08-06 18:47:27 +00:00
Jérôme Rapinat b2d09de02f update Lithuanian translation (contribution by Mindaugas Baranauskas)
svn: r22802
2013-08-06 10:29:26 +00:00
Nick Hall a2f01e1a7d 6969: Connect to switch-page signal after the initial gramplets have been added
svn: r22800
2013-08-05 18:35:32 +00:00
Nick Hall c075bea146 Close database files before removing them
svn: r22793
2013-08-03 16:46:10 +00:00
Nick Hall b4c1863683 Add unit test for latitide/longitude conversion
svn: r22791
2013-08-01 20:45:37 +00:00
Nick Hall df82eb9629 Convert callback test to use assert methods
svn: r22788
2013-07-31 20:11:47 +00:00
Nick Hall 0fd947e202 Add command to run unit tests from setup.py
svn: r22786
2013-07-31 18:21:33 +00:00
Nick Hall d07666ae91 Move rotate handler test
svn: r22784
2013-07-31 16:47:28 +00:00
Nick Hall c8c0164038 Unit test python3 fixes
svn: r22782
2013-07-30 22:06:29 +00:00
Nick Hall adb63c0c5e Fix date unit test
svn: r22780
2013-07-30 19:59:44 +00:00
Nick Hall 15538da4a1 Remove superfluous console output in unit tests
svn: r22778
2013-07-30 16:58:13 +00:00
Nick Hall cabbcead8f Remove redundant import
svn: r22776
2013-07-30 16:51:38 +00:00
Vassilii Khachaturov 66d3dde97a 6663: RecentFiles.do_save() doesn't do XML escape
ported my fix from gramps34, changes to gtk3 negligible

svn: r22774
2013-07-30 15:10:02 +00:00
Nick Hall 297e9906a9 Fix merge ref unit test
svn: r22771
2013-07-30 00:20:37 +00:00
Nick Hall 561886f41e Fix bug in unit test script
svn: r22769
2013-07-29 16:52:30 +00:00
Nick Hall 471b6beace Fix and move db unit tests
svn: r22767
2013-07-29 16:34:16 +00:00
Jérôme Rapinat dcd8757a77 .deb package more compliant according to Debian policy
svn: r22765
2013-07-29 16:28:34 +00:00
Vassilii Khachaturov 056d82895e 6957: VCF export/import should support [x-]gender
port from gramps34

svn: r22763
2013-07-29 08:53:08 +00:00
Nick Hall a9cad8c0d2 Convert db unit test to use unittest module
svn: r22760
2013-07-28 18:54:14 +00:00
Nick Hall d5eb5ec8f1 Fix and move keyword unit test
svn: r22758
2013-07-28 18:10:27 +00:00
Nick Hall 0f8ff56fbe Fix and move config unit test
svn: r22756
2013-07-28 17:33:55 +00:00
Nick Hall b7c5c77676 Fix and move CLI unit test
svn: r22754
2013-07-28 16:20:14 +00:00
Nick Hall 183e985747 Fix unit tests
svn: r22752
2013-07-28 14:57:22 +00:00
Nick Hall d6ff126d5a 6954: Output command line messages and progress information to stderr rather than stdout
svn: r22750
2013-07-28 14:21:43 +00:00
Vassilii Khachaturov 62ca742313 6951: import/export test suite runner broken
Ported from gramps34 my commits r22744,5.
Adjusted for gramps40 path layout changes.

svn: r22746
2013-07-28 13:50:03 +00:00
Vassilii Khachaturov fa21fde40c 6952: in RU locale, gramps --help is wrong for -u
svn: r22742
2013-07-28 09:47:52 +00:00
Paul Franklin e15963f9f6 6946: global name 'UNITYPE' is not defined - can't open old database
svn: r22738
2013-07-26 19:12:55 +00:00
Paul Franklin ca7ca5bc8d show more LDS temples on the screen
svn: r22735
2013-07-24 19:11:56 +00:00
Paul Franklin 9fa2057154 6872: wrong size of svg image in Family Lines Graph
svn: r22732
2013-07-24 16:27:09 +00:00
Vassilii Khachaturov 32b559c623 Reviving RunAllTests.py on gramps40/trunk
Porting from gramps34 my fix for 6935, 6937, 6938.

Import with full "gramps." qualification from the tests,
to overcome the relative import problem (see bug# 6938 for context).

All testing code has been adjusted to the filename and paths
changes since gramps34.
Same as on gramps34, one test fails still, will investigate if
it is a test or a code bug:
    ERROR: test_buffer_recall
    (ErrorReportAssistant_Test.ErrorReportAssistantTest)
    Test that simple recall of messages works.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "./GrampsLogger/ErrorReportAssistant_Test.py", line 60, in
    test_buffer_recall
        rotate_handler=rh)
      File "../gramps/gui/logger/_errorreportassistant.py", line 81, in
    __init__
        self.build_page1()
      File "../gramps/gui/logger/_errorreportassistant.py", line 267, in
    build_page1
        self._reset_error_details()
      File "../gramps/gui/logger/_errorreportassistant.py", line 178, in
    _reset_error_details
        self._error_detail.get_record()))
    AttributeError: 'str' object has no attribute 'get_record'

svn: r22729
2013-07-24 06:23:33 +00:00
Paul Franklin b5b6a59f4f CLI --config values should be enterable in gramps.ini form (e.g. 0 or 1)
svn: r22727
2013-07-24 00:01:12 +00:00
Mirko Leonhäuser 8da09bd9f3 updated german translation
svn: r22725
2013-07-23 16:34:12 +00:00
Vassilii Khachaturov e880bd9e10 6936: spelling and other fixes in RU rel calc
svn: r22721
2013-07-22 21:03:45 +00:00
Vassilii Khachaturov 88092e89eb 6932: check for broken GTK install on linux only
svn: r22716
2013-07-22 12:00:31 +00:00
Peter Landgren d71131840f Translated three new strings.
svn: r22715
2013-07-22 09:09:47 +00:00
Paul Franklin ff667d774f add the missing import to the 3139 fix I added, sigh
svn: r22712
2013-07-21 20:48:45 +00:00
John Ralls 7922f1ad61 [r22710]GrampsLocale: Don't set to 'C' if LANG is en_US
Not required, Gtk has an 'en' translation

Ref. http://www.gramps-project.org/bugs/view.php?id=6867

svn: r22711
2013-07-21 20:24:40 +00:00
Paul Franklin 7d9f42dc90 3139: boolean command line options have to be specified as foo=true ...
The solution was suggested by Doug Blank.


svn: r22708
2013-07-21 20:04:05 +00:00
John Ralls 127567278e [r22705]Bug 6928: Windows: If LANG not equal en_GB Graphic Reports
in some cases produce empty PDF sheets or force graphviz to crash

Problem was due to calling localized float() when parsing a C-locale xml file

svn: r22706
2013-07-21 19:28:20 +00:00
Vassilii Khachaturov 7301dccc55 2974: .rtf docgen doesn't escape backslashes
svn: r22703
2013-07-21 11:08:38 +00:00
Vassilii Khachaturov 1f90437ca3 6864: change warning to a more user-friendly one
s/Gramps ignored namemap value/Gramps ignored a name grouping/g

svn: r22700
2013-07-21 06:57:33 +00:00
Vassilii Khachaturov 4e0cad08b2 6884: RTF reports broken for intl chars
Re-applied my fix from trunk

svn: r22697
2013-07-20 16:33:14 +00:00
Mirko Leonhäuser 0f86ee2044 updated german translation
svn: r22693
2013-07-17 18:04:04 +00:00
Vassilii Khachaturov 3eb71e18a7 6915: not related tool treats siblings as not rel.
Applied patch from ennoborg, thanks!
(merge from trunk)

svn: r22691
2013-07-16 17:21:33 +00:00
Vassilii Khachaturov 8eed4a3d0d 6923: runtest.sh broken in gramps40/trunk
Merged fix from trunk:
    Fixed the file locations to work for the gramps40/trunk layout.

    Also porting my fix from gramps34 branch for
    6837: runtest.sh runs some reports that no longer exist

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22684 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22686
2013-07-16 11:21:07 +00:00
Vassilii Khachaturov 6e895bacf4 6867: warn on gtk translation missing
Merge the fix from trunk:
    Give a dev-oriented warning on console and pop up a UI
    warning dialog for the user, when an inconsistent
    translation configuration is detected between gramps and gtk
    (happens when a langpack is missing on Ubuntu systems, e.g.)

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22683 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22685
2013-07-16 11:20:56 +00:00
Paul Franklin b5c3cf70ea 6922: Export gpkg crashes in svn 22654M
svn: r22681
2013-07-15 18:37:50 +00:00
Serge Noiraud 66b9e798ed Bug #6917 : Gtk2 to Gtk3 port of colorsel to get_color_selection()
svn: r22679
2013-07-14 12:25:02 +00:00
Paul Franklin 6a45bc4a40 revert the Finnish date-format change (remove the four I added)
svn: r22677
2013-07-13 20:56:24 +00:00
Paul Franklin a8307d21aa correct the Finnish date-format choices (add the other four)
svn: r22674
2013-07-13 20:02:32 +00:00
Paul Franklin 666f6d5b1a added and/or clarified various date handler comments
also slightly reformatted a few date handler lines
and fixed one (locale-specific) date handler typo


svn: r22671
2013-07-13 18:00:38 +00:00
Mirko Leonhäuser 9f37049777 updated german translation
svn: r22668
2013-07-09 17:16:28 +00:00
Paul Franklin ad79a3f1bb standardize date handler's internal argument names, for easier comparisons
svn: r22666
2013-07-09 01:31:42 +00:00
Paul Franklin a3b7807233 ignore bad Record Gramplet/Report data (the data-verification tool catches them)
svn: r22663
2013-07-08 21:52:38 +00:00
Peter Landgren bdc77e74ab Update after some user input.
svn: r22659
2013-07-08 11:27:21 +00:00
Paul Franklin 4e00345ff6 Span maximums and minimums must always be positive numbers
svn: r22656
2013-07-08 01:44:17 +00:00
Serge Noiraud 485798010d Geography : add Id property to cairoprint.py
svn: r22654
2013-07-05 18:08:30 +00:00
Serge Noiraud 99e0bd6c42 Geography : add printing functionality for all geography views.
svn: r22651
2013-07-05 17:30:41 +00:00
Mirko Leonhäuser 214132889a updated german translation
svn: r22648
2013-07-03 21:32:43 +00:00
Doug Blank ca5d0f39a5 Undo changes for 6878
svn: r22646
2013-07-03 20:23:01 +00:00
Doug Blank d79cf3a9dc 6081: Crash after double-click on .gpkg file
svn: r22644
2013-07-03 12:54:42 +00:00
Doug Blank cb2621e73c 6878: Running CLI options when DISPLAY not set barfs
svn: r22641
2013-07-03 01:09:15 +00:00
Paul Franklin 94e161cff1 6818: Enable Relationships support on RelationshipGraph (GraphViz)
svn: r22637
2013-07-01 16:59:30 +00:00
Benny Malengier 5578efc16c GTK3 wants to deprecate unicode menu
svn: r22635
2013-07-01 08:42:22 +00:00
Paul Franklin 7b67220a4f make sure relationship calculator's relationships are in the UI language
svn: r22632
2013-06-30 17:51:55 +00:00
Benny Malengier f64e256bcb 6807: validatedmaskedentry: no attribute '_block_changed'
svn: r22631
2013-06-30 15:52:18 +00:00
Benny Malengier 8232f4ee4d GTK3: make sure menu shows up
svn: r22629
2013-06-30 13:41:29 +00:00
Benny Malengier f892473c24 GTK 3.9 removes unicode-menu
svn: r22626
2013-06-30 07:54:21 +00:00
Mirko Leonhäuser 3231d71fd1 updated german translation
svn: r22625
2013-06-29 00:33:03 +00:00
Paul Franklin cab8525520 enable suppression of two minor missing-package warnings
svn: r22623
2013-06-28 17:53:19 +00:00
Nick Hall 10be3da71f 6841: Fix RTL text style bug
svn: r22617
2013-06-27 13:08:16 +00:00
Benny Malengier 66b6683a4a 6848: citationtreeview corrupts when search bar open and edit occurs
svn: r22609
2013-06-25 22:10:51 +00:00
Benny Malengier a23408c7a5 In case of errors with fg_color, enormous amount of error messages. This patch
grabs wrong fg_color, and skips action, avoiding the error messages. Error goes to debug.


svn: r22608
2013-06-25 22:07:43 +00:00
Benny Malengier fdc766db72 avoid critical gdk error by processing events only when window visible :
Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed


svn: r22607
2013-06-25 22:06:32 +00:00
Paul Franklin 58fdfa622b added GPL "boilerplate", SVN properties, and SVN Id line as needed
svn: r22597
2013-06-24 19:30:56 +00:00
Vassilii Khachaturov e3f6ed1f17 6838: report cli crash ignoring unknown param
Port my fix from gramps34

svn: r22595
2013-06-24 18:14:42 +00:00
John Ralls c3b82c944e Update for Gramps-4.0.1
svn: r22594
2013-06-24 18:14:11 +00:00
Peter Landgren 0d70aae90e Fixed some fuzzy strings.
svn: r22590
2013-06-24 12:49:24 +00:00
Vassilii Khachaturov f6a473ed51 std propset for a new file.
svn: r22589
2013-06-24 12:23:30 +00:00
Vassilii Khachaturov 71abad6b6a 4571: RTL support in fanchart
Merge my work on trunk to gramps40 now that 4.0.1 is out,
as this fix is targeted for 4.0.2.

svn: r22588
2013-06-24 12:12:41 +00:00
Jérôme Rapinat eb1c153280 bump to 4.0.2
svn: r22587
2013-06-24 10:18:17 +00:00
Jérôme Rapinat 927e27ec4a ready for 4.0.1
svn: r22585
2013-06-24 09:10:05 +00:00
Jérôme Rapinat 5e76adbb02 better wording
svn: r22584
2013-06-24 08:53:08 +00:00
Erik De Richter a376e81052 updated dutch translation
svn: r22583
2013-06-24 07:41:33 +00:00
Paul Franklin 889c036804 make sure relationship calculator tool's relationships are in the UI language
svn: r22580
2013-06-24 01:59:06 +00:00
Paul Franklin 163696883c neaten top gramps40 ar.po lines
svn: r22579
2013-06-24 01:55:35 +00:00
John Ralls 4e4c119f9f [r22576]Move the HTML resources from gramps/plugins/webstuff
To data and images so that they're together with the other resources
instead of in site-package/gramps. Aside from a better source and
installation layout, this makes it easier to bundle them.

svn: r22577
2013-06-23 23:13:13 +00:00
Vassilii Khachaturov 00ab1b1337 6740: root cursor corruption
back-port from trunk, after successful retest by Nick

svn: r22574
2013-06-23 19:33:00 +00:00
Paul Franklin e2b6f1cfef added SVN Id property, and SVN Id line if needed
svn: r22573
2013-06-23 17:59:40 +00:00
Mirko Leonhäuser eed914c638 updated german translation
svn: r22570
2013-06-23 12:27:45 +00:00
Jérôme Rapinat 1fd8ee9346 add Ukrainian relationship calculator (by Fedir)
svn: r22568
2013-06-23 10:22:03 +00:00
Jérôme Rapinat e769b8bef1 support Arabic on installation
svn: r22564
2013-06-23 09:08:18 +00:00
Jérôme Rapinat b4b3f8a1b0 enable Arabic support on lang_map (reports)
svn: r22563
2013-06-23 09:04:36 +00:00
Jérôme Rapinat ba11af72ac enable Ukrainian date handler (by Fedir)
svn: r22562
2013-06-23 08:54:17 +00:00
Jérôme Rapinat d24df59b1a update arabic translation (by Muhammad Bashir Al-Noimi)
svn: r22561
2013-06-23 08:52:04 +00:00
Jérôme Rapinat f808f35bd8 do not limit family's actors to mother and father, no relation between age of the person and child
svn: r22560
2013-06-23 08:43:46 +00:00
Julio Sánchez 78f34ebb5d Updated
svn: r22559
2013-06-23 07:15:31 +00:00
Nick Hall d0c7697b0e 6814: Fix gramplet positioning when using RTL locale
svn: r22556
2013-06-22 21:00:55 +00:00
Jérôme Rapinat 27764eddee new translation strings
svn: r22551
2013-06-21 17:30:18 +00:00
Mirko Leonhäuser 28a66e2e58 updated german translation
svn: r22546
2013-06-20 16:59:22 +00:00
Tim G L Lyons 66c6b85518 0006352: Bookmarking a source in the citation tree creates a blank bookmark. Disallow bookmarking a source in the Citation Tree View, and do not add sources to the history in the Citation Tree View.
svn: r22544
2013-06-20 16:43:24 +00:00
Paul Franklin 40f793f558 6821: CLI asks forever when trying to overwrite while exporting
svn: r22541
2013-06-20 16:34:00 +00:00
Jérôme Rapinat 5896d46bf2 6817: print should be now a function
svn: r22536
2013-06-20 14:26:31 +00:00
Jérôme Rapinat 81ca53e11c 6817: Enhancements for testing localized Relationship handlers (contribution by Fedir)
svn: r22534
2013-06-20 10:04:37 +00:00
Vassilii Khachaturov 2ed3878493 RU translation update
Merge from trunk, in preparation for 4.0.1 release.

svn: r22533
2013-06-20 10:02:03 +00:00
Jérôme Rapinat f60bc1fc8a updated Hungarian translation (by Lajos Nemeséri)
svn: r22531
2013-06-20 07:55:42 +00:00
Jérôme Rapinat aeeb1a3d72 Add Ukrainian holidays (contributions by Fedir)
svn: r22528
2013-06-20 07:20:31 +00:00
Vassilii Khachaturov 00eeea87ea Ported my fix for 6812 to gtk3
svn: r22524
2013-06-19 20:23:36 +00:00
Vassilii Khachaturov 4a6ee4567a Merge trunk ru.po and resolve fuzzies.
Merged as follows:
  msgmerge --no-wrap -C ru.po.trunk ru.po gramps.pot -o newru.po
Then resolved all fuzzy strings.

Thanks to Paul Franklin for prodding me so the current new
translations from the trunk available "for free" are included
on gramps40 as well!

svn: r22523
2013-06-19 20:23:26 +00:00
Vassilii Khachaturov 2091c7d30e test commit
testing my git/svn setup for gramps40

svn: r22522
2013-06-19 20:23:14 +00:00
Benny Malengier e3057fbcfc GTK3: convert deprecated code for the indicator in entryfield
svn: r22517
2013-06-19 06:55:44 +00:00
Fedik b9ffeb1e4a uk translation uptade
svn: r22509
2013-06-14 14:31:13 +00:00
Fedik 73d964ef2d uk translation uptade
svn: r22506
2013-06-14 08:51:24 +00:00
Paul Franklin 4bc36d85d3 6797: Alternate Names in Person Details Gramplet (patch by Heinz Brinker)
svn: r22504
2013-06-13 21:34:37 +00:00
Tim G L Lyons 023528e9cd 0000860: GEDCOM: Space in gramps id fails to properly export/import
svn: r22500
2013-06-13 18:06:33 +00:00
Fedik 85c0f37905 uk translation uptade
svn: r22497
2013-06-12 16:10:57 +00:00
Vassilii Khachaturov 0ec43c2441 Merge trunk ru.po and resolve fuzzies.
Merged as follows:
  msgmerge --no-wrap -C ru.po.trunk ru.po gramps.pot -o newru.po
Then resolved all fuzzy strings.

Thanks to Paul Franklin for prodding me so the current new
translations from the trunk available "for free" are included
on gramps40 as well!

svn: r22491
2013-06-11 10:51:01 +00:00
Vassilii Khachaturov 84b606a28e test commit
testing my git/svn setup for gramps40

svn: r22490
2013-06-11 10:07:39 +00:00
Serge Noiraud 4aa86a82f3 Geography : Gtk.Menu didn't work with gtk3.
svn: r22487
2013-06-10 20:42:29 +00:00
Paul Franklin 3c4fdbb9ae add "Id" line, and license line, to nl.po
svn: r22479
2013-06-04 21:23:15 +00:00
Erik De Richter 766c5b8eb4 updated dutch translation
svn: r22478
2013-06-04 18:43:31 +00:00
Paul Franklin d6b74db6e4 add some more names to data.gramps (more modern: divorces, etc.)
svn: r22475
2013-06-03 20:17:24 +00:00
Fedik 79ffa1145b uk translation uptade
svn: r22470
2013-06-02 10:50:58 +00:00
Erik De Richter b68ba08c65 updated dutch translation
svn: r22465
2013-05-31 19:26:54 +00:00
Zdenek Hatas 147adf3160 minor fixes
svn: r22460
2013-05-31 12:25:03 +00:00
Espen Berg dde8d5033d Some more revision of Norwegian bokmål
svn: r22458
2013-05-30 20:01:39 +00:00
Paul Franklin 4dfd6d7ad4 6058: Ambiguous pdf output file format values [fix by Peter]
(this was already fixed in gramps34 20445)


svn: r22447
2013-05-28 20:52:38 +00:00
Benny Malengier 0acc25953d GTK3: menu needs to survive function scope
svn: r22446
2013-05-28 15:32:24 +00:00
Paul Franklin 960787a33c add "Id" property, and "Id" line, and license line, if any were needed
svn: r22434
2013-05-27 19:31:49 +00:00
John Ralls e2ee60e243 [r22431]Remove extra Id line from maclocale.py
svn: r22432
2013-05-27 17:53:46 +00:00
Benny Malengier db4b8ff004 Fix bad scaling in address editor
svn: r22425
2013-05-26 19:36:59 +00:00
Benny Malengier fe318d77c3 6777: Crash on export to GEDCOM when there are addresses
svn: r22424
2013-05-26 19:31:44 +00:00
Paul Franklin 9e38800c97 6769: gramps crash for ancestor chart report
svn: r22421
2013-05-26 18:39:50 +00:00
John Ralls 546881c640 [r22417]Bugs 6099 & 6472: Don't leave zombies and report errors
Update spawnve() to subprocess.check_output()
Pop an ErrorDialog if the system's open command fails in
open_file_with_default_application()

svn: r22418
2013-05-24 23:39:17 +00:00
Paul Franklin 9f81ba6a54 revert change here, leave it in trunk
svn: r22416
2013-05-24 01:19:28 +00:00
Paul Franklin f99dfec5bc fix string FIXME, add context for translation, as string freeze is over
svn: r22414
2013-05-23 17:20:19 +00:00
Benny Malengier d32a91ed90 6724: Person selected jumps forward to next person inlist
svn: r22412
2013-05-22 21:23:36 +00:00
Benny Malengier c15d9a9249 6670: Some entries into tips.xml are increasing size of the 'Tip of the day' dialog
svn: r22409
2013-05-22 11:59:26 +00:00
Benny Malengier fb6ce753e8 6325: Cannot right-click on tables in Quick Views
svn: r22407
2013-05-22 11:07:46 +00:00
John Ralls 033c551cf2 Mac: Update Info.plist for 4.0.0 release
svn: r22399
2013-05-21 21:41:21 +00:00
John Ralls 7ca312c302 image paths and resource-path file
svn: r22398
2013-05-21 21:40:52 +00:00
John Ralls 5ec7f02a1d Fix osm-gps-map revision
svn: r22397
2013-05-21 21:32:04 +00:00
Espen Berg 6de4ac83b8 Some revision of Norwegian bokmål
svn: r22396
2013-05-21 20:53:28 +00:00
John Ralls aacf6106ab Fix bad filename on Gramps URL
svn: r22395
2013-05-21 19:03:44 +00:00
Espen Berg df05060a4d Some revision of Norwegian bokmål
svn: r22393
2013-05-21 18:23:04 +00:00
Paul Franklin 7992928798 1780: End of Line Report options window - changing Output Format cause change active tab to "report options"
This also happens on every other report, of course.
(This has already been committed to trunk and gramps34.)


svn: r22392
2013-05-21 17:41:23 +00:00
Paul Franklin 6868c08ba7 don't start a GraphViz report on the "Paper Options" tab
None of the other reports start on the "Paper Options" tab.
(This has already been committed to trunk and gramps34.)


svn: r22391
2013-05-21 17:36:14 +00:00
Fedik dd8de1d537 small uptades
svn: r22389
2013-05-21 15:20:22 +00:00
Jérôme Rapinat 87ebfaffa3 bump to 4.0.1
svn: r22388
2013-05-21 12:58:58 +00:00
Jérôme Rapinat 003de23ded 6403: update Russian translation, some labels (glade3) from trunk limit markup usage
svn: r22385
2013-05-21 09:35:21 +00:00
Jérôme Rapinat 1b58e7cd8a road to 4.0.0
svn: r22384
2013-05-21 09:15:43 +00:00
Jérôme Rapinat 18c3ac1bf0 update Polish translation (by Lukasz)
svn: r22383
2013-05-21 08:58:59 +00:00
Jérôme Rapinat 073b302687 merge content of russian translations for 3.4.x and trunk (Vassilii)
svn: r22382
2013-05-21 08:39:43 +00:00
Benny Malengier 2ed14d4929 6754: Gramps Python 2.7 close when chosing a place by typing the place name in the list
svn: r22381
2013-05-20 19:26:40 +00:00
Erik De Richter 1454474289 updated dutch translation
svn: r22379
2013-05-19 19:29:02 +00:00
Espen Berg 6b42681b08 Some revision of Norwegian bokmål
svn: r22378
2013-05-19 17:36:17 +00:00
Espen Berg 8716b87689 Some revision of Norwegian bokmål
svn: r22374
2013-05-19 15:49:58 +00:00
Jérôme Rapinat e87e28501e update french translation, one of these remaining messages looks complicated, need to ask to the devel list after release...
svn: r22373
2013-05-19 14:03:25 +00:00
John Ralls 7d121e8963 Update gramps40 gramps.modules to match gramps-svn
svn: r22371
2013-05-18 22:07:02 +00:00
John Ralls 3f375261f3 Remove superfluous GRAMPSI18N from gramps-40 gramps.launcher
svn: r22370
2013-05-18 22:06:30 +00:00
Nick Hall 4ab32f3b10 Update English (GB) translation
svn: r22369
2013-05-18 21:10:35 +00:00
Peter Landgren 326f5c80c3 Fixed a minor typo.
svn: r22368
2013-05-18 17:19:43 +00:00
Jérôme Rapinat 8faa02c176 add Ukrainian date handler to SVN for testing, not enabled yet (__init__.py), contribution by Fedir Zinchuk
svn: r22366
2013-05-18 15:24:49 +00:00
Jérôme Rapinat a741d87c2e update Slovak translation (by Lubo Vasko)
svn: r22365
2013-05-18 15:18:01 +00:00
Julio Sánchez 5f2ab46f2a Updated to new gramps.pot
svn: r22364
2013-05-18 14:10:14 +00:00
Jérôme Rapinat c826d6c0d7 various reviews from 3.4.x
svn: r22362
2013-05-18 06:57:05 +00:00
John Ralls 8040ce0ebd GrampsLocale: Disable debug logging for release
svn: r22360
2013-05-17 18:11:58 +00:00
Jérôme Rapinat 6f4b479b3f merge more recent content from 3.4.x
svn: r22359
2013-05-17 16:20:34 +00:00
Jérôme Rapinat 1de1e10659 merge more recent content from 3.4.x
svn: r22356
2013-05-17 16:03:18 +00:00
Jérôme Rapinat 6c67f25eb6 merge some entries from up-to-date Slovak translation (3.4.4); waiting for a review
svn: r22352
2013-05-17 15:17:07 +00:00
Jérôme Rapinat 9771ed0f34 merge some translation files with last template
svn: r22351
2013-05-17 15:03:46 +00:00
Jérôme Rapinat a02ef0fc8e new translation string (related to gedcom)
svn: r22350
2013-05-17 13:57:00 +00:00
Jérôme Rapinat 990ba0457e 6749: 'msgid' and 'msgstr' entries do not both begin with '\n'
svn: r22349
2013-05-17 13:15:03 +00:00
Zdenek Hatas e40ce4c76f czech translation update
svn: r22348
2013-05-17 13:14:09 +00:00
Jérôme Rapinat 6c196cdfe6 merge with last template
svn: r22346
2013-05-17 12:53:19 +00:00
Tim G L Lyons 64e0ed1e31 0006746: Problem in Portable version immediately after upgrading to 3.4.4-1 from 3.3.1.1
svn: r22344
2013-05-17 11:29:51 +00:00
Zdenek Hatas 2899990d1b czech translation update
svn: r22342
2013-05-17 09:50:47 +00:00
Jérôme Rapinat f97e8ef621 6750: patch Danish translation (by Lars Kristian Lundin)
svn: r22341
2013-05-17 09:10:36 +00:00
Jérôme Rapinat 822c267e0c 6749: too many errors, revert to rev22308
svn: r22340
2013-05-17 08:57:50 +00:00
Jérôme Rapinat 5f70dd3af6 6749: remaining one...
svn: r22339
2013-05-17 08:51:13 +00:00
Jérôme Rapinat 3dad5a32b4 6749: remove remaining patching lines
svn: r22338
2013-05-17 08:49:50 +00:00
Jérôme Rapinat 4b69296158 6749: conflicts on header
svn: r22337
2013-05-17 08:47:34 +00:00
Jérôme Rapinat e577b1569d 6749: 'msgid' and 'msgstr' entries do not both begin with '\n'
svn: r22336
2013-05-17 08:45:36 +00:00
Jérôme Rapinat 18cbf82142 6749: conflicts on the Dutch translation (thank you Harmen)
svn: r22335
2013-05-17 08:42:22 +00:00
Julio Sánchez 15cb5c8565 Minor fixes.
svn: r22331
2013-05-16 21:29:19 +00:00
Erik De Richter f1a0a703bc updated nl translation
svn: r22330
2013-05-16 21:19:33 +00:00
Zdenek Hatas b3237e146b czech translation update
svn: r22325
2013-05-16 13:33:28 +00:00
Julio Sánchez f524528cdc Updated for 4.0
svn: r22323
2013-05-16 09:59:05 +00:00
Espen Berg cf8341a8a6 Updated nb.po
svn: r22322
2013-05-15 21:08:31 +00:00
Jérôme Rapinat 57411ab25e typo (thank you zissis)
svn: r22319
2013-05-15 19:06:06 +00:00
Jérôme Rapinat ccad231d43 update Greek translation (by Zissis Papadopoulos)
svn: r22318
2013-05-15 19:01:38 +00:00
Jérôme Rapinat 5d6a47be90 update Polish translation (by yenidai)
svn: r22317
2013-05-15 18:57:29 +00:00
Erik De Richter c7071bd9dd updated dutch translation
svn: r22315
2013-05-15 18:07:15 +00:00
Erik De Richter 77ea97d533 updated nl translation
svn: r22308
2013-05-14 18:33:47 +00:00
Erik De Richter 1d2232bf47 updated nl translation
svn: r22307
2013-05-14 18:32:34 +00:00
Nick Hall c6ce33c35a Fix ListModel double click event
svn: r22305
2013-05-14 18:13:15 +00:00
Mirko Leonhäuser 4349a4d675 updated german translation
svn: r22303
2013-05-14 17:17:26 +00:00
Tim G L Lyons 45a5a85963 0006541: Gramps crashes during import gedcom. Ignore empty ALIA alias name.
svn: r22297
2013-05-14 15:42:28 +00:00
Tim G L Lyons a6e318a53a 0006394: GEDCOM import errors truncated too much. Error message extended to 66 chars as suggested (and continuation lines formatted to fall under initial line)
svn: r22294
2013-05-14 15:02:30 +00:00
Jérôme Rapinat d3b706d1ff update template via intltool
svn: r22292
2013-05-14 08:12:07 +00:00
Joan Creus b3b6899424 Translation update
svn: r22290
2013-05-13 23:51:50 +00:00
Tim G L Lyons 39af1b9f6c Encoding error in date parsing literals
svn: r22289
2013-05-13 23:12:34 +00:00
Tim G L Lyons 22fc9958e6 0006195: Import from pro-gen. Fix citations and sources. Also other fixes: Attach SOUR TEXT as note on citation. Ensure gramps_ids are not duplicated (change map record so it maps from Pro-Gen ID to handle), and format gramps_id according to the user's preference setting. Store 'aktenr' as REFN attribute or data. Store TITL (and _TITL2 and _TITL3) as comma separated Title. Store patronymic correctly. Prevent duplication of Baptism source text. Store RESI event for person address. Store family 'Relatie code' (FAM REFN/FAM CODE) as REFN. Note testing is limited by availability of test data.
svn: r22286
2013-05-13 23:04:52 +00:00
Paul Franklin 991740e333 any documentation is better than none
svn: r22284
2013-05-13 22:37:59 +00:00
Erik De Richter 2cca179793 updated nl translation
svn: r22281
2013-05-13 18:25:52 +00:00
Serge Noiraud 892eccf251 Geography : bug #6718 : The active place must have valid coordinates to set center and zoom.
svn: r22280
2013-05-13 16:51:33 +00:00
Zdenek Hatas 2e60dae5db czech translation update
svn: r22278
2013-05-13 13:18:04 +00:00
Jérôme Rapinat 219ca05113 upgrade to last stable schema (citation object)
svn: r22277
2013-05-13 13:01:48 +00:00
Fedik 90687fed1b small translation and uptades
svn: r22275
2013-05-13 12:03:24 +00:00
Paul Franklin f3acd4808c add name-format option and enable translated output for this report
svn: r22271
2013-05-12 22:34:41 +00:00
Tim G L Lyons c5703feb8d 0006515: Error building narrated web
Circular references (either direct or indirect) involving media->citation->media or media->citation->source->media cause NarrativeWeb to crash with "maximum recursion depth exceeded". Fix NarrativeWeb when constructing list of objects to be output by checking whether a media object has already been encountered.

Also fixes
0006418: Navweb crashes alpha4
0006630: Export Erzählende Webseite
0006643: Crash during making webstek report
0006652: [NarrativeWeb] Circular References lead to endless recursion (crash)
0006654: Unable to created narrated web report

svn: r22269
2013-05-12 16:44:47 +00:00
Jérôme Rapinat 91ca39af06 use "langue" instead of "traduction" as label into report dialog
svn: r22267
2013-05-12 08:54:45 +00:00
Mirko Leonhäuser 6ce41cb21a updated german translation
svn: r22265
2013-05-12 01:17:15 +00:00
Paul Franklin 5bf3a88dd6 enable translated output for this report
svn: r22262
2013-05-11 19:21:55 +00:00
Paul Franklin 25047a6918 more deferred translation for the relationship calculator
This enables it for spouse strings, which are done in the
main gen/relationship.py relationship calculator and not in
one of the language-specific relationship calculators


svn: r22260
2013-05-11 19:19:52 +00:00
Benny Malengier 04e7df5425 6580: Merging Media Notes fails
svn: r22259
2013-05-11 17:43:53 +00:00
Jérôme Rapinat 1d63127e5c update french translation
svn: r22256
2013-05-11 12:36:14 +00:00
Jérôme Rapinat 516ce38a54 update template
svn: r22255
2013-05-11 12:28:12 +00:00
Benny Malengier fa41eaf6a3 6716: Add extra surname, on tab away from field, value is not stored
svn: r22254
2013-05-11 12:07:18 +00:00
Erik De Richter 53512286d8 updated dutch translation
svn: r22249
2013-05-10 18:55:45 +00:00
Paul Franklin b9ebcb13d5 move five files with translatable strings out of POTFILES.skip
svn: r22246
2013-05-10 17:01:29 +00:00
Benny Malengier 3d23affc8a 6665: New errors when using pygobject 3.8: Cannot get n_columns on flatbasemodel
svn: r22244
2013-05-10 15:59:03 +00:00
Tim G L Lyons 83ebd2658b 0006713: Databases written with pickle protocol 3 (Python3) should not be opened with pickle protocol 2 (Python2). Also give warning when about to upgrade a Python2 database to Python3.
svn: r22242
2013-05-10 14:37:14 +00:00
Peter Landgren 670c47d9d9 Translation update after fix of POTFILES.
svn: r22240
2013-05-10 13:03:53 +00:00
Tim G L Lyons 1ac29c6e76 Fix to incorrect svn merge in commit 22218 see 0006686: Wrong bsddb upgrade message given
svn: r22237
2013-05-10 09:25:01 +00:00
Nick Hall 457d1b38a8 Fix scroll to mark bug on added page
svn: r22235
2013-05-10 00:07:06 +00:00
Nick Hall 7611cacc13 Simple table fix for numneric and checkbox columns
svn: r22233
2013-05-09 23:52:47 +00:00
Paul Franklin 26b785b3e8 defer translation for one more date, and cleanup translation
svn: r22231
2013-05-09 22:25:55 +00:00
Nick Hall fca6091ebd Convert numeric columns to unicode in simple table
svn: r22229
2013-05-09 21:47:29 +00:00
Benny Malengier 1118476e38 6259: Harcoded 'raw' characters into listing files are not properly displayed into Addons dialog
Gramps-addons listings has been fixed needing this change to have this working


svn: r22227
2013-05-09 20:41:41 +00:00
John Ralls 91a30eaaed [r22225]Fix path left over from debugging session
svn: r22226
2013-05-09 19:36:34 +00:00
Jérôme Rapinat 4abb1fb142 6529: new messages, cancelling database upgrade can corrupt the database
svn: r22224
2013-05-09 19:05:49 +00:00
Jérôme Rapinat 1e03f28138 6529: Cancelling database upgrade can corrupt the database
svn: r22223
2013-05-09 18:54:22 +00:00
Tim G L Lyons ff01477003 0006529: Cancelling database upgrade can corrupt the database. Ensure database is unlocked when cancelling upgrade. Make links in dialogues into clickable hyper-links. Ensure dialogue windows stays on top. Reword warning and error messages to use Bsddb version, schema version and Family Tree consistently, to be clearer about the choice the user is being offered, and to provide hyper-links to more information.
svn: r22218
2013-05-09 17:24:08 +00:00
Paul Franklin e795d5e7f8 enable deferred translation for this Span representation
svn: r22215
2013-05-09 17:04:31 +00:00
Jérôme Rapinat 2f0788f709 6706: odstab docgen was listed twice
svn: r22214
2013-05-09 10:53:30 +00:00
Jérôme Rapinat 58bb9dd6d4 6706: qml modules do not need translation yet
svn: r22212
2013-05-09 10:43:48 +00:00
Jérôme Rapinat 0ead3ea145 6706: some translation messages were missing, update template and french translation, add better comments on POTFILES.skip
svn: r22211
2013-05-09 10:33:11 +00:00
Jérôme Rapinat 0bb8426e64 6706: update POTFILES.in POTFILES.skip
svn: r22209
2013-05-09 07:38:25 +00:00
Paul Franklin 086732a6b4 enable translated output for this report
svn: r22207
2013-05-09 05:03:30 +00:00
Paul Franklin 0fb88fb531 enable deferred translation for a Span representation
svn: r22205
2013-05-09 05:01:27 +00:00
Jérôme Rapinat 4a299d79a7 6595, 5621: fix translation strings (were commented lines cause of xgettext bug); Thank you Paul!
svn: r22203
2013-05-08 09:14:52 +00:00
Jérôme Rapinat fc8f750338 6595, 5621: temp workaround for xgettext bug (not yet fixed on GNU gettext 0.18.2), see https://savannah.gnu.org/bugs/index.php?29216
svn: r22202
2013-05-08 09:09:53 +00:00
Paul Franklin 454180dcec better PEP-0008 (trans_text_ ==> trans_text)
PEP-0008 reserves the use of a trailing underscore for names
which conflict with Python keywords, which this doesn't.

The goal is to have a permanent name which is unique across
the gramps namespace, since it is defined (in po/genpot.sh
and po/update_po.py) as a keyword to flag strings to be put
into the translation "catalog" file (gramps.pot).

The new keyword "trans_text" is still unique.  (Also "_T_".)


svn: r22200
2013-05-07 18:59:15 +00:00
Paul Franklin f31c22cdaa "_ngettext" is no longer used as a gramps translation keyword
svn: r22198
2013-05-07 18:12:23 +00:00
Paul Franklin 865d32e042 enable translated output for this report
svn: r22196
2013-05-07 17:17:03 +00:00
Paul Franklin 87306fcf57 enable deferred translation for the relationship calculator
svn: r22194
2013-05-07 17:13:56 +00:00
Benny Malengier ded3b12080 6659: Justified paragraph layout does not work in "Custom Book Text" in book report
svn: r22191
2013-05-07 12:37:00 +00:00
Paul Franklin d551e2b5e4 enable translated output for this report
svn: r22188
2013-05-06 19:46:40 +00:00
Peter Landgren 58f59a5d67 Minor updates.
svn: r22186
2013-05-06 16:32:34 +00:00
Paul Franklin 757a6a721b add new keywords to po/genpot.sh, comment both scripts, and add "Id" lines
svn: r22182
2013-05-05 19:40:56 +00:00
Nick Hall fb22b83f14 6582: Fix problem with warning message
svn: r22180
2013-05-05 18:17:37 +00:00
Fedik 88c7dfd37d small translation
svn: r22179
2013-05-05 17:47:14 +00:00
Jérôme Rapinat a87b221292 6595: missing custom keywords support for intltool
svn: r22177
2013-05-05 12:52:55 +00:00
John Ralls 6f4b3cef8d [r22173]GrampsLocale: When checking translations check full locale first
So that e.g. en_GB will be preferred over en if en_GB is in fact the
desired translation.

svn: r22175
2013-05-04 20:34:18 +00:00
John Ralls b470d75c13 [r22172]Add translation to gen.merge.diff
svn: r22174
2013-05-04 20:34:09 +00:00
Paul Franklin 3c7a9ec14b enable translation of the "Endnotes" section header-word for these reports
svn: r22170
2013-05-04 19:30:22 +00:00
Paul Franklin a360db221f more flexible multi-column format for BooleanListOption
svn: r22168
2013-05-04 18:54:22 +00:00
Jérôme Rapinat 1fb9773e16 6595: add new keywords for xgettext (textual reports and L10N/I18N)
svn: r22166
2013-05-04 17:26:52 +00:00
Jérôme Rapinat 8afb1e4c29 6595: create a new template every time we are extracting strings from python modules
svn: r22165
2013-05-04 16:10:26 +00:00
Jérôme Rapinat 98d3606aff 6672: Gallery: 'TreePath' object does not support indexing; it also works with pygobject 3.3.2
svn: r22161
2013-05-04 14:23:23 +00:00
Jérôme Rapinat 2b3c2190d8 update french translation, todo: check why some event abbreviations and sentences are no more translated
svn: r22160
2013-05-04 13:38:31 +00:00
Jérôme Rapinat ce7181a96d 6576: add an optional helptext as tooltip on add_pos_int(); provide a list and sample of pango convenience markups and combinaisons
svn: r22158
2013-05-04 06:12:23 +00:00
Paul Franklin 7c205bf7fc enable translated output for this report
svn: r22155
2013-05-04 02:07:21 +00:00
Paul Franklin 9b109884ad disambiguate the local report argument name (vs. the similar global name)
svn: r22153
2013-05-03 19:13:52 +00:00
Mirko Leonhäuser 2d75b21b9e updated german translation
svn: r22151
2013-05-03 12:40:28 +00:00
Jérôme Rapinat 09306a357c 6668: number of arguments for notify_db_error() into Export assistant
svn: r22147
2013-05-02 18:06:59 +00:00
Jérôme Rapinat 022ff28d94 6656: division on hexadecimalcolor
svn: r22145
2013-05-02 17:22:16 +00:00
Jérôme Rapinat 2cec980066 6576: Set custom pango markup can generate GtkWarning, ValueError or TypeError
svn: r22143
2013-05-02 15:38:53 +00:00
Benny Malengier 8b452f95cb 6641: Complete Individual Report crashes gramps
svn: r22141
2013-05-02 13:26:36 +00:00
Benny Malengier a6f464592a 6659: Justified paragraph layout does not work
Actually: it works always, but pango does not justify partial lines...


svn: r22139
2013-05-02 08:51:26 +00:00
Paul Franklin 45849a93a6 enable translated output for this report
svn: r22135
2013-05-01 17:39:18 +00:00
Paul Franklin 1d470340cc enable translated output for this report
svn: r22133
2013-05-01 17:38:08 +00:00
Paul Franklin 9bbecacd9f enable translated output for this report
svn: r22131
2013-05-01 17:36:23 +00:00
Mirko Leonhäuser c6cdfe827f updated german translation
svn: r22130
2013-05-01 12:11:50 +00:00
Jérôme Rapinat 8c9acb6ef3 add New Zealand holidays (contribution by kerobe aka Ken B)
svn: r22126
2013-05-01 08:06:48 +00:00
Benny Malengier 18b34eea90 6624: import an exported XML crashes gramps 4.0 - Actually a logic bug python 2 does not crash on.
svn: r22124
2013-04-30 13:22:07 +00:00
Paul Franklin 1b0c7815da make the name consistent, across gramps
svn: r22120
2013-04-29 22:09:58 +00:00
Paul Franklin 6ea9a5ad70 enable translated output for this report
svn: r22118
2013-04-29 19:26:06 +00:00
Jérôme Rapinat 70ee3d822f 5751: revert r22107, even cosmetic (most labels on base filters are not displayed); only sidebar gui filter has a custom behavior (around level=2)
svn: r22115
2013-04-29 07:53:38 +00:00
Paul Franklin f60212f191 enable translated output for this report
svn: r22113
2013-04-28 19:28:19 +00:00
Joan Creus 6ed2aa9a0d Translation update
svn: r22112
2013-04-28 17:56:33 +00:00
Joan Creus f5bae80cf3 Translation update
svn: r22111
2013-04-27 18:58:58 +00:00
Jérôme Rapinat 9246af61a3 5751: revert 22108, using own filter rule, behavior and label via filtereditor
svn: r22110
2013-04-27 17:14:46 +00:00
Jérôme Rapinat a0cae8afcf 5751: use "Minimum Confidence" label into citation sidebar filter, it does not match only one level
svn: r22109
2013-04-27 16:35:27 +00:00
Jérôme Rapinat de88bb34c0 5751: use Minimum Confidence label according to current filter behavior
svn: r22108
2013-04-27 16:24:35 +00:00
Jérôme Rapinat 221020cca0 5751: use Minimum Confidence label according to current filter feature
svn: r22107
2013-04-27 15:58:55 +00:00
Paul Franklin bc7abbd85a enable multi-column paper choices, in report output
svn: r22105
2013-04-27 15:47:34 +00:00
Jérôme Rapinat caa75a3b2c typo
svn: r22104
2013-04-27 14:55:31 +00:00
Jérôme Rapinat 5d180993be 6669: Descriptions for file formats into Export dialog are ignored by the translation
svn: r22103
2013-04-27 14:51:36 +00:00
Joan Creus f2de23047c Translation update
svn: r22102
2013-04-27 10:39:56 +00:00
Joan Creus fc1a5d453b Translation update
svn: r22100
2013-04-26 20:59:21 +00:00
Erik De Richter d18e001324 updated dutch translation
svn: r22099
2013-04-26 05:59:58 +00:00
Erik De Richter e2c726831a svn: r22098 2013-04-25 18:02:21 +00:00
Joan Creus 7399bc73d1 Translation update
svn: r22097
2013-04-24 22:42:31 +00:00
Joan Creus 530e561537 Translation update
svn: r22096
2013-04-24 22:29:32 +00:00
Paul Franklin 26ebc3bda7 typos
svn: r22094
2013-04-24 01:01:26 +00:00
Paul Franklin 570d0e1ac1 enable translated output for this report
svn: r22092
2013-04-24 00:12:17 +00:00
Mirko Leonhäuser f6c39ffe17 updated german translation
svn: r22091
2013-04-23 19:04:45 +00:00
Paul Franklin da36417690 change GuiFamilyOption precedence to match GuiPersonOption
(that is, use any "overridden" value, then any "active"
family, then any family of the "active" person, and only
then fall back on others, such as a saved-away family option
value, or any family of the user's "default" person)


svn: r22089
2013-04-23 18:06:48 +00:00
Jérôme Rapinat b30869c6a4 update template and french translation
svn: r22088
2013-04-23 14:43:18 +00:00
Jérôme Rapinat 3dcc029dbd "Id" property should be into a comment
svn: r22087
2013-04-23 14:30:49 +00:00
Paul Franklin dc1d12947e enable translated output for this report
svn: r22083
2013-04-23 04:53:59 +00:00
Paul Franklin 89b6d05fd4 enable translated output for this report
svn: r22081
2013-04-23 04:52:58 +00:00
Paul Franklin 4dd28d5532 enable translated output for this report
svn: r22079
2013-04-23 04:51:54 +00:00
Paul Franklin 5c13786ac4 enable translated output for this report
svn: r22077
2013-04-23 04:50:44 +00:00
Paul Franklin e2be8e2875 enable translated output for this report
svn: r22075
2013-04-23 04:48:37 +00:00
Paul Franklin 42f014efeb reenable translated report title
svn: r22073
2013-04-22 18:17:24 +00:00
Jérôme Rapinat 59ed4f8a8f need context differences for the "To Do" translation string (patch by Harmen Huizinga)
svn: r22068
2013-04-22 07:28:31 +00:00
Mirko Leonhäuser 07db07eb87 updated german translation
svn: r22064
2013-04-21 18:23:27 +00:00
John Ralls f9e8c90b7d [r22062]GrampsLocale: Fix execption
'Foo has no attribute _Foo__get_type'
From moving the set_locale function to the superclass. One can get
carried away with enforcing private attributes...

svn: r22063
2013-04-21 18:02:47 +00:00
Joan Creus f405ef9f3a Translation update
svn: r22061
2013-04-21 11:36:35 +00:00
Jérôme Rapinat 7a012c2790 French translation: try to make it consistent
svn: r22060
2013-04-21 10:57:47 +00:00
Jérôme Rapinat bc1b99a85e minor update
svn: r22059
2013-04-21 10:42:22 +00:00
Jérôme Rapinat 34bb0b7769 from __future__ imports must occur at the beginning of the file
svn: r22058
2013-04-21 10:23:43 +00:00
Jérôme Rapinat 391155d14b indentation
svn: r22057
2013-04-21 10:20:20 +00:00
John Ralls 1436945239 [r22039]Bug 6533: Report plugin name
when failing to load an add-on translation
Message now says (e.g.) WARNING: Plugin ExtendedAttributes has no translation for any of your configured languages, using US English instead

svn: r22056
2013-04-20 23:24:11 +00:00
John Ralls f657238034 [r22038]GrampsLocale: Add explanatory comment
After I stopped myself from fixing something that was done right!

svn: r22055
2013-04-20 23:24:05 +00:00
John Ralls 821bf3b740 [r22037]GrampsLocale: Mac: Align flow of user preferences
to match other OSes.
Also add diagnostics to make Tim Lyons happy.

svn: r22054
2013-04-20 23:23:59 +00:00
John Ralls 8ce27e1be6 [r22036]GrampsLocale: Win32: Clean up extraneous conditions
don't set self.language prematurely

svn: r22053
2013-04-20 23:23:53 +00:00
John Ralls c338c75953 [r22035]GrampsLocale: Posix: Move LC_MESSAGES check
to setting self.language

svn: r22052
2013-04-20 23:23:48 +00:00
John Ralls 001b520199 [r22034]GrampsLocale: Add some debugging messages.
Move the warning about failure to after the last attempt.

svn: r22051
2013-04-20 23:23:41 +00:00
John Ralls c6f926188a [r22033]GrampsLocale: Init_from_environment: Change precedence
LC_MESSAGES takes precedence over LC_CTYPE for setting self.lang
$LANGUAGES overrides $LANG, $LC_FOO for setting translations

svn: r22050
2013-04-20 23:23:36 +00:00
John Ralls badaa407f6 [r22032]GrampsLocale: Fix indentation error
svn: r22049
2013-04-20 23:23:29 +00:00
John Ralls 14575a3bc8 [r22031]MacLocale: Make sure the overrides work correctly
And that we follow the user's preferences correctly or issue a warning that we've defaulted to US English if we can't.

svn: r22048
2013-04-20 23:23:23 +00:00
John Ralls edd40cafa3 [r22030]Supply a concatstrings PostScript function
To allow postscript documents to work without Ghostscript.

svn: r22047
2013-04-20 23:23:18 +00:00
John Ralls 50e43f51c9 [r22029]Use GrampsLocale.encoding to get the code set instead of locale
svn: r22046
2013-04-20 23:23:12 +00:00
John Ralls ea0a839ab1 [r22028]GrampsLocale: Replace gen.plug.utils gfloat()
With GrampsLocale.float().
Also remove gen.plug.utils gformat(), which was written to work
around string formatting with %f localizing the decimal point,
which it doesn't do. locale.format() does, but it wasn't being
used anyway.

svn: r22045
2013-04-20 23:23:07 +00:00
John Ralls 9284223d4b [r22027]GrampsLocale: Wrap locale.format and locale.format_string
To concentrate the locale dependency in grampslocale.py

svn: r22044
2013-04-20 23:22:59 +00:00
John Ralls 7c2469a3ca [r22026]Remove some imports of locale where nothing it exports was used.
svn: r22043
2013-04-20 23:22:53 +00:00
John Ralls 7005b63a43 [r22025]Take the localization debug info from GrampsLocale
instead of locale

svn: r22042
2013-04-20 23:22:44 +00:00
John Ralls 70345ef4b8 [r22024]GrampsLocale: Add GrampsLocale attributes numeric and currency
svn: r22041
2013-04-20 23:22:37 +00:00
John Ralls f2d7e62fc0 [r22023]MacLocale: Fix missing subscript.
svn: r22040
2013-04-20 23:22:31 +00:00
Paul Franklin c032fc8dae typos
svn: r22020
2013-04-19 16:57:48 +00:00
Erik De Richter 15f7b45d3f updated dutch translation
svn: r22019
2013-04-19 06:12:05 +00:00
Paul Franklin 9c44e4500f typo
svn: r22016
2013-04-18 20:56:06 +00:00
Paul Franklin 8aa2a6aa24 give the "ahnentafel" report a user-settable title string
(since many English speakers do not know what "ahnentafel" means)


svn: r22014
2013-04-18 19:08:19 +00:00
Paul Franklin fa35769714 add name-format option to the three GraphViz reports
svn: r22012
2013-04-18 17:16:16 +00:00
Jérôme Rapinat 53b67443f2 6645: unable to do Spanish kinship report, 4185: Julio's patch
svn: r22010
2013-04-18 09:05:14 +00:00
Paul Franklin feb36c5ce4 refactor: move name_format into stdoptions.py
svn: r22008
2013-04-17 20:49:14 +00:00
Erik De Richter b0a159ee2f updated dutch translation
svn: r22007
2013-04-17 19:24:35 +00:00
Paul Franklin 6d57f08ac0 6623: funny GUI report-language display
svn: r22005
2013-04-16 22:18:47 +00:00
Mirko Leonhäuser 9fc255371d updated german translation
svn: r22004
2013-04-16 17:46:50 +00:00
Paul Franklin 706e92be77 6462: GEDCOM import fails (patch by Enno Borgsteede)
svn: r22001
2013-04-15 22:01:08 +00:00
Benny Malengier 16cfc2af23 6618: Export CSV crashes gramps 4.0 beta
svn: r21999
2013-04-15 11:01:24 +00:00
Benny Malengier 77adb230c5 6635: retry of bug 6443, exec missing globals
svn: r21997
2013-04-15 09:40:47 +00:00
Benny Malengier 9503faed70 6623: funny GUI report-language display
svn: r21994
2013-04-15 09:15:34 +00:00
Erik De Richter 1e1e57c576 updated nl translation
svn: r21993
2013-04-14 20:02:24 +00:00
Erik De Richter fecaba830e updated nl translation
svn: r21992
2013-04-14 07:14:19 +00:00
Paul Franklin 5d13d706b6 add "Id" property and line, and stdoptions.py
svn: r21990
2013-04-13 23:34:50 +00:00
Paul Franklin 7ec9f36fe2 add "Id" property
svn: r21989
2013-04-13 21:03:07 +00:00
John Ralls d8b04d281d GrampsLocale: Restore the _hastag.py files
Accidentally deleted in r21968

svn: r21988
2013-04-13 19:47:59 +00:00
Paul Franklin dcb84fd166 add "Id" property
svn: r21987
2013-04-13 15:11:04 +00:00
John Ralls 3127dc08e2 [r21977]Remove unnecessary (and broken in Py3) import
svn: r21986
2013-04-13 14:38:02 +00:00
John Ralls 58c2b11013 [r21968]GrampsLocale: Remove get_translation()
Only one base translation per locale. To set up a different locale
on any axis (locale, domain, directory, or languages) instantiate a
secondary locale by calling GrampsLocale() with the appropriate
arguments.

svn: r21985
2013-04-13 14:37:34 +00:00
John Ralls d674eed2d4 [r21967]GrampsLocale: Integrate libtranslate functions into GrampsLocale
And remove libtranslate

svn: r21984
2013-04-13 14:35:30 +00:00
John Ralls 751ac2aef0 [r21966]GrampsLocale: Extract 2 reporting functions
set_translation() to the Report class
Add a new module stdoptions to gen.plug.report with function
add_localization_option(). The intent of stdoptions is to reduce the code-copying among reports; this is the first bit.

svn: r21983
2013-04-13 14:35:23 +00:00
John Ralls eb63ae3d8e [r21965]GrampsLocale: Add get_date and get_type functions
To enable GrampsLocale to replace libtranlate.py's Translation
class.

svn: r21982
2013-04-13 14:35:15 +00:00
John Ralls 6f7c65a038 [r21964]GrampsLocale: Add date_parser and date_displayer properties
svn: r21981
2013-04-13 14:35:08 +00:00
John Ralls 1e598e846a [r21963]MacLocale: Capture collation qualifications
svn: r21980
2013-04-13 14:35:02 +00:00
John Ralls 9f1ec6daf6 [r21962]GrampsLocale: Make dictionaries class variables
lang_map and country_map

svn: r21979
2013-04-13 14:34:56 +00:00
John Ralls 044452805b [r21961]GrampsLocale: Refactor/clean up initialization
Includes moving encoding to be a class variable.

svn: r21978
2013-04-13 14:34:49 +00:00
Nick Hall 5d3735123e 6622: Change regular expression rules to use search rather than match
svn: r21975
2013-04-13 14:30:12 +00:00
Fedik 89847f1df3 small translation and uptades
svn: r21973
2013-04-13 13:23:40 +00:00
Jérôme Rapinat f7a0036a41 update and merge Greek translation with last template (by Ζήσης Παπαδόπουλος)
svn: r21972
2013-04-13 06:27:55 +00:00
Mirko Leonhäuser b1b5b1dbfb updated german translation
svn: r21970
2013-04-13 00:11:28 +00:00
Jérôme Rapinat 24414d6285 update Hungarian translation (by Nemeséri Lajos)
svn: r21960
2013-04-12 07:22:53 +00:00
Fedik 86f069e05a small translation and uptades
svn: r21959
2013-04-11 20:01:41 +00:00
Jérôme Rapinat 40219c0b83 typo
svn: r21957
2013-04-11 07:51:29 +00:00
Jérôme Rapinat 84c9e42d96 merge french translation with last template
svn: r21956
2013-04-11 07:48:08 +00:00
Jérôme Rapinat 1cf906be39 update and merge Hungarian translation (by Nemeséri Lajos)
svn: r21955
2013-04-11 07:33:30 +00:00
Paul Franklin e0ed05653d add person-index entries, for book report
svn: r21954
2013-04-10 21:56:35 +00:00
Paul Franklin b7b2ba690a add TOC and index entries, for book report
svn: r21951
2013-04-10 20:25:35 +00:00
Paul Franklin 8725f2e236 add TOC entry, for book report
svn: r21950
2013-04-10 19:05:56 +00:00
Paul Franklin ca4c231eaa missing import
svn: r21947
2013-04-10 19:00:58 +00:00
Fedik cb6a42364b small translation and uptades
svn: r21946
2013-04-10 18:05:23 +00:00
Nick Hall f6b043da6f 6599: Fix python3 error
svn: r21944
2013-04-10 17:39:19 +00:00
Nick Hall f4aecf48c1 6599: Add regex parameter to rules which override the constructor
svn: r21942
2013-04-10 13:24:04 +00:00
Peter Landgren e4af48c0f3 BSDDB -> Bsddb.
svn: r21940
2013-04-10 12:58:54 +00:00
Peter Landgren bca4e0852f BSDDB -> Bsddb.
svn: r21939
2013-04-10 12:58:15 +00:00
Fedik 4862a5e072 small translation and uptades
svn: r21936
2013-04-09 18:09:15 +00:00
Nick Hall 516cc588c6 6599: Add regular expression option to rules using the match_substring method
svn: r21934
2013-04-09 13:51:38 +00:00
Jérôme Rapinat ad8908fe96 6608: typo
svn: r21930
2013-04-09 13:47:41 +00:00
Jérôme Rapinat 7b98d528f1 existing name for gexiv2 package
svn: r21929
2013-04-09 13:45:48 +00:00
Mirko Leonhäuser 342ea53dae updated german translation
svn: r21928
2013-04-08 17:52:06 +00:00
Paul Franklin 396de3564b enable "indent spouse" option to /not/ indent a spouse
svn: r21926
2013-04-08 15:08:14 +00:00
Peter Landgren 9e5922d13c Updated for Family Tree.
svn: r21924
2013-04-08 13:46:53 +00:00
Peter Landgren 35f6cba4f4 Updated for Family Tree.
svn: r21923
2013-04-08 13:44:45 +00:00
Peter Landgren 72014d89e3 Converted to Family Tree.
svn: r21922
2013-04-08 13:41:44 +00:00
Zdenek Hatas 1b1a0e5e92 czech translation update
svn: r21920
2013-04-08 09:52:06 +00:00
Jérôme Rapinat 5cfbeda670 check librsvg2 package naming (apt-get -s)
svn: r21919
2013-04-08 07:07:23 +00:00
Andre Marcelo Varenga 4c8b259002 Updating pt_BR translation
svn: r21917
2013-04-08 02:48:39 +00:00
Luigi Toscano df537dee58 Italian translation updates
svn: r21916
2013-04-07 22:50:02 +00:00
Luigi Toscano 5d29b90dcc Pending 'it' translation updates for 3.4, forward-port to 4.0 and trunk
svn: r21915
2013-04-07 21:36:50 +00:00
Mirko Leonhäuser a131ed20e4 updated german translation
svn: r21914
2013-04-07 11:04:40 +00:00
Nick Hall b240d979de 6599: Fix matching empty fields in empty locations using regular expressions
svn: r21912
2013-04-06 17:27:18 +00:00
Paul Franklin 1e5ae4aa4d clarify and qualify release information
svn: r21909
2013-04-06 16:56:57 +00:00
Jérôme Rapinat d167d8db03 typo, No module named versioin
svn: r21907
2013-04-06 11:56:38 +00:00
Jérôme Rapinat a182a68b9f need const.py into source tarball
svn: r21905
2013-04-06 09:40:49 +00:00
Jérôme Rapinat 0ba9247e64 no new messages, cosmetic changes into grampslocale; update string references (comments) ignored after compilation
svn: r21904
2013-04-06 08:04:42 +00:00
Peter Landgren 2105312fdf Partial translation update.
svn: r21903
2013-04-06 07:55:32 +00:00
Jérôme Rapinat b1b1308343 alpha5 -> beta
svn: r21902
2013-04-06 07:47:38 +00:00
John Ralls 5dc89962ba [r21899]GrampsLocale: Ensure self.encoding exists before testing it
svn: r21901
2013-04-05 23:54:58 +00:00
John Ralls 2eafc3ca08 [r21898]GrampsLocale: Clean up _init_from_environment even more
And do it right this time!

svn: r21900
2013-04-05 23:54:33 +00:00
Tim G L Lyons 3aae88f9c2 Put maxsize back
svn: r21895
2013-04-05 17:14:22 +00:00
Paul Franklin d4ed73da0e say pyexiv2 is no longer needed, and slight reformatting
svn: r21894
2013-04-05 17:00:58 +00:00
Jérôme Rapinat bc26b54d3e match filename for distutils commands
svn: r21890
2013-04-05 14:22:45 +00:00
Jérôme Rapinat 3edf31ebbc update and merge translations before 4.0.0 beta except for de, nb, nl, pt_BR, sv (activity)
svn: r21889
2013-04-05 13:46:58 +00:00
Tim G L Lyons b0e80e74b5 write.py: After the bsddb version has been upgraded, if the schema versions also needs to be upgraded, output a separate dialog asking the user whether he wants to upgrade the schema. (As requested by Benny).
svn: r21887
2013-04-05 10:54:13 +00:00
John Ralls 9979fd8792 [r21882]GrampsLocale: Improve windows handling of no locale
svn: r21885
2013-04-04 21:18:29 +00:00
John Ralls 5fc65f68ea [r21881]GrampsLocale: Ensure posix collation and calendar
are set correctly

svn: r21884
2013-04-04 21:18:22 +00:00
John Ralls 496cf30d6b [r21880]GrampsLocale: Better handling of unset $LANG or $LANG == 'C'
svn: r21883
2013-04-04 21:18:16 +00:00
Benny Malengier 2eeba5a9ae 6579: Check and Verify crashes
svn: r21878
2013-04-04 20:08:12 +00:00
Mirko Leonhäuser 78ada9190c updated german translation
svn: r21877
2013-04-04 18:08:43 +00:00
Benny Malengier 434d45ffd1 formatting cleanup
svn: r21876
2013-04-04 10:50:44 +00:00
Benny Malengier 028c832153 6590: gramps40 asciidoc.py crashes for at least some reports
svn: r21874
2013-04-04 10:13:36 +00:00
Benny Malengier 2cb36a7fb4 6591: converted bytes of media in a string to show in quickview
svn: r21872
2013-04-04 09:54:04 +00:00
Benny Malengier 4526da77ce More exception text
svn: r21870
2013-04-04 09:31:41 +00:00
Benny Malengier 40db10e378 fix python3 error and improve upgrade text
svn: r21868
2013-04-04 09:27:01 +00:00
Jérôme Rapinat 7a7e95410a update template before beta, merge some translation strings from 3.4.x (french)
svn: r21866
2013-04-04 07:51:53 +00:00
Jérôme Rapinat c7b6e840f0 update Debian control file according to README file
svn: r21861
2013-04-03 16:48:55 +00:00
Jérôme Rapinat 576dcb30d6 typo for handling one translated string
svn: r21860
2013-04-03 16:42:11 +00:00
John Ralls b204a48b42 [r21858]GrampsLocale: Fix MSWin Syntax error
Can't do everything the C way :-(

svn: r21859
2013-04-03 03:57:50 +00:00
John Ralls 8fe756f5e4 [r21854]GrampsLocale: Win: Check both forward and reverse mslocale
svn: r21857
2013-04-02 20:35:51 +00:00
John Ralls 0303212d49 [r21853]ImportProGen: Fix "with" statement syntax.
svn: r21856
2013-04-02 20:35:44 +00:00
John Ralls a67b7b7d11 [r21845]GrampsLocale: Report the plugin when complaining
About not being able to find a translation.
Well, that's usually the source of this warning. With an unsupported
locale it will say "share".

svn: r21855
2013-04-02 20:35:38 +00:00
Tim G L Lyons 019ad16239 0006529: Cancelling database upgrade can corrupt the database. Check whether the bsddb version has changed (or was originally unknown). If it is an upgrade, ask the user whether he has made a backup, and is ready to upgrade. If so, made a zip backup and open the database with the new bsddb version. Make messages on the dialogues more explicit with the version numbers mentioned.
svn: r21851
2013-04-02 16:05:36 +00:00
Paul Franklin d62b34125c send a CLI error string to stderr
svn: r21848
2013-04-02 05:07:21 +00:00
John Ralls 52b7276c7d [r21844][Bug 6495] Translator class should use english date
When "English" is set via libtranslate.

svn: r21846
2013-04-02 00:10:28 +00:00
Erik De Richter 75a02b10d7 updated dutch translation
svn: r21842
2013-04-01 18:27:06 +00:00
John Ralls 3f2d9f6219 [r21839]GrampsLocale: Fix NoneType error
svn: r21840
2013-04-01 17:38:28 +00:00
Paul Franklin efdaa1fd14 translate a few CLI strings
svn: r21838
2013-04-01 14:58:55 +00:00
Jérôme Rapinat 7ee109ea98 add some suggestions and recommendations
svn: r21835
2013-04-01 08:39:49 +00:00
John Ralls cd4585b100 [r21831][Bug 6553] Get Datehandler base language
from GRAMPS_LOCALE.calendar

svn: r21834
2013-03-31 22:51:38 +00:00
John Ralls 444a3f4c12 [r21830]GrampsLocale: Better initialization from environment
Splits out Win32 and Posix initializations to take account of the
fact that on Win32 setlocale() ignores environment variables and on
Posix it's not necessary to check them because setlocale() does the
right thing.

svn: r21833
2013-03-31 22:51:32 +00:00
John Ralls d3d80b443e [r21829]ImportProGen: Prevent leaking file handle
svn: r21832
2013-03-31 22:51:26 +00:00
Tim G L Lyons 9d8d1576b4 0006483: Listing the Family Trees can corrupt them. Changed get_dbdir_summary to exit if the bsddb_version is not the current bsddb and to return both BSDDB and schema version. Changed family_tree_summary to output both versions. Changed argparser and arghandler to additionally support -t (table) option to list family tree in tab delimited format.
svn: r21827
2013-03-31 22:09:05 +00:00
Erik De Richter ba12b62810 updated dutch translation
svn: r21823
2013-03-31 18:59:51 +00:00
Jérôme Rapinat 49ed4e0f53 debianize for dh_python2 support
svn: r21821
2013-03-31 17:07:21 +00:00
Paul Franklin 85300edd61 6589: no TOC entry for b.r. multi-page no-title ancestor/descendant trees
svn: r21819
2013-03-30 21:00:53 +00:00
Paul Franklin bc6c23bc65 6568: graphic descendant tree report inserts a bogus title
svn: r21817
2013-03-30 04:32:28 +00:00
Benny Malengier 2e7e0d7666 6568: graphic descendant tree report inserts a bogus title
svn: r21815
2013-03-29 20:47:08 +00:00
Benny Malengier cb2b4a1514 clarify use of all_handles methods
svn: r21814
2013-03-29 20:03:21 +00:00
Benny Malengier 07edb59c83 6417: alpha4 filtering screws up Export
svn: r21812
2013-03-29 19:39:35 +00:00
Benny Malengier 684fd1b6df 6492: Verify crashes with python 3
svn: r21810
2013-03-29 16:59:14 +00:00
Benny Malengier f9a872ad67 6460: Crash during Extract Event Description
svn: r21808
2013-03-29 15:57:05 +00:00
Benny Malengier cfd162ec85 6346: If a exporter plugin crashes, the Export Assistant can't be closed
svn: r21806
2013-03-29 13:18:53 +00:00
Tim G L Lyons c5982a4514 0006578: referencedbyselection.py process_object calls non-existant process_note method
svn: r21803
2013-03-28 23:32:30 +00:00
Jérôme Rapinat 1975ca92b7 6369: BooleanOption does not support underline
svn: r21799
2013-03-28 18:41:37 +00:00
Tim G L Lyons 75e3385777 0006544: No test for checking if Place handle exists when looking at media reference via proxy
svn: r21797
2013-03-28 18:29:18 +00:00
Jérôme Rapinat 10eb31e708 minor syntax error
svn: r21795
2013-03-28 18:10:51 +00:00
Benny Malengier e0ccf7e330 6369: Accelerator keys, Gtk and User Interface
svn: r21793
2013-03-28 16:52:58 +00:00
Benny Malengier 8ef935804e 6340: In Family Tree Manager window, naming a tree which takes it out of view does not scroll to new name
svn: r21791
2013-03-28 16:23:33 +00:00
Benny Malengier 594f273260 6577: Mulltiple drop from clipboard on embeddedlist not working
svn: r21789
2013-03-28 16:02:18 +00:00
Tim G L Lyons a421439a76 referencedbyselection.py. 0006493: crash during Calculate Preview of a filtered XML export.
svn: r21786
2013-03-28 14:29:25 +00:00
Benny Malengier 7ac463b03b 6569: transferring from the clipboard causes gramps40 svn 21740 to crash
svn: r21784
2013-03-28 13:54:05 +00:00
Benny Malengier 38a68f4fd2 6521: README needs to be updated, before release
svn: r21782
2013-03-28 12:30:28 +00:00
Benny Malengier 9fecd1aa53 6319: Remove libgrdb
svn: r21779
2013-03-28 12:24:23 +00:00
Benny Malengier 5fca8311f5 Python3 UnicodeDecodeError in python3 on unpickling data saved in python2
svn: r21778
2013-03-28 10:48:01 +00:00
Benny Malengier 4260777605 5163: Another crash in same editor.
svn: r21776
2013-03-28 10:02:40 +00:00
Benny Malengier b4c225fc35 6496: GUI Export fails in gramps40
svn: r21774
2013-03-28 09:09:29 +00:00
Benny Malengier da8cb286cd 6443: try to use remove unused objects tool
svn: r21771
2013-03-27 19:57:17 +00:00
Benny Malengier 2f0cf7d5b6 support python 3
svn: r21770
2013-03-27 19:56:54 +00:00
Benny Malengier 4c8d6a3215 6402: Error in ValidatedMaskedEntry widget
svn: r21767
2013-03-27 18:05:25 +00:00
Paul Franklin 4ca275e5b2 6561: v3.4.3 NarWeb creation fails for German, Swedish
svn: r21765
2013-03-27 17:00:40 +00:00
Benny Malengier a581dda843 6484: IndexError for sort_data/column on quick view table
svn: r21763
2013-03-27 14:22:39 +00:00
Benny Malengier 7da053e88e 6470: Crash by filtering with filter bar in person tree view
svn: r21760
2013-03-27 13:47:13 +00:00
Jérôme Rapinat 9cad62547e re-debianize
svn: r21758
2013-03-27 13:15:45 +00:00
Jérôme Rapinat 0cacbc4c16 do not need extra dependency for building
svn: r21757
2013-03-27 09:34:36 +00:00
John Ralls f2f148b7ba [r21753]GrampsLocale: Separate self.encoding from sys.stdout.encoding
Because python standard library functions encode to
locale.getpreferredencoding or sys.getdefaultencoding, not to
sys.stdout.encoding.

svn: r21756
2013-03-26 19:29:27 +00:00
Tim G L Lyons 67b6abb3df 0006564: svn 21740 restores bug 0006411 - Navweb crashes during creation of Media pages
svn: r21754
2013-03-26 19:28:53 +00:00
Paul Franklin 1f94813e59 restore SVN number to "gramps -v" output
svn: r21752
2013-03-26 19:02:37 +00:00
Paul Franklin 7d90a49fba slightly better CLI help
svn: r21749
2013-03-26 17:50:18 +00:00
Jérôme Rapinat c73cb0e70a only need next generation of python-gobject (<= 3.0.0) for building
svn: r21748
2013-03-26 16:10:05 +00:00
Jérôme Rapinat 49cf845b53 add a preinst script for .deb
svn: r21747
2013-03-26 15:52:33 +00:00
Jérôme Rapinat f3859a2fb9 start to migrate DEBIAN rules to distutils
svn: r21746
2013-03-26 15:41:39 +00:00
Jérôme Rapinat 40076dd093 no official release yet, what about gen.svn_revision?
svn: r21745
2013-03-26 14:37:17 +00:00
Erik De Richter 8a290a14a4 updated nl translation
svn: r21744
2013-03-26 09:55:18 +00:00
Benny Malengier cbb8d063df 6501: Cannot crop via mouse cursor into Media reference editor
svn: r21743
2013-03-25 20:04:33 +00:00
Benny Malengier 47be9a4e02 6528: Place Names with & in name fail to display
svn: r21740
2013-03-25 14:16:23 +00:00
Nick Hall b84ad06523 Fix literals. Use logging for warnings.
svn: r21738
2013-03-25 13:34:44 +00:00
Jérôme Rapinat 5a9686bad7 try to build .deb for 4.0; http://gramps-project.org/wiki/index.php?title=Debian, update control file
svn: r21736
2013-03-25 11:24:23 +00:00
Paul Franklin 4064b9917f totally revert the whole 21728/21729 open=>io.open changes
svn: r21735
2013-03-24 22:27:27 +00:00
Paul Franklin 0c791b2d14 revert 21728/21729 open=>io.open change, for Windows
svn: r21732
2013-03-24 17:45:40 +00:00
Paul Franklin 42d8a95512 modify (semi-revert) 21728/21729 open=>io.open change, for Windows
svn: r21731
2013-03-24 15:48:58 +00:00
Paul Franklin d5e63a30d5 more open=>io.open changes, as John advised
svn: r21728
2013-03-24 00:10:34 +00:00
Nick Hall 70f4ed3b32 Add Tag class to CallbackManager
svn: r21726
2013-03-23 22:26:25 +00:00
Jérôme Rapinat 8bbc216d17 6544: add warning if place on event is missing by using proxies sequence
svn: r21723
2013-03-23 17:12:45 +00:00
Paul Franklin d135d2f55b another open=>io.open change, as John advised
svn: r21721
2013-03-23 15:26:16 +00:00
Paul Franklin 8835e3f133 slight tweaks to booklist format
svn: r21718
2013-03-21 20:45:59 +00:00
Peter Landgren 93e95ad7da Some updates.
svn: r21717
2013-03-21 09:36:32 +00:00
Erik De Richter a0016381c4 updated nl translation
svn: r21714
2013-03-20 20:05:24 +00:00
Paul Franklin 6e8435baab CLI typos and slight code cleanup
svn: r21713
2013-03-20 16:16:21 +00:00
Jérôme Rapinat d72ef5e5dc 4687: missing content migration...
svn: r21710
2013-03-20 14:05:37 +00:00
Jérôme Rapinat 01f6e3e79e 4687: global name 'warn' is not defined
svn: r21707
2013-03-20 13:57:31 +00:00
Jérôme Rapinat 3eed3217f4 merge after 3.4.3 release
svn: r21705
2013-03-20 13:49:31 +00:00
Nick Hall a4314abb61 Fix bug in citations bottombar gramplet
svn: r21702
2013-03-19 23:15:11 +00:00
John Ralls 393323a670 [r21696]TreeBaseModel: Avoid TypeError when bisecting
svn: r21700
2013-03-19 18:34:44 +00:00
John Ralls 764f17b935 [r21695]GrampsLocale: Ensure correct stdout encoding
Replace stdout with one that uses a transcoding Streamwriter. This
better handles differences between Py2 and Py3 than does trying to
encode strings prior to output. In particular Py3's default stdout
demands unencoded strings and prints byte-strings when one tries to
pre-encode them.

svn: r21699
2013-03-19 18:34:34 +00:00
John Ralls 1f38fd43f5 [r21694]GrampsLocale: Use glocale.lang or glocale.language[0]
To get the default localization instead of locale.getlocale() or
glocale.get_translation().language().

svn: r21698
2013-03-19 18:34:11 +00:00
John Ralls 38cc711bde [r21693]GrampsLocale: Prevent some AttributeErrors
and 'referenced before assignment' errors.

svn: r21697
2013-03-19 18:33:31 +00:00
Paul Franklin bdcc43b911 6542: book report: graphic ancestor or descendant tree reports fail
svn: r21678
2013-03-18 18:54:01 +00:00
Tim G L Lyons b8f2f13e33 README file. Add PyICU as strongly recommended.
svn: r21676
2013-03-17 14:47:38 +00:00
Nick Hall 738c95dedc Revert change to const.py
svn: r21672
2013-03-17 12:29:04 +00:00
Tim G L Lyons 820816f409 Standardise messages about missing modules to include problem, consequence and what to do about it (currently including references to GEPS 029 where necessary).
svn: r21670
2013-03-17 11:40:08 +00:00
Paul Franklin a713d5c388 ignore any CLI book report "item" which crashes
svn: r21668
2013-03-16 22:50:21 +00:00
Nick Hall 8af82fae08 Add methods used for modal ProgressMeter to CLIDialog
svn: r21665
2013-03-16 21:47:29 +00:00
Nick Hall da39d249de Add modal option to ProgressMeter
svn: r21662
2013-03-16 19:48:21 +00:00
Jérôme Rapinat 56136e1083 6195: Import citation for pro-gen file format (patch by keestux)
svn: r21658
2013-03-16 10:23:42 +00:00
Nick Hall 063efad45f 6336: Convert to use DbGUIElement
svn: r21655
2013-03-15 21:02:44 +00:00
Nick Hall b885391182 6526: Check for invalid handle
svn: r21652
2013-03-15 16:17:11 +00:00
John Ralls 0e195c04c8 [r21646]GrampsLocale: Code cleanup
And make sure that setting lang on the GrampsLocale constructor
overrides the languages from the first instance.

svn: r21650
2013-03-14 23:08:06 +00:00
John Ralls 6e525893bd [r21645]Plugins: Limit addon translators
Only get an addon translator if the plugin has a locale directory
Prevents pointless warnings, esp. when the translations are in the
main Gramps message file.

svn: r21649
2013-03-14 23:07:59 +00:00
John Ralls e4202098b7 [r21644]GrampsLocale: Suppress double printing of log messages
Grampsapp.py sets a global handler, so install one only during the first
init and remove it when done.

svn: r21648
2013-03-14 23:07:47 +00:00
John Ralls 2629bf3dee [r21640]GrampsLocale: Reduce circular imports
Lets one import grampslocale directly in a test script:
>>> from gramps.gen.utils.grampslocale import GrampsLocale
>>> import os
>>> gl = GrampsLocale(lang='fr_FR.UTF-8', localedir=os.path.join('build', 'mo'))
>>> tr = gl.get_translation().gettext
>>> tr("List of known family trees in your database path\n")
u'Liste des arbres familiaux connus dans votre chemin de base de donn\xe9es\n'

svn: r21647
2013-03-14 23:07:40 +00:00
John Ralls 0fda971b4c [r21636]GrampsLocale: Better handle invalid/missing locale
svn: r21639
2013-03-12 22:33:28 +00:00
John Ralls 651b3776f0 [r21635]MacLocale: Extract function _mac_get_gramps_defaults
And correct line handling on the languages list.

svn: r21638
2013-03-12 22:33:22 +00:00
John Ralls cfea1e98dc GrampsLocale: Correct some differences with trunk
Thanks to Paul Franklin for pointing these out.

svn: r21637
2013-03-12 22:33:16 +00:00
Nick Hall 901ec7dc5c Fix VERSION_DIR path
svn: r21633
2013-03-12 17:01:13 +00:00
Nick Hall 06df52881e Remove post-install script for linux
svn: r21629
2013-03-12 14:53:00 +00:00
Nick Hall 13bb98be10 Remove redundant code
svn: r21627
2013-03-12 14:40:18 +00:00
Nick Hall 9c0f85b3c2 Fix some properties
svn: r21625
2013-03-12 14:23:19 +00:00
Jérôme Rapinat 5d1a7e3b4e typo on version (backport from trunk)
svn: r21624
2013-03-12 13:49:54 +00:00
John Ralls 553d82ba34 [r21616]GrampsLocale: Ensure that encoding gets set to something
In the C locale, locale.getlocale() returns [None, None]

svn: r21621
2013-03-11 22:54:43 +00:00
John Ralls bd61f08873 [r21615]Install image files to $(prefix)/share/gramps/images
Instead of $(prefix)/share/gramps/icons/hicolor, which was an old (early
Gtk2) theming requirement.

svn: r21620
2013-03-11 22:54:37 +00:00
John Ralls 13a49a63ff [r21614]Move VERSION, VERSION_TUPLE, major_version
from const.py to version.py

As noted in the previous change, importing const into setup.py tried to
initialize GrampsLocale and ResourcePath, which won't work. Since all we
want is the VERSION string, move that to a new file, gramps/version.py

svn: r21619
2013-03-11 22:54:31 +00:00
John Ralls 3a73837dc9 [r21613]Determine Paths at Runtime
Uses GRAMPS_RESOURCES to override the root location of the Gramps data
files (which would normally be $(prefix)/share). In setup.py install,
writes $(prefix)/share to gen/utils/resource-path, installs that file,
then deletes it again from the source tree. The presence or absence
determines whether Gramps is running from the source directory or from
an installation.

Const.py is now a static file; const.py.in is no longer used. Note that
because importing const into setup tried to initialize things that we
don't want initialized, VERSION is removed, and imported from
gramps.version -- a file which will be added in the next change.
Consequently, this commit will not run.

svn: r21618
2013-03-11 22:54:20 +00:00
John Ralls 3490ebc684 [r21612]GrampsLocale: Protect another setlocale instance
svn: r21617
2013-03-11 22:54:11 +00:00
Mirko Leonhäuser 2ebec70e21 updated german translation
svn: r21611
2013-03-11 20:23:21 +00:00
Tim G L Lyons 87d91cdc20 Exportgedcom and importgedcom. 0006382: ADDR tag in GEDCOM export does not contain a full address. On export, all the elements of the structured address are output as ADDR/CONT. On import the structured address takes precedence (as at present), but a warning is only given if an element in the free-form address is missing from the structured address.
svn: r21609
2013-03-11 18:44:37 +00:00
Nick Hall 6a23860df2 6237: Suppress Gramps ID in Narrative Web report
svn: r21606
2013-03-10 23:54:52 +00:00
Paul Franklin af3e34fef5 sync a few files in gramps40 and trunk
svn: r21604
2013-03-10 21:52:07 +00:00
John Ralls 1a5ad3b6f7 [r21597]Grampslocale: Protect from crashes due to passing bad strings to
setlocale

svn: r21600
2013-03-09 22:38:05 +00:00
John Ralls a323c33c30 [r21596]Mac: Improve language list handling
Make sure that lang overrides the language list only if $LANG is set. Don't add encodings to the language list (e.g., en_US, not en_US.UTF-8). Start collation with None, because `if collation:` is True for collation = "". defaults may have whitespace at the end of "root", so use "startswith".

svn: r21599
2013-03-09 22:38:00 +00:00
John Ralls 5ecdde56f4 [r21595]GrampsLocale: Improve handling the language list
Replace "en" with "C" when setting $LANGUAGE ("en" confuses GtkBuilder), and explicitly iterate over languages when finding
the translator, because left to itself gettext will ignore English.

svn: r21598
2013-03-09 22:37:54 +00:00
Paul Franklin aa21c636b2 slight tweaks to text, add text property
svn: r21593
2013-03-09 17:48:00 +00:00
Jérôme Rapinat f84cc66c58 update Portuguese (Europe) translation by Frederico Muñoz
svn: r21592
2013-03-09 16:43:55 +00:00
Jérôme Rapinat 61046f3b75 "os" is not defined
svn: r21587
2013-03-09 10:25:10 +00:00
Jérôme Rapinat 2dab9b146e typo for handling translated strings
svn: r21586
2013-03-09 09:17:59 +00:00
John Ralls 54320efc45 Mac: Update Info.plist for alpha5
svn: r21585
2013-03-09 00:01:38 +00:00
Paul Franklin 113fbcfc7f handle CLI pathological case
svn: r21583
2013-03-07 23:30:03 +00:00
John Ralls 7e8cc02568 Bundle libgexiv2, adjust data and icon paths back to share
svn: r21582
2013-03-07 23:27:10 +00:00
John Ralls cd7b83086d Mac: Add patch for gexiv2 so that libtool can link the Gir,
svn: r21580
2013-03-07 23:24:05 +00:00
Helge Herz fab25576db Revert of 21558 because of changes in the GTK package for Win
svn: r21579
2013-03-07 23:22:59 +00:00
John Ralls d7b4bab8a9 Mac: Add goocanvas, replace pyexiv2 with gexiv2
svn: r21578
2013-03-07 23:22:43 +00:00
Nick Hall c861968fd3 6128: Reverse bug fix keeping code refactor
svn: r21576
2013-03-07 22:54:58 +00:00
Tim G L Lyons 3cba0f2089 0006507: GEDCOM import: Repositories not imported correctly from FTM for Windows and Heredis
svn: r21570
2013-03-06 17:41:43 +00:00
Erik De Richter 3e3f5c0baf updated nl translation
svn: r21568
2013-03-06 10:15:51 +00:00
Jérôme Rapinat 80db60b332 check gettext syntax complains about missing '\n'
svn: r21566
2013-03-06 08:28:01 +00:00
Jérôme Rapinat c06e8d3b64 update on translations
svn: r21565
2013-03-06 08:18:51 +00:00
Jérôme Rapinat c19c5e2569 Bump alpha-version to 5
svn: r21564
2013-03-06 08:05:12 +00:00
John Ralls 992b161798 [r21561]get_unicode_path_from_env_var(): make no-op if it's already unicode
svn: r21563
2013-03-06 01:12:07 +00:00
John Ralls 2dee2c4d77 [r21560]Adapt HTMLRenderer NavigationView init args to new signature
svn: r21562
2013-03-06 01:11:59 +00:00
Helge Herz 96440156bd GEexiv2 vor Python 2.7.3 and Win (see 6464)
svn: r21558
2013-03-05 21:55:49 +00:00
Espen Berg 588089954a Some small revision of Norwegian bokmål language file for gramps40
svn: r21556
2013-03-05 19:37:45 +00:00
John Ralls 7e749a9e25 [r21554]GrampsLocale:Move setlocale from _set_from_environment to
__init_first_instance

So that encoding is set for Mac as well.

svn: r21555
2013-03-05 17:26:00 +00:00
Paul Franklin 3e0fd433b5 shorten the report name for easier CLI use
svn: r21553
2013-03-05 04:46:22 +00:00
Paul Franklin 8a4732a5d2 tweak the default format for the report
svn: r21550
2013-03-05 01:02:54 +00:00
Mirko Leonhäuser 8371684a98 updated german translation
svn: r21549
2013-03-04 18:36:58 +00:00
Paul Franklin 2828211c6a 6494: svn_revision module ignores translated SVN stdout value for "exported"
svn: r21547
2013-03-04 05:12:53 +00:00
Paul Franklin bf67b3e114 skip error msg if no file exists
svn: r21545
2013-03-04 00:42:39 +00:00
John Ralls d01f7bf7df [r21540]GrampsLocale: Add _win_bindtextdomain
Adapted from init_windows_gettext in Gramps3.
Libintl-8.dll must be on the path, just like all of the other C-library
dependencies.

svn: r21543
2013-03-03 23:59:44 +00:00
John Ralls 1d2b143be9 [r21539]GrampsLocale: Restore setlocale, add GrampsLocale.encoding
encoding to replace translation().info()['encoding'] which isn't
the encoding we're looking for.

svn: r21542
2013-03-03 23:59:39 +00:00
John Ralls debf8b601a [r21538]Win32:Apply \\ escape to all const paths
svn: r21541
2013-03-03 23:59:32 +00:00
Mirko Leonhäuser bcef9fc868 updated german translation
svn: r21537
2013-03-03 12:12:37 +00:00
Serge Noiraud fae194d1a0 Geography : #05742 note 27613 : cairo arguments differ from gtk2 draw arc.
svn: r21535
2013-03-03 10:58:30 +00:00
Jérôme Rapinat 7aa1c2bbde update Portuguese (Europe) translation by Frederico Muñoz
svn: r21532
2013-03-03 09:05:26 +00:00
Paul Franklin 2528da2f2d add ICU/PyICU to "gramps -v"
svn: r21530
2013-03-03 03:19:37 +00:00
Josip Pisoj 8ea29ede81 win32 fix
svn: r21529
2013-03-03 00:08:15 +00:00
John Ralls 4ca0c9f8c9 [r21526]GrampsLocale: Create GrampsTranslation attribute for language
Rather than relying on translators to correctly fill out po files

svn: r21528
2013-03-02 20:28:57 +00:00
John Ralls 5a8a7479dd [r21525]GrampsLocale: Fix glocale without import
svn: r21527
2013-03-02 20:28:49 +00:00
Tim G L Lyons c3f39e7d40 0005058: Note reference on Attribute for individual is not filtered on Export. Fixed many other note references that are not filtered out.
svn: r21523
2013-03-02 19:30:02 +00:00
Paul Franklin 5235a6a6ac add "Id" property
svn: r21521
2013-03-02 15:52:57 +00:00
Jérôme Rapinat 62475bbc87 6500: relative import
svn: r21520
2013-03-02 14:56:13 +00:00
Jérôme Rapinat a33eb1d799 6500: missing glocale
svn: r21519
2013-03-02 14:54:29 +00:00
Peter Landgren 6e73fc8924 Better translation for compare events.
svn: r21517
2013-03-02 13:45:02 +00:00
Helge Herz 06b8b291f8 adaption for python version less 3.x (see issue 6465) for details
svn: r21515
2013-03-02 13:42:17 +00:00
Tim G L Lyons 98fa69b717 0003428: When running with pythonw.exe, Windows may crash if you write to stdout. Some more print statements changed to log.warning.
svn: r21511
2013-03-01 13:12:29 +00:00
Tim G L Lyons 7c9ec32d22 Narrative Web: Fix alphabetic navigation bar and sorting in index pages using PyICU where available. Implements most collate contractions for western languages Gramps has been translated into. This fixes the following bugs:
0002933: Problems in Narrative Web Report with surnames beginning with V or W. Use collation primary difference to define index groupings. Special case for 'V' and 'W' in Swedish removed because the default CLDR has a primary difference between them.

0003434: NarrativeWeb new alphabet index sorted incorrectly. Fix Cyrillic sort order, and contractions for Slovak and Czech (among other languages).

0003933: References inside pages in NarWeb report and non-ascii characters. Sorting issues for Polish characters.

0004423: Web report does not handle Czech "CH" character properly. Dz contraction is not present in the CLDR. Slovak is similar.

0005088: Narrated Web Site Report sort order different Windows vs Linux. Resolved by using PyICU (if available).

0005645: can't sort greek names

0005767: Sorting in Narrative Webb does not work correctly. Fix sorting in Individuals, Surnames, Families, Events and Places to use PyICU (if available). This bug covers sorting in the index header (as well as in the body of the index pages).

svn: r21508
2013-03-01 12:41:19 +00:00
John Ralls e1fb1c5b14 [r21501]RelationshipCalculator: Promote no translation message to warning
And make it more specific.
Thanks to Tim Lyons.

svn: r21505
2013-02-28 20:09:18 +00:00
Serge Noiraud 7541dd5b2e Bug #06459 : change the lock strategy and split transactions in Merge citation.
svn: r21504
2013-02-28 19:57:35 +00:00
John Ralls e8bad4d4c8 [r21492]grampletpane: Fix typo, naked except.
Warn with the reason when Dashboard file can't be opened or parsed.

svn: r21500
2013-02-28 19:23:15 +00:00
John Ralls d704d9ac4b [r21491]MacLocale: Handle AppleCollationOrder returning "root"
svn: r21499
2013-02-28 19:23:04 +00:00
John Ralls d334e0043f [r21490]MacLocale: Allow $LANG to override defaults settings
For currency, calendar, and collation

svn: r21498
2013-02-28 19:22:55 +00:00
John Ralls dede164e69 [r21489]GrampsLocale: Handle errors in getting collation key from locale module
svn: r21497
2013-02-28 19:22:43 +00:00
John Ralls f309f210d1 [r21488]GrampsLocale: Restore call to locale.bindtextdomain() for GtkBuilder
Apparently some Linuxes require it for GtkBuilder to find the localization files. It's not supported on Win32, though, so don't try in that case.

svn: r21496
2013-02-28 19:22:35 +00:00
John Ralls ebe1d0139c [r21487]GrampsLocale: Set collation, currency, and calendar to lang
only on secondary locale objects.

svn: r21495
2013-02-28 19:22:27 +00:00
John Ralls ebcd0bb119 [r21486]GrampsLocale: Use absolute address for importing grampslocale
so that it works from outside of Gramps itself, in particular gramps-addons/contrib/make.py

svn: r21494
2013-02-28 19:22:21 +00:00
John Ralls fc8eb4f445 [r21485]GrampsLocale: Fix get_addon_translator path
Add the locale subdirectory.
Also clean out some cruft left over from the old implementation.

svn: r21493
2013-02-28 19:22:14 +00:00
Nick Hall 3ae8e5cc1e 6408: Restore warning message for missing GExiv2 module
svn: r21484
2013-02-28 15:05:03 +00:00
Jérôme Rapinat a03877e8c9 update Portuguese (Europe) translation by Frederico Muñoz
svn: r21481
2013-02-28 10:20:48 +00:00
Helge Herz 357eb8af19 Python less 3.x uses GdkPixbuf.new_subpixbuf instead dkPixbuf.subpixbuf issue 6487
svn: r21476
2013-02-27 22:21:10 +00:00
Paul Franklin c91eec3d5f rename .__next__ (formerly .next) as it is "NOT an iterator"
svn: r21475
2013-02-27 18:50:47 +00:00
Jérôme Rapinat 870f80fc83 6385: Three minor grammar issues
svn: r21473
2013-02-27 14:35:10 +00:00
Jérôme Rapinat 3ee5b1dec4 "Delete" label instead of "Remove" on Gtk button
svn: r21472
2013-02-27 14:29:32 +00:00
Jérôme Rapinat c37bfc9dbe 6385: Three minor grammar issues
svn: r21471
2013-02-27 14:19:30 +00:00
Jérôme Rapinat bb494a56ca update template and french translation
svn: r21470
2013-02-27 13:39:46 +00:00
Erik De Richter 4a512c7347 updated nl translation
svn: r21469
2013-02-27 10:48:15 +00:00
Paul Franklin e6034cde4b behave gracefully if no GExiv2 under Python3
svn: r21467
2013-02-26 20:36:18 +00:00
Mirko Leonhäuser 5e9837d484 updated german translation
svn: r21466
2013-02-26 19:05:14 +00:00
Tim G L Lyons 57fcc67498 Fix retrieval of version metadata for python3 Gramps.py -L, reverting inadvertent changes in revision 21463
svn: r21465
2013-02-26 18:44:07 +00:00
Tim G L Lyons 3872899ebc Fix retrieval of version metadata for python3 Gramps.py -L
svn: r21463
2013-02-26 17:34:37 +00:00
Tim G L Lyons ad20c91b4f Fix type error in "python3 Gramps.py -L"
svn: r21462
2013-02-26 17:28:41 +00:00
Paul Franklin 5df0c7d3ee 6409 and 6447 Python3 changes (possibly not done yet)
svn: r21460
2013-02-26 17:18:23 +00:00
Tim G L Lyons daae9242bf 0006410: Webcal report crashes and freezes alpha4. For python3 simply opening the file works.
svn: r21457
2013-02-26 17:14:28 +00:00
John Ralls 114a71c13c [r21451]GrampsLocale: Remove all calls to locale.setlocale and locale.bindtextdomain
svn: r21456
2013-02-26 00:24:13 +00:00
John Ralls 7d7cc6f789 [r21450]Addons: Check for two-letter lang as well as 5-char locale
E.g, check fr as well as fr_FR

svn: r21455
2013-02-26 00:23:44 +00:00
John Ralls b99e2e29df [r21449]grampletpane: Replace diagnostic prints with log warnings.
And improve warning when unable to save the Dashboard layout.

svn: r21454
2013-02-26 00:23:31 +00:00
John Ralls 44f065eabf [r21448]grampletpane: Use __future__.unicode_literals instead of cuni()
And get rid of the silly NL = "\n"

svn: r21453
2013-02-26 00:23:21 +00:00
John Ralls b126aa1fc3 [r21447]ConfigManager: Ensure key files are loaded and saved as utf-8
svn: r21452
2013-02-26 00:23:10 +00:00
Paul Franklin e2860c99f6 Python3 changes: __next__ and future division (which is not done yet)
svn: r21445
2013-02-25 18:52:10 +00:00
Paul Franklin 6cd609941f slightly reformat error message
svn: r21444
2013-02-25 16:13:03 +00:00
Jérôme Rapinat 4a23da9500 quick test and update on the french translation
svn: r21442
2013-02-25 14:02:33 +00:00
Jérôme Rapinat 73cdf3d86f update template
svn: r21441
2013-02-25 13:45:25 +00:00
Jérôme Rapinat d24586eb34 update translation strings index
svn: r21440
2013-02-25 13:39:56 +00:00
Jérôme Rapinat 158a5f93fb 6283: Re-enable optimization flag (-O) for python
svn: r21439
2013-02-25 07:26:36 +00:00
John Ralls 7ff24aa9d1 [r21436]Work around lack of locale.LC_MESSAGES on some Windows pythons
svn: r21437
2013-02-24 17:41:31 +00:00
John Ralls bb2bcc4185 Fix missed cuni() in save.
svn: r21434
2013-02-24 16:42:58 +00:00
Peter Landgren c8254b1c68 Fixed a typo, two " was missing.
svn: r21432
2013-02-24 15:27:54 +00:00
Nick Hall 8d06298921 6408: python3 fix
svn: r21431
2013-02-24 13:53:15 +00:00
Paul Franklin 4621970783 revert to the old report name
svn: r21428
2013-02-24 08:39:51 +00:00
Paul Franklin 123a6e0ecf sync gramps40 to trunk (two places)
svn: r21426
2013-02-24 06:06:42 +00:00
John Ralls 3d0fa7a00a Fix Py2 file encoding errors
svn: r21424
2013-02-24 01:49:24 +00:00
John Ralls 400523c7f3 [r21326] GrampsLocale: Correct setting GrampsLocale.languages
Test only first 5 or first 2 characters of the language id against the
list of available translations.

Thanks to Tim Lyons for exposing the error.

svn: r21423
2013-02-24 01:49:15 +00:00
John Ralls 0bbbc76852 [r21287] GrampsLocale: Allow for importing older PyICU packages
svn: r21422
2013-02-24 01:49:07 +00:00
John Ralls 252d2932df [r21282]GrampsLocale: Fix creation of second GrampsLocale
svn: r21421
2013-02-24 01:49:01 +00:00
John Ralls bffb6767aa [r21281] grampslocale: Pretty up the log messages.
svn: r21420
2013-02-24 01:48:42 +00:00
John Ralls 0c07855f37 [r21280]grampslocale.py: Protect against C.UTF-8 not being installed
svn: r21419
2013-02-24 01:48:29 +00:00
John Ralls 088c97106f [r21279]relationship.py: Fix not registering "en_GB" as english.
Also replace diagnostic print with proper logging.

svn: r21418
2013-02-24 01:48:24 +00:00
John Ralls bfa28faf55 [r21276]Handle junk at the end of revision strings
svn: r21417
2013-02-24 01:48:16 +00:00
John Ralls 8222d4c04c [r21275]GrampsLocale: Replace locale functions
locale.strcoll, locale.strxfrm, and conv*_tosrtkey

With GrampsLocale.sort_key (for strxfrm and conv*_tosrtkey) and
GrampsLocale.strcoll.

If ICU is available will use the correct ICU::Collator for the locale,
otherwise falls back to locale.strxfrm -- for which it temporarily
changes the LC_COLLATE locale.

svn: r21416
2013-02-24 00:55:46 +00:00
John Ralls 879c48f57d [r21274]GrampsLocale: Introduce new GrampsLocale attributes
currency, calendar, and collate

svn: r21415
2013-02-24 00:55:32 +00:00
John Ralls 7127f8f2da [r21273] GrampsLocale: Directly set glocale attributes
... in maclocale.mac_setup_localization()

svn: r21414
2013-02-24 00:55:23 +00:00
John Ralls db9daced3c [r21272]GrampsLocale: Extract function __init_from_environment
svn: r21413
2013-02-24 00:55:13 +00:00
John Ralls c42cb6beee [r21271] Add modules for ICU
svn: r21412
2013-02-24 00:55:06 +00:00
John Ralls efa53a0537 [r21236]GrampsLocale: Replace use of get_language_string
... with GrampsLocale.get_language_dict

Permits sorting by localized language name.
Also hides the language code, which the user doesn't really care about.
Removes get_language_string from libtranslate.py, no longer needed.

svn: r21411
2013-02-24 00:54:56 +00:00
John Ralls bbf16cb40c [r21235]GrampsLocale: Use module-specific logger for grampslocale.py
Fixes double-logging problem reported by Tim Lyons.

svn: r21410
2013-02-24 00:54:40 +00:00
John Ralls d62ff6059e [r21182]GrampsLocale: Restructure so for multiple GrampsLocale objects
Only the first dependent upon the environment. All may be created with
parameters which override environment variables or OS settings. See the
GrampsLocale docstring for details.

svn: r21409
2013-02-24 00:54:35 +00:00
John Ralls f3361500c0 [r21181]relationship.py: Remove unused import
svn: r21408
2013-02-24 00:54:26 +00:00
John Ralls df1157e9d4 [r21180]Fix platform detection on OSX
'darwin' is returned by sys.platform, not os.name.

svn: r21407
2013-02-24 00:54:18 +00:00
John Ralls 11ad512f2d [r21179]Fix undefined variable reference, make separate not-loaded
warning

Thanks to Pat Lefebre for reporting the error.

svn: r21406
2013-02-24 00:54:04 +00:00
John Ralls fd559d0d80 [r21170]GrampsLocale: Convert some late-added translations to
GRAMPS_LOCALE

svn: r21405
2013-02-24 00:53:58 +00:00
John Ralls 7a894d9a41 [r21168]GrampsLocale: get_relationship_calculator: Fix missed variable
name change.

svn: r21404
2013-02-24 00:53:47 +00:00
John Ralls b6b3fb8680 [r21156]Descendant Report: Fix changed Sort function name
svn: r21403
2013-02-24 00:53:37 +00:00
John Ralls 755b653925 [r21154]Import get_svn_revision into const.py
via const.py.in, of course

svn: r21402
2013-02-24 00:53:29 +00:00
John Ralls 592f68ab6e [r21153]PdfDocGen: Report cause of failure on all exceptions
not just file open ones. Expat can raise exceptions too!

svn: r21401
2013-02-24 00:53:20 +00:00
John Ralls 0986d69429 [r21152]GrampsLocale: Fix file encoding error in recentfiles
Expat wants a binary file, not a string file.

svn: r21400
2013-02-24 00:53:11 +00:00
John Ralls 98898ddb71 [r21151]GrampsLocale: Get the language code from the global translation
Instead of probing locale.getlocale() and environment variables

svn: r21399
2013-02-24 00:52:59 +00:00
John Ralls 8cbba85cf1 [r21150]GrampsLocale: Use the codeset from the singleton translation
Instead of locale.getlocale() or locale.nl_langinfo

svn: r21398
2013-02-24 00:52:48 +00:00
John Ralls c01846fb84 [r21149]Fix some file resource leaks
I.e., files left open when the opening function exits. This is
a PyDebug warning.

svn: r21397
2013-02-24 00:52:35 +00:00
John Ralls fccfdecd03 [r21148]GrampsLocale: Simplify the file-finding functions
Making use of the fact that GrampsLocale now knows what
encoding to use, and noting that filesystems don't use
more than one encoding to write filenames in directories.

Also specify the encoding on some more files

svn: r21396
2013-02-24 00:52:26 +00:00
John Ralls 3f408af0fa [r21147][Bug 6364] Fix file-opening failures due to unicode content.
svn: r21395
2013-02-24 00:52:07 +00:00
John Ralls 8cea2e239a [r21146]GrampsLocale: Replace calls to sys.getfilesystemencoding
On MSWin and OSX, this call always returns the correct
value (utf-8 on OSX, 'mbcs' on MSWin), but on Linux the
return value is bizarrely dependent upon the environment.

Replace it with a GrampsLocale function which returns 'utf-8'
(the correct value for most Linux file systems) regardless of
the environment.

Also replace its use in print and write functions: It's the
encoding of paths in the filesystem, not of the files's content,
nor of the terminal's capabilities. The former is almost
always utf-8 as long as we write the file, the latter is
given by sys.stdout.encoding. Use the 'backslashreplace' error
handler to avoid exceptions when we need to output unicode
text to an ASCII terminal.

svn: r21394
2013-02-24 00:51:57 +00:00
John Ralls 221c30976f [r21145][Bug 6222]: Get the addons language list from the primary
GrampsLocale instance.

svn: r21393
2013-02-24 00:51:38 +00:00
John Ralls e28e114c95 [r21144]GrampsLocale: Remove ggettext
svn: r21392
2013-02-24 00:51:17 +00:00
John Ralls 3788d52107 [r21143]Localization: Re-implement localization as a class, GrampsLocale
GrampsLocale is effectively a singleton: An instance is created in
const.py and retrieved everywhere.

Translations are provided via Translations classes, which are derived
from GNUTranslations and NullTranslations to provide extra functions
like sgettext.

svn: r21391
2013-02-24 00:46:03 +00:00
John Ralls 740c7036d7 [r21142]Rename trans.py and mactrans.py to grampslocale.py and
maclocale.py

Reflecting discussion on gramps-devel about their affecting more than
just translations.

Provide for a master GrampsLocale instance to be retrieved from
const.py, set by grampsapp.

svn: r21390
2013-02-24 00:45:50 +00:00
Nick Hall eeaf8697f0 6408: Display GExiv2 version rather than pyexiv2 version
svn: r21389
2013-02-23 23:36:23 +00:00
Nick Hall 3fabbe1ecb 6408: Convert Metadata Viewer from pyexiv2 to GExiv2. Move Edit Exif Metadata gramplet into gramps-addons.
svn: r21387
2013-02-23 21:11:29 +00:00
Helge Herz d10d572002 see issue 0006464
svn: r21384
2013-02-23 12:42:24 +00:00
John Ralls 3d0fa69bd0 ImportGedcom: Fix Python3 "dictionary changed size during iteration" errors
svn: r21380
2013-02-19 22:11:35 +00:00
John Ralls a84d51d6b7 Import ProGen: Use python3 print syntax
svn: r21379
2013-02-19 22:11:29 +00:00
John Ralls 88831f8398 Fix Py2 TypeError in GEDCOM export
Due to writing regular strings instead of unicode strings.

svn: r21378
2013-02-19 22:11:21 +00:00
Paul Franklin 945bec0d6c basedocclass==>docclass to match the 20695 changes
svn: r21373
2013-02-19 19:18:59 +00:00
Serge Noiraud dfb6be488d Geography : print suppression
svn: r21371
2013-02-18 19:57:11 +00:00
Serge Noiraud 22bcc94ec0 Geography : bug #06451 note 27413 : the ellipse become a line when it is too small
svn: r21369
2013-02-18 19:40:16 +00:00
Serge Noiraud d02f6a3fb1 Geography : bug #06466 : History change when clicking on one marker
bug #06451 : incomplete precedent patch


svn: r21367
2013-02-17 12:46:13 +00:00
Nick Hall 76eae75da2 Make availability of GraphViz settings depend on output format
svn: r21366
2013-02-16 21:37:07 +00:00
Serge Noiraud 657d8e233f Geography : bug #06451 : Don't see chinese characters in the geography view.
svn: r21363
2013-02-16 13:33:10 +00:00
Nick Hall 5bb9581b15 Improve the descriptions and tooltip for GraphViz aspect ratio option
svn: r21361
2013-02-15 19:44:00 +00:00
Peter Landgren d6c4298ff4 Fixed a typo.
svn: r21360
2013-02-15 08:46:02 +00:00
Paul Franklin 260170ce36 6448: Text Reports>Descendant Report gives an AttributeError: 'Sort' object has no attribute by_birthdate
svn: r21358
2013-02-14 23:42:02 +00:00
John Ralls 801f1b77aa [Bug 6413] Fix importing ProGen files
This isn't a perfect fix because it requires that the ProGen file is
encoded with CP437, which is guaranteed only in Version 3.21 and later.

svn: r21354
2013-02-14 18:36:07 +00:00
Mirko Leonhäuser d5dfa05ff9 updated german translation
svn: r21353
2013-02-13 22:35:21 +00:00
Paul Franklin 808002d419 6247: Crash when attempting to use Book Report
svn: r21352
2013-02-13 18:47:44 +00:00
Serge Noiraud 4dc0f01137 Geography : bug #6442 use the good glib with introspection.
svn: r21348
2013-02-13 13:39:58 +00:00
Tim G L Lyons aa7e0b49e4 Reinstate inadvertent removal of rev 19988 change for bug 5900
svn: r21347
2013-02-13 11:08:52 +00:00
Peter Landgren 3c103143a6 Fixed a typo.
svn: r21345
2013-02-12 15:44:05 +00:00
Serge Noiraud ef65c893ea Geography : replace GObject.timeout_add by glib.timeout_add as it is deprecated
svn: r21342
2013-02-12 08:38:19 +00:00
Erik De Richter 566c3fb32b updated nl translation
svn: r21339
2013-02-11 20:01:57 +00:00
Josip Pisoj db1bd1e114 win32_py3: open use system encoding
svn: r21338
2013-02-10 22:52:19 +00:00
Paul Franklin 866796f5dc 6379: Can not get ancestry or relationship tabs to work
svn: r21336
2013-02-10 21:11:37 +00:00
Erik De Richter fdf740b35c updated nl translation
svn: r21334
2013-02-10 19:29:32 +00:00
Josip Pisoj 1500556d99 win32 changes
svn: r21330
2013-02-10 17:37:56 +00:00
Helge Herz 5e4b2d3bdc Revert svn21254 as discussed in issue 6424
svn: r21328
2013-02-10 14:32:43 +00:00
Tim G L Lyons 880e6c44e7 Revert change 21304 for moving report_options file
svn: r21323
2013-02-08 17:09:50 +00:00
Serge Noiraud 4068bebb3e Geography : synchronize gramps and osm-gps-map for the free maps.
svn: r21319
2013-02-08 07:39:59 +00:00
Serge Noiraud 0465b9cf37 Geography : sometimes crash with unknown people or family.
svn: r21318
2013-02-07 23:25:46 +00:00
Josip Pisoj fed5cc6a71 win32-py3 fix:ValueError: strftime() requires year in [1; 9999]
svn: r21317
2013-02-07 21:43:19 +00:00
Josip Pisoj 69800680a3 adapt setup script for win32
svn: r21316
2013-02-07 21:41:02 +00:00
Tim G L Lyons a3a758fd13 0006411: Navweb crashes alpha4 when creating Media pages
svn: r21314
2013-02-07 16:42:16 +00:00
Benny Malengier eadae6dbc9 use latest gtkspell if available
svn: r21308
2013-02-06 09:24:12 +00:00
Tim G L Lyons 3ee843917e 0003968: [NarWeb] Save/Restore settings for Narrated Website Generation. Change report_options file to be in the database directory, and implement different default report file and directory names based on the Family Tree Name. N.B. On upgrading, if you want to preserve your report_options, copy the report_option.xml file from the .gramps directory to the applicable .gramps.grampsdb.<number> directory. Also don't forget that the default options are to EXCLUDE private and living data.
svn: r21305
2013-02-05 18:07:03 +00:00
Tim G L Lyons 43c49238f5 Fix processing of contractions, and changes to ensure code (after initial lines) for narrativeweb is the same for trunk and gramps34 and gramps40. Also change default name of output directory (see bug 3968) and use website-directory configuration item.
svn: r21303
2013-02-05 18:00:09 +00:00
Peter Landgren 641155478f Fix of gramps -v for Graphviz and ghostscript.
svn: r21302
2013-02-05 15:18:59 +00:00
Tim G L Lyons 6ca692e33a 0006397: Navweb crashes alpha4. date.get_start_date has no attribute 'is_valid'
svn: r21300
2013-02-05 12:17:59 +00:00
Gary Burton 41fdca39dd Bug #6358. gc.DEBUG_OBJECTS removed from python3. Also handle exceptions due to collected weak references.
svn: r21299
2013-02-04 22:01:19 +00:00
Tim G L Lyons bb3ac61359 Change format of console logging messages to have a meaningful timestamp
svn: r21297
2013-02-04 19:15:45 +00:00
John Ralls a00a5ba32d [r21155]Use IMAGE_DIR in geography.py so that map images can be found
when running from source directory.

svn: r21288
2013-02-04 02:15:55 +00:00
Gary Burton efdb6e9fd5 Fix memory leaks.
svn: r21284
2013-02-03 16:25:03 +00:00
Erik De Richter ff12fdc4a3 updated nl translation
svn: r21277
2013-02-02 07:57:33 +00:00
Tim G L Lyons 3ef8a88a11 export file select dialogue does not correctly reject empty filenames - two (probably long standing) coding errors: use of method name 'strip' instead of calling it, and does not isolate the filename from the full pathname
svn: r21269
2013-02-01 17:40:47 +00:00
Peter Landgren 117b5b6594 Updated translation.
svn: r21266
2013-02-01 09:24:29 +00:00
Nick Hall 6a5a78eee0 Fix for --install-scripts option and new --server option
svn: r21264
2013-01-31 22:41:10 +00:00
Jérôme Rapinat ba28adea94 6367: Update the Side/Bottombar text (patch by Patsyblefebre)
svn: r21259
2013-01-31 08:28:03 +00:00
John Ralls 17f938c978 Revert "[r21246]Allow hard-coded paths to be overridden with $XDG_DATA_DIRS"
This reverts r21247

svn: r21256
2013-01-30 14:51:52 +00:00
Benny Malengier 54034d4811 gdkpixbuf support on windows
svn: r21254
2013-01-30 10:05:06 +00:00
Erik De Richter 45fc795964 updated dutch translation
svn: r21252
2013-01-30 09:36:27 +00:00
Jérôme Rapinat 0d9884186a 6384: Update Danish translation by Lars Kristian Lundin
svn: r21250
2013-01-30 09:31:14 +00:00
Erik De Richter e593d753ee updated nl translation
svn: r21248
2013-01-30 08:57:31 +00:00
John Ralls 2cd6aa43e4 [r21246]Allow hard-coded paths to be overridden with $XDG_DATA_DIRS
Necessary for post-installation relocatability.
Also ensure that data installed to share/gramps is in mac bundle.

svn: r21247
2013-01-29 21:14:15 +00:00
Jérôme Rapinat 7c82a5df48 typo
svn: r21244
2013-01-29 15:08:54 +00:00
Jérôme Rapinat 23baca2f09 6377: Danish translation is incomplete (patch by Lars Kristian Lundin)
svn: r21241
2013-01-29 08:47:52 +00:00
Jérôme Rapinat 02fd2409c5 6377: Danish translation is incomplete
svn: r21238
2013-01-28 16:10:30 +00:00
John Ralls 3b4496a808 [r21157]Fix GeoGraphyView.__init__ arg list for simplified bookmarks
svn: r21234
2013-01-27 20:00:42 +00:00
John Ralls 235a1e72fd Mac: Update (and correct) Info.plist for alpha4
svn: r21233
2013-01-27 19:33:13 +00:00
John Ralls 1af985dbc7 Mac: Bump alpha-version to 4
svn: r21232
2013-01-27 17:48:19 +00:00
Jérôme Rapinat 378f24272c behavior has changed on gramplet bars, message needs an update too
svn: r21230
2013-01-27 16:50:13 +00:00
Jérôme Rapinat 6bc5bcf644 re-enable svn revision, alpha4 release has last bug fix for 6371 and fixed translations
svn: r21228
2013-01-26 09:47:46 +00:00
Jérôme Rapinat efbd0e95dd mismatching
svn: r21227
2013-01-26 09:36:37 +00:00
Gary Burton 45a6524247 Bug #6371. Fix memory leak caused by hanging reference to progress meter callback method.
svn: r21224
2013-01-26 09:28:28 +00:00
Jérôme Rapinat 13c58292e3 ready for alpha4
svn: r21222
2013-01-26 08:54:27 +00:00
Jérôme Rapinat 5d8e37807c 0005088: Narrated Web Site Report sort order different Windows vs Linux. Initial commit to resolve the issues on Linux and Mac (provided in both cases PyICU is installed). Windows still needs to be tested, and there may still be some other uses of strxfrm (or strcoll) that need to be fixed; by kulath, see rev21175
svn: r21221
2013-01-26 08:42:40 +00:00
Jérôme Rapinat 5feda5f56c do not need to translate webapp yet
svn: r21220
2013-01-25 15:27:29 +00:00
Doug Blank 5d46ae352d 6364: dead people are shown as alive in narrated web page export
svn: r21218
2013-01-25 12:51:05 +00:00
Mirko Leonhäuser 4c622a7b0f updated german translation
svn: r21217
2013-01-24 20:38:19 +00:00
Jérôme Rapinat 7e7ae7c42b update french translation, new template after checking missing references, Note: there is some webapp strings on template.
svn: r21216
2013-01-24 17:38:40 +00:00
Nick Hall 0e172acd4c 6307: Use untranslated string in filter
svn: r21215
2013-01-24 16:47:36 +00:00
Nick Hall c221c1076a 6360: Fix to work with new model
svn: r21213
2013-01-24 16:28:58 +00:00
Jérôme Rapinat b2ae97c544 typo
svn: r21211
2013-01-24 15:45:34 +00:00
Jérôme Rapinat 38f29ece86 listing missing references
svn: r21209
2013-01-24 15:34:21 +00:00
Erik De Richter 383bd9548a updated dutch translation
svn: r21208
2013-01-24 14:01:07 +00:00
Benny Malengier 97a37439d2 6288: crash: no attribute 'require_version' - better fix
svn: r21206
2013-01-24 08:44:52 +00:00
Jérôme Rapinat 3ba99eb0b0 update french translation
svn: r21205
2013-01-23 19:05:47 +00:00
John Ralls 1e02a60f14 [Bug #6361] try to run soundex tool
Updated for python3

svn: r21204
2013-01-22 22:22:48 +00:00
Mirko Leonhäuser a5ffbb5e08 Fixed one small german translation error
svn: r21202
2013-01-22 21:44:08 +00:00
Gary Burton c36181d024 Bug #6255. Do not use TextIOWrapper when running python2.
svn: r21200
2013-01-22 20:54:34 +00:00
Erik De Richter d91be2fd0b updated dutch translation
svn: r21193
2013-01-22 09:01:44 +00:00
Erik De Richter b23699d9ce updated dutch translation
svn: r21192
2013-01-22 08:19:18 +00:00
Erik De Richter 313dcb77c2 updated dutch translation
svn: r21191
2013-01-21 22:51:38 +00:00
Jérôme Rapinat 348fa98341 "grampletview" is now "dashboardview"
svn: r21190
2013-01-21 15:58:18 +00:00
Peter Landgren 7ac6856b60 Updated translation.
svn: r21185
2013-01-21 14:20:48 +00:00
Erik De Richter e60ffbf83b updated dutch translation
svn: r21183
2013-01-21 08:55:39 +00:00
Gary Burton 5735799057 Bug #6255. Wrap gzip files with TextIOWrapper to allow them to be read as text.
svn: r21176
2013-01-20 17:15:35 +00:00
John Ralls 0446b7405d Add goocanvas-2.0 to gramps dependencies
svn: r21172
2013-01-19 21:46:15 +00:00
Erik De Richter 7be387e8fd updated nl translation
svn: r21167
2013-01-18 19:25:21 +00:00
Nick Hall f0cc7f35d6 Use public interface of Gtk.TreeModel in listview code
svn: r21166
2013-01-18 18:53:38 +00:00
Nick Hall b7d5bed60a 6353: Fix error when setting colours
svn: r21164
2013-01-18 18:25:06 +00:00
Nick Hall c56fb05d1c Remove handle and tooltip columns from models
svn: r21162
2013-01-18 00:04:18 +00:00
Nick Hall 64a8895df9 Tidy up bookmark code
svn: r21161
2013-01-18 00:03:48 +00:00
Nick Hall afefbeedf8 Allow icons as column headings in listviews
svn: r21160
2013-01-17 23:52:07 +00:00
Nick Hall 64ca5d105f 1765: Add private column to views
svn: r21159
2013-01-17 23:51:48 +00:00
Nick Hall 1d3a687c0c 6333: Display optional close button in gramplet bar tabs
svn: r21141
2013-01-17 00:02:38 +00:00
Nick Hall fb56547589 6331: Fix spelling mistakes
svn: r21138
2013-01-15 21:07:16 +00:00
Benny Malengier e91a06dc1b 6338: NotImplementedError on Export a View to a spreadsheet from the People Category
svn: r21135
2013-01-15 19:48:54 +00:00
Nick Hall 096e57e36a Add family filter to match twins
svn: r21133
2013-01-15 18:28:11 +00:00
Benny Malengier 44ea1b0fa8 6330: Can't download ans install addons
svn: r21130
2013-01-15 10:59:06 +00:00
Benny Malengier 3c75de2327 Filter was not working, we need to query global variable when we need it, not once at start
svn: r21128
2013-01-15 10:18:28 +00:00
Benny Malengier ca287ac12e factor out double handle2internal
svn: r21126
2013-01-15 08:49:08 +00:00
Benny Malengier bb392985f0 6329: Crazy citations after XML import of bacuo from Gramps 3.4.3
svn: r21124
2013-01-15 08:43:16 +00:00
Benny Malengier 0625ed8109 6326: Running Export View crashes with 'tuple' object has no attribute 'get_indices'
svn: r21119
2013-01-14 18:57:33 +00:00
Doug Blank 5824a674d6 Changes for 1.6 svn
svn: r21118
2013-01-14 18:40:17 +00:00
Paul Franklin ee7ef78f6d more absolute addressing, not relative
svn: r21116
2013-01-14 18:26:19 +00:00
Doug Blank 6a287a6018 Rename Gramplet View to Dashboard View
svn: r21113
2013-01-14 11:50:32 +00:00
John Ralls 92ba36c349 Fix typo in GI_TYPELIB_PATH
svn: r21111
2013-01-13 21:07:03 +00:00
John Ralls 54fd78c12a Include gi typelibs in bundle
svn: r21109
2013-01-13 20:38:56 +00:00
John Ralls adb8a084a4 Build Graphviz with pango and freetype support
Otherwise it can't output PDFs.
Also update Boost to 1.52.0



svn: r21108
2013-01-13 20:38:27 +00:00
Erik De Richter c133edec8e updated dutch translation
svn: r21105
2013-01-13 19:57:22 +00:00
Nick Hall d3f8f73180 Updates to navigation sidebar
svn: r21104
2013-01-13 17:28:18 +00:00
Benny Malengier c081c5f6f5 6288: crash: no attribute 'require_version'
svn: r21099
2013-01-13 16:50:34 +00:00
Mirko Leonhäuser 41b4634d52 updated german translation
svn: r21095
2013-01-13 02:55:15 +00:00
John Ralls 26ac4a6856 Add lib/girepository folder to bundle
Also Pango environment to find modules


svn: r21094
2013-01-13 02:10:26 +00:00
Andre Marcelo Varenga d4cd826b6f Updating pt_BR translation
svn: r21093
2013-01-13 01:09:01 +00:00
Paul Franklin bd65cfcbea 6229: bug when creating a book reports
svn: r21091
2013-01-13 01:07:47 +00:00
Benny Malengier 8bf43ccabb 6315: Inserting action group 'Bookmarks' into UI manager which already has a group with this name
svn: r21086
2013-01-12 22:20:32 +00:00
Benny Malengier faac8fef8a 6318: Mention in the README that RCS is an optional package
svn: r21084
2013-01-12 15:00:36 +00:00
Benny Malengier 1f825771b5 6321: installed rcs and tried to make an archive
svn: r21082
2013-01-12 14:48:37 +00:00
Nick Hall e677f40cab 6306: Remove focus from the help button in detached gramplet windows
svn: r21081
2013-01-12 00:03:31 +00:00
Benny Malengier f9305d9e7f 6310: Warning dialog "No Home Person" should be helpful and more descriptive
svn: r21078
2013-01-11 22:50:42 +00:00
Benny Malengier 80625063a0 6291: No Text report, with output format ODF, is created
svn: r21076
2013-01-11 22:32:02 +00:00
Nick Hall 5923610e80 6312: Fix Dashboard category icon
svn: r21075
2013-01-11 22:11:07 +00:00
Nick Hall 904dd024c6 6307: Bug fixes for To Do gramplets
svn: r21072
2013-01-11 19:24:01 +00:00
Benny Malengier a4abc9f26a fix error from fix encoding issue for python 3
svn: r21069
2013-01-11 17:20:00 +00:00
Nick Hall f4e6ffb4be 6307: Improved ToDo gramplets
svn: r21068
2013-01-11 16:19:24 +00:00
Benny Malengier 385641f092 fix home button issue in python3
svn: r21065
2013-01-11 15:18:00 +00:00
Benny Malengier e292eb0400 6290: No Text report with output format PDF is created
6292: No Text report, with output format Print... , is created.


svn: r21063
2013-01-11 14:51:26 +00:00
Doug Blank af953dec7c Check for outdated const.py file
svn: r21062
2013-01-11 13:49:54 +00:00
Doug Blank 9a6f472ffd Return correct field types for media path, desc, and mime
svn: r21060
2013-01-11 13:22:43 +00:00
Doug Blank c572259d25 Media Description not reported, typo
svn: r21058
2013-01-11 13:19:46 +00:00
Benny Malengier e613f02469 fix encoding issue for python 3
svn: r21056
2013-01-11 13:04:50 +00:00
Doug Blank 722f0f7589 Need to log in to run reports
svn: r21054
2013-01-10 19:19:33 +00:00
John Ralls 2255acaa62 Updates fro gramps-4.0.0-alpha3
svn: r21052
2013-01-10 18:10:08 +00:00
Doug Blank cac68a4110 Gramps Version number now includes svn
svn: r21051
2013-01-10 17:43:28 +00:00
Nick Hall 599fe33470 6312: Rename Gramplets category to Dashboard
svn: r21049
2013-01-10 10:57:57 +00:00
Nick Hall 222525e035 6309: Wrap text in empty gramplet bar tab
svn: r21047
2013-01-09 19:55:06 +00:00
Benny Malengier 94d452d63c 6311: Export assistant to export a GEDCOM fail
svn: r21044
2013-01-09 10:20:19 +00:00
Benny Malengier b30220b72b 6311: Export assistant to export a GEDCOM fails
svn: r21043
2013-01-09 10:12:23 +00:00
Nick Hall 1604af190d Update .gitignore
svn: r21041
2013-01-08 21:56:44 +00:00
Nick Hall 711aba5272 Update MANIFEST.in
svn: r21040
2013-01-08 21:56:34 +00:00
Nick Hall 2aa9aa1f48 Fix svn revision import
svn: r21036
2013-01-08 18:33:08 +00:00
Nick Hall d62e751285 Change to absolute paths in const.py
svn: r21034
2013-01-08 17:31:57 +00:00
Benny Malengier 2553cdc642 6299: Calendar Gramplet does not display anything
6301: ImportError: No module named QuestionDialog


svn: r21031
2013-01-08 09:03:14 +00:00
Doug Blank 15e44633cf 6067: Narrative Web reports people as Living even when they have a deceased event (but without a date because it is unknown)
svn: r21030
2013-01-08 03:28:20 +00:00
Doug Blank e5194e1462 4646: reports cannot be run from the command line in a non-GUI environment
svn: r21029
2013-01-08 03:03:09 +00:00
Doug Blank af9f421d3f Removed extra else: typo
svn: r21026
2013-01-08 02:35:20 +00:00
Nick Hall a3a8444fbe Restore Makefiles removed by mistake
svn: r21025
2013-01-07 22:28:34 +00:00
Erik De Richter 3401e86c60 updated dutch translation
svn: r21023
2013-01-07 14:10:03 +00:00
Benny Malengier 4b6a95f211 fix error of revision 20699
svn: r21022
2013-01-07 09:17:30 +00:00
Benny Malengier d1765efa49 5972: GUI Crash (metaclass conflict) when some package (e.g. python-gnome2) installed
svn: r21020
2013-01-07 08:19:50 +00:00
Doug Blank 0bd44eeb84 Bugs 5972 and 6132: needed to remove python-gnome2 to run, GUI Crash (metaclass conflict) when some package (e.g. python-gnome2) installed, 6132: metaclass conflict in flatbasemodel.py
svn: r21018
2013-01-07 04:32:53 +00:00
Doug Blank 32b6b27dca typo in args error reporting
svn: r21017
2013-01-06 21:49:47 +00:00
Doug Blank 7dd022bddf display error messages correctly
svn: r21014
2013-01-06 21:40:19 +00:00
Benny Malengier 642f837658 6256: Can't create graph reports
svn: r21011
2013-01-06 21:35:34 +00:00
Doug Blank 5f24c8834c Don't show svnversion non-version response
svn: r21006
2013-01-06 00:34:12 +00:00
Jérôme Rapinat d60bbe812b new location for tips.xml, typo on path
svn: r21004
2013-01-05 14:36:49 +00:00
Jérôme Rapinat eee79d223b new location for tips.xml
svn: r21003
2013-01-05 14:24:51 +00:00
Benny Malengier ddd1aae5c3 06256: Can't create graph reports
svn: r21001
2013-01-05 13:33:03 +00:00
Benny Malengier 17824534cb 6282: Can't create text reports with RTF output format in python 3
svn: r21000
2013-01-05 13:32:12 +00:00
Nick Hall a8c1530436 6276: Fix error installing gramps.png
svn: r20998
2013-01-05 12:09:31 +00:00
Benny Malengier 47fd0cf00f 6256: Can't create graph reports
svn: r20995
2013-01-05 11:34:36 +00:00
Benny Malengier 5105b4fd44 6277: Out of index when creating textreort with PDF format
svn: r20993
2013-01-05 11:18:54 +00:00
Doug Blank 5b8d5b739a Version back to 4.0.0-alpha3; handle version number in const.py
svn: r20991
2013-01-05 02:49:54 +00:00
Nick Hall bb9601a2a0 Move images and data directories. Also svn version code from r20919.
svn: r20990
2013-01-04 23:46:24 +00:00
Paul Franklin 81e1237b3c revert accidental 20685 regression (iteritems)
svn: r20988
2013-01-04 22:58:09 +00:00
Nick Hall 236da6da81 File missed from last commit
svn: r20986
2013-01-04 22:34:09 +00:00
Nick Hall ca9f5de077 Convert filenames to lower case
svn: r20984
2013-01-04 22:28:57 +00:00
Nick Hall 36008d3abe Remove make files from svn:ignore properties
svn: r20983
2013-01-04 21:41:20 +00:00
Nick Hall 80d73f058c Remove remaining make files
svn: r20980
2013-01-04 18:08:04 +00:00
Nick Hall 8d19b0198f 6281: Rename GrampsBar to GrampletBar and move into widgets directory
svn: r20979
2013-01-04 18:06:15 +00:00
Peter Landgren 9c69c3523e Fix of divison issue. There might be more of them.
svn: r20976
2013-01-04 15:40:26 +00:00
Benny Malengier cae2814c97 6273: Detaching Gramplet in Sidebar/Bottombar views are not using full area
svn: r20973
2013-01-04 14:08:25 +00:00
Benny Malengier 421882c0e8 6270: Attempting to accidentally open Book Manager raises a Unhandled exception
svn: r20971
2013-01-04 13:28:20 +00:00
Erik De Richter 49585e1e96 updated dutch translation
svn: r20970
2013-01-03 19:45:50 +00:00
Erik De Richter 904397ff11 updated dutch translation
svn: r20968
2013-01-03 19:01:08 +00:00
Jérôme Rapinat 5aa70b08a6 we are in 2013
svn: r20966
2013-01-03 18:42:11 +00:00
Jérôme Rapinat d080d15352 ready for alpha3
svn: r20964
2013-01-03 18:20:37 +00:00
Jérôme Rapinat f3c4314a89 new strings added for alpha3
svn: r20963
2013-01-03 18:15:08 +00:00
Jérôme Rapinat 2284694530 typo
svn: r20962
2013-01-03 17:48:03 +00:00
Benny Malengier 15edee3a26 support for upgrade of database on python3
svn: r20960
2013-01-03 15:33:50 +00:00
Benny Malengier d0e698ffac note model with wrong tag handle, gracefully continue
svn: r20958
2013-01-03 15:09:18 +00:00
Benny Malengier addfaa933f FIX MAJOR ERROR blocking upgrade of old family trees !
svn: r20956
2013-01-03 11:26:13 +00:00
Benny Malengier e2fc32c4c0 Fix exec problem in python 2 after previous change
svn: r20954
2013-01-03 11:19:05 +00:00
Mirko Leonhäuser 46e8d865b1 updated german translation
svn: r20953
2013-01-03 11:18:16 +00:00
Benny Malengier c208b91184 Recover gracefully from some errors in python3
svn: r20950
2013-01-03 10:28:51 +00:00
Benny Malengier ab6342af70 6258: Error during start of Gramps for certain LANG values
svn: r20948
2013-01-03 09:50:36 +00:00
Doug Blank 715ddbbab3 6274: Tried to use Charts View and receive 'NameError: global name 'gen' is not defined'
svn: r20947
2013-01-03 05:41:28 +00:00
Erik De Richter cc936c589b updated dutch translation
svn: r20945
2013-01-03 00:04:42 +00:00
Doug Blank f554ffd57d URL for Welcome Gramplet was still pointing to 3.3 manual
svn: r20942
2013-01-02 20:26:23 +00:00
John Ralls 46e9edaf59 [r20933]Bug 6268: Fix check_po for python3
svn: r20940
2013-01-02 17:27:39 +00:00
Doug Blank 29620a31ef 6249: Please, add a tag when importing. Adds preference, and tag on import for CSV, XML, and GEDCOM. Cleaned up preferences, and added 'GEDCOM' to add source on import text.
svn: r20939
2013-01-02 07:12:22 +00:00
Doug Blank ca2fd738d0 Wait for report to exist before trying to download
svn: r20937
2013-01-02 03:20:16 +00:00
Doug Blank 821caa8a5f 4719: Narweb Privacy issue, probably_alive uses spouse birth/death directly
svn: r20936
2013-01-02 03:02:25 +00:00
Doug Blank 3a45e70f54 New URL for gramps-addons
svn: r20931
2013-01-01 20:08:45 +00:00
Erik De Richter 89f6c7d83e updated dutch translation
svn: r20928
2013-01-01 16:45:31 +00:00
Benny Malengier ca73e01512 6266: loading plugin manager gives error
svn: r20926
2013-01-01 16:28:47 +00:00
Benny Malengier bfcecc646d 6265: can not make back up
svn: r20923
2013-01-01 11:15:45 +00:00
Jérôme Rapinat 77f9760504 6203: typo when interrupting a gramplet
svn: r20920
2013-01-01 07:15:23 +00:00
Doug Blank 3a93d03a4a Two different types of selection data
svn: r20918
2012-12-31 20:55:52 +00:00
Doug Blank 03851db458 Changes for gtk3 clipboard to work
svn: r20913
2012-12-31 18:57:02 +00:00
Nick Hall 9f87dfd54b Improve check to prevent overwriting const.py
svn: r20911
2012-12-31 18:18:20 +00:00
Benny Malengier 711e25e5bb 6258: Error during start of Gramps for certain LANG values
svn: r20908
2012-12-31 15:00:35 +00:00
Doug Blank f1eecb349d Add timestamp to downloads
svn: r20907
2012-12-31 14:58:45 +00:00
Jérôme Rapinat 04baa6b50f 6112: use get_indices method on TreePath for "old" Gtk version (e.g, 3.6.1)
svn: r20903
2012-12-31 13:39:32 +00:00
Jérôme Rapinat c18d73ea8f update translation template
svn: r20901
2012-12-31 09:59:59 +00:00
Jérôme Rapinat 671f64c08c update NEWS and RELEASE_NOTES files, update ChangeLog (no revision)
svn: r20900
2012-12-31 09:48:50 +00:00
Jérôme Rapinat b9cd27550f Fix structure of build directory for locale files (merged from trunk; changes by Nick.H), road to alpha2
svn: r20899
2012-12-31 09:44:49 +00:00
Benny Malengier 8b26f688cb 6205: Gtk.CALENDAR needs a migration to new GI/GTK3 API
svn: r20896
2012-12-30 23:20:31 +00:00
Doug Blank e41c6db70d Added addons-url to config and Preferences; currently set to invalid URL, but will update in a couple of days when new addons URL comes on-line
svn: r20895
2012-12-30 22:00:58 +00:00
Benny Malengier fdcc02d1bd Fix divisionbyzero in python3
svn: r20888
2012-12-30 17:32:22 +00:00
Benny Malengier f4f5104b72 6205: Gtk.CALENDAR needs a migration to new GI/GTK3 API
Also: don't expand the calendar more than needed to show it.


svn: r20884
2012-12-30 15:41:54 +00:00
Jérôme Rapinat 0caf61b805 avoid specific case with decimal comparison
svn: r20882
2012-12-30 15:28:48 +00:00
Benny Malengier c46a66ecd1 More version strings
svn: r20880
2012-12-30 15:14:40 +00:00
Jérôme Rapinat 35d553b4eb typo
svn: r20879
2012-12-30 10:05:42 +00:00
Erik De Richter 8bc6d475d9 updated dutch translation
svn: r20877
2012-12-29 22:11:31 +00:00
Gary Burton b5fec9d1a3 Set the correct number of update callbacks. Bug #6219.
svn: r20875
2012-12-29 17:20:47 +00:00
Benny Malengier 1a5c516179 6112: Cannot install addons via dialog
svn: r20869
2012-12-28 20:33:01 +00:00
Benny Malengier 054d29612c 6208: Cannot iterate on attributes when trying to paginate via cairodoc
At same time, fix deprecated cairocontext


svn: r20863
2012-12-28 17:21:28 +00:00
Erik De Richter ad066ba200 updated dutch translation
svn: r20862
2012-12-28 16:51:41 +00:00
Benny Malengier ffb3b1e232 6123: Index into undohistory, correct fail on older gobject
svn: r20859
2012-12-28 13:01:28 +00:00
Benny Malengier 76c896f977 Improve hover handling on displaytabs
svn: r20858
2012-12-28 10:27:38 +00:00
Jérôme Rapinat 5e00312139 spacing, tab (fr) and paths for files (en, fr)
svn: r20855
2012-12-28 09:41:22 +00:00
Benny Malengier c7ad3f3295 correct wrong function call
svn: r20851
2012-12-27 17:50:58 +00:00
Mirko Leonhäuser 11723ffd8c updated german translation
svn: r20850
2012-12-27 12:13:26 +00:00
Benny Malengier cb9bebee1e Fix crash on callback after clean_up in gallerytab
svn: r20848
2012-12-26 23:18:50 +00:00
Benny Malengier a9ac56b33c bug 1772: follow cursor to completely resolve bug
svn: r20846
2012-12-26 22:39:40 +00:00
Benny Malengier 19038fab93 bug 1772, correct event handling
svn: r20844
2012-12-26 22:22:07 +00:00
Benny Malengier fd13311aa0 1. context menu on displaytabs showing
2. partially do bug 1772


svn: r20842
2012-12-26 22:15:03 +00:00
Benny Malengier ec0b9fb54b 1567: beautify Relation Ship Graph, remove - if no date of birth or death
svn: r20840
2012-12-26 18:19:17 +00:00
Benny Malengier 8b94955772 GTK3 conversion in tools
svn: r20838
2012-12-24 12:35:40 +00:00
Erik De Richter 9a229466fd updated dutch translation
svn: r20837
2012-12-24 08:16:52 +00:00
Benny Malengier 647c9cfef5 rows_reoredered patch not yet in GTK
svn: r20833
2012-12-23 14:07:16 +00:00
Fedik 29443339cb small translation and uptades
svn: r20832
2012-12-23 14:05:35 +00:00
Erik De Richter f4f2747c65 updated dutch translation
svn: r20830
2012-12-23 08:11:31 +00:00
John Ralls ba7913fe3c Restore include to git.gnome.org
svn: r20828
2012-12-23 02:20:13 +00:00
John Ralls 5526f64e1f Mods for Gtk3, Gramps 4.0.0
svn: r20827
2012-12-23 02:17:31 +00:00
Jérôme Rapinat 0a17eab461 spacing, tab (fr) and VERSION (en, fr)
svn: r20825
2012-12-22 19:48:21 +00:00
Jérôme Rapinat fcce312e0a update used paths and gramps versions
svn: r20823
2012-12-22 17:51:22 +00:00
Benny Malengier 4ed2b0bace Convert validated masked entry to normal gtk.entry with icon
Working background color change on error


svn: r20821
2012-12-22 13:24:21 +00:00
Benny Malengier 759075b3e4 rows_reordered is present again in GTK 3.8
svn: r20820
2012-12-22 09:24:00 +00:00
Erik De Richter 7f4956dd00 updated dutch translation
svn: r20818
2012-12-21 19:59:12 +00:00
Doug Blank e1ab03348e Someone optimized some code incorrectly; lines at bottom of calendar where placed off the page
svn: r20816
2012-12-21 18:57:32 +00:00
Doug Blank 2033fd6567 If you try to lookup an object too early, you might find that the tbl is still a dict; this protects such early lookups from crashing
svn: r20814
2012-12-21 18:34:44 +00:00
Jérôme Rapinat 7c6872c11a alpha1 environment, what should be the VERSION into gen/const.py.in ?
svn: r20810
2012-12-21 14:15:45 +00:00
Jérôme Rapinat 71f87a31b3 update content for 4.0.0-alpha1
svn: r20809
2012-12-21 14:09:38 +00:00
Jérôme Rapinat eb2ca43ff6 avoid fatal errors on norwegian bokmål translation, string status to fuzzy before review
svn: r20808
2012-12-21 13:47:14 +00:00
Jérôme Rapinat 71b951f31d avoid fatal errors on swedish translation, string status to fuzzy before review
svn: r20807
2012-12-21 13:38:45 +00:00
Jérôme Rapinat a542081e25 test update and merge processes with the french translation file
svn: r20806
2012-12-21 13:26:33 +00:00
Jérôme Rapinat 5b8da49bae do not need to check untranslated and fuzzy strings because they have not been reviewed yet; warning this script uses tab for the bloc indentation...
svn: r20804
2012-12-20 17:41:09 +00:00
Benny Malengier 4d7e1043ef On translation error, allow build to continue after asking user
svn: r20802
2012-12-20 16:40:23 +00:00
Jérôme Rapinat 2040716b9c common date handler for Norwegian Bokmål and Norwegian Nynorsk
svn: r20801
2012-12-20 14:16:30 +00:00
Brian Matherly 8a3a477ea4 Create 4.0 branch
svn: r20798
2012-12-20 13:31:33 +00:00
1227 changed files with 970214 additions and 1189049 deletions
+1 -3
View File
@@ -10,11 +10,9 @@ dist/
data/tips.xml
gramps/plugins/lib/holidays.xml
po/.intltool-merge-cache
docs/_build/
# Editing
# Editor
tags
*.swp
# Testing
test/data
+2 -1
View File
@@ -1,4 +1,3 @@
#! /usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
@@ -19,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# $Id$
"""
This is a stub to start Gramps. It is provided for the sole reason of being
able to run gramps from the source directory without setting PYTHONPATH
+1 -187
View File
@@ -1,189 +1,3 @@
2015-05-01
Version 4.1.3, "Thou shalt not count to five", a maintenance release.
* Fix db upgrade failure
* GtkDialog mapped without a transient parent
* [Gedcom} SUBN and SUBM record handling
* [Gedcom] Import/export round trip causes lost information
* [Gedcom] Entering a witness to an event such as marriage might be ignored
* [Gedcom] Gramps can't import estim. date period exported by itself
* [Gedcom] 1/4 and 1/2 ANSEL characters not supported on importing ANSEL
* [Gedcom] Importing file containing multibyte UTF-8 characters fails
* [Gedcom] Import fails for ANSI file under python 3
* [Gedcom] Failure importing ANSEL encoded gedcom file.
* [Gedcom] Characters ignored on a Gedcom encoded ANSI (cp1252 West Europe, USA)
* [Gedcom] NameError in importer
* [Gedcom] Event address is lost on import, i.e. disconnected from event
* Crash on geneweb export with python3
* GuiColorOption missing avail-changed event handler
* Bad generation of [timeline report] ODT files since 4.0.0
* Fix bad handle in explanation note for unknown event
* Fix spurious generation of empty 'Alternative Name' in place.merge()
* Support creating directories in various scenarios
* Attempting to add a bookmark causes an error
* Long series of "unhandled exception" popup boxes while doing a check & repair
* Crash when trying to link existing place as an enclosing place using P0001 number
* HTML view fails to load
* Relationship Graph crashes
* Python3 needs new_subpixbuf not subpixbuf
* Regression: running gramps from crontab fails
* tag_map is not initialized
* Some labels now fit better on citations sidebar filter
* Event columns in web narrative are too narrow
* Problem by start program (launcher)
* Translation string missing in Not Related tool for help and close button
* Date format month/year is not well reported at editing time [in Italian]
* Fix unknown gender relationships handler for the french locale
* Fix a handle type bug on sidebar filter
* Tidy up About dialog
* Cleanup on some man files
* Convert some remaining unicode literals
* Fix mac menubar setting
* Enable python3 to run po/update_po.py
* Updated translations: cs, de, fr, is, nl
2015-02-28
Version 4.1.2, "That's no ordinary rabbit", a maintenance release.
* Error converting python2 utf-8 strings to python3 str when loading data from database
* Removing a parent place from a place leaves a dangling reference
* Error during checking the database
* Stubborn blank space in database won't be removed, fix removing rows in flat list views
* Database upgrade fails if default media path is not set
* Error converting database after upgrade to Gramps 4.1.1
* Error in a single place within the places section
* Entries from the add-or-choose selector of Place/Source/Media/Note cannot be dragged
* Enclosing places tab should work like other similar tabs, new place reference editor
* Association editor refuses dropped persons
* Error on opening twice an object from clipboard
* Incorrect spacing in export assistant file chooser
* New Event types are saved as a disordered list
* Always display main participants
* Place titles can now be generated on-the-fly by a place displayer, default is still to use the place title field
* GEDCOM import of embedded notes attached to media does not work
* Crash on Ancestry.com .ged import; consistent.
* Errors handling owner/submitter information in GEDCOM files.
Only import researcher from GEDCOM or XML if the family tree was originally empty.
* GEDCOM export does not export media attached to citations.
* The fanchart view crashes if max generation is set to 1 away.
* Sidebar Filters do not match placetypes in new placeview, two new filter rules (HasTitle, HasData)
* Fix bug when family has no parents
* Fix bad handle in explanation note for unknown event
* Some labels now fit better on citations sidebar filter
* Views in Geography should not always use the last option set by the user
* Request for keyboard-controlled zoom on Geography view
* Error geography view - Displaying main menu
* Configure screen needs a file selector to select directory for "offline mode" files
* Filter panel on geography view displays improperly
* Detailed descendant report crashes, bibliography (citations)
* Can't disable box shadow in SVG descendant tree
* Descendant tree graphical report, syntax error in svg output
* Regression: Complete Individual report has partially-untranslated output
* Events Page in Narrative Report not working
* Gramps freeze after defining a report style with German cm values
* Various problems with docgen.TextDoc.add_media_object
* Report event attribute name is not translated
* Records Gramplet uses wrong text
* Closing detached gramplet causes python to crash
* Cannot reduce size of gramplets detached from a gramplet bar
* Gramplets don't fill window when detached from dashboard
* ImageMetadata doesn't show metadata
* typo on GLib call, used by an addon only
* Fix error setting gramplet tab label
* Check for active person in session log gramplet
* Spurious spaces in CLI List Family Trees, tab delimited output.
Print statements changed to assemble the whole line before output.
* Gtk3 warning and custom undoableentry widget, see bugzilla_id 644927
* Warnings: deprecated Gtk properties and errors loading theme icon.
Fix: database manager dialog is inconsistent for older gtk+3 versions.
Warnings: deprecated Gtk properties and errors loading theme icon.
Fix: Error loading theme icon 'gtk-apply'
* gramps fails to start with gtk+-3.13.3
* Places in data.gramps are not in the new Place hierarchy
* Upgrade the version of some dependencies for Mac OS and Windows OS.
* Keywords entry in gramps.desktop does not work
* 'Available Gramps Updates for Addons' window not on top
* Some text not translatable in context menu fancharts
* Fix for Unit test
* date inflections in _datehandler.py, update for Ukrainian, Russian, Croatian
* Better support for Serbian and Turkish locales
* New translation: Icelandic
* Re-enable Turkish support after a major review. Thank you Uğur.
* Updated translations: cs, de, eo, fi, fr, hr, hu, it, nb, nn, ru, sk, sr, sv, uk, zh_CN
2014-10-24
Version 4.1.1, "MachineThatGoes...Ping!", a maintenance release.
* Fix custom place types in the place editor
* Allow place type combobox to receive focus.
* Store custom place types in the metadata table
* Fix place type for places without a main location
* Fix bug adding parent places to a new place
* Prevent user creating a cycle in the place hierarchy
* Avoid infinite loop when place cycle encountered
* Prevent creation of a place cycle when merging
* Fix error when no place is selected
* Check that a place has been selected when saving.
* Use the standard place selection widget to be consistent.
* Add a new Top Level place through the Place Reference Editor
* Fix backlinks code in place report
* Backlinks for places can now also be places as well as events.
* Fix check and repair tool for empty placerefs
* Update location utilities to work with proxies
* Place report does not run
* Update place details gramplet
* Locations are now displayed in a new separate gramplet.
* Add check for empty handle in gramplets
* Check DB lock on the recent opened trees list
* Sidebarfilter gramplet does not fit well into People, Events or Media views
* Fix new event default type considering existing events with *default* role
* Rebuild secondary indexes after database upgrade
* Importing gedcom files containing multibyte UTF-8 characters fails
* Ahnentafel Report did not use Christening Date if no Birth Date
* [Narweb:] Missing webpage for media under some circumstances
* Fix narrated web report with gendex option enabled
* Tweak to "default" CSS choice for the narrated web report
* Invalid link for Merge citation Help button
* Fix 'todo' gramplet
* Fix path when using drag & drop to add media
* Limit the number of generations displayed in the ancestor gramplet
* Export of a subset of the tree failed
* Fix issues in python3, and bytes-string mismatch with ICU
* Fix url/uri handling with non-ascii characters under linux and mac
* Fix name format on graphical reports
* Fix name format on textual reports
* Better GUI support for embeded custom attributes list on media object
* Better keys for search under linux shells (.desktop file)
* 'Unknown' person in detailed ancestor report can not be translated
* Translations don't show in many labels
* Ensure python text domain gets the right encoding.
* Translate some punctuation marks
* Various fixes around Geography and osmgpsmap
* Allow gramplets to be displayed in the dashboard only
* Update FSF address
* Add Arabic-script, Islamic-date, Thai script, Married Name and more dates examples
* Fix on czech date handler for calculated and estimated dates
* Enhance Serbian date handler to handle Cyrillic dates
* Simplify Canadian Ash Wednesday holiday
* Re-enable Esperanto support (for non-Windows OS only) after a large review
* New translation: Serbian
* Various fixes in German and Czech
* Updated translations: ar, cs, de, fi, fr, it, sv
2014-06-15
Version 4.1.0, the "Name go in book", new major release.
* GEP 006: Better Place handling
* New Tags support on Event, Place, Repository, Source, and Citation
* Source/Citation Data becomes Attributes
* Add optional support for checksum on Media object
* New place hierarchies model
* By default, you can choose navigator modes with a drop down.
* New Place editor
* Enhanced MediaReference Editor
* Some debug tools move to new gramplets
* Full Python 3 support
* New functions and widgets related to Place and Media selections
* Enhancements on to_struct()
* New methods on Date handlers
* Better support on translation for inflection rules
2014-05-22
Version 4.0.4, "Not the comfy chair", a maintenance release.
* Upgrade to db version 17 fails in Python 3 due to use of iteritems
@@ -352,7 +166,7 @@ Version 3.4.4 of Gramps! "The Ministry of Silly Names", a maintenance release.
* Various updated translations: ca, de, fr, it, nl, pt_BR, ru, sv, uk
2013-03-19
Version 3.4.3 of Gramps! "Whenever life gets you down, Mrs. Brown", a maintenance release.
Version 3.4.3 of Gramps! "'Whenever life gets you down, Mrs. Brown'", a maintenance release.
* Sorting (both in the main display window, and particularly in Narrative Web output) now uses PyICU (if that module is available). Inclusion of PyICU is 'strongly recommended'. This resolves a number of bugs particularly related to sorting of non-Latin characters, and sorting on MS Windows and Mac OS X. Some changes have been made in Narrative Web to support contractions for alphabetic indices.
* The automatic Addon checking and download now works once again (the location used in Gramps 3.4.2 and before had been changed, so the the automatic process was no longer working).
* Import from Pro-Gen has been updated (at last) to take account of the change to Citations (in 3.4.0)
+55 -22
View File
@@ -1,34 +1,67 @@
$Id$
UNSTABLE Gramps 4.0.0 Beta2 release.
This is a technology preview to allow distribution packagers (and plugin
writers) to update their scripts (and plugins). This release is not
production ready, so only use it for testing!
It is recommended that Gramps 4.0.0 be used with python 2.7 since many
dependent packages do not yet have python 3 versions. A determined person
can probably download their sources and build them, however.
The dependencies for Gramps 4.0.0 are _completely_ different than 3.4 due
to the switch to GObject introspection, and the removal of autotools. So
only install 4.0.0 if you are certain you can obtain the dependencies,
see README and INSTALL.
For linux, in Ubuntu 12.10 you can install 4.0.0, but you will need to
compile and install osmgpsmap manually to have the maps working (see
http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion#OsmGpsMap_for_Geography )
Gramps 4.0.0, the "The Miracle of Birth", release.
This is a major release, don't upgrade before verifying your system can run it.
As one of the very first big ($5.4 million), multi-platform (Linux,
Windows, Mac OS X, ...), non-Gnome GTK applications, Gramps makes the
jump to GTK 3. At the same time python 2.7 and python 3 are supported,
though the last must still be considered experimental. Gramps 4.0
further uses distutils for distribution, so the install sequence is changed.
The Gramps developers have tried to make Gramps 4.0 as identical as
possible to 3.4, so no data changes are done, nor are there big interface
changes. In other words, a .gramps backup file of version 4.0 will open
without problems in Gramps 3.4, giving users the possibility to fully try Gramps 4.0.
Don't be mistaken though, a huge amount of code is new and changed!
In order to bring this release we thank the many developers who helped
the GTK support on Mac, Windows and Linux forward. Note however,
Gramps 4.0 will only work on a top of a very recent sortware stack.
A Windows installer will probably not be available soon. In Linux current
distro's don't contain the optional packages in the form Gramps 4.0 needs.
All this should make clear you can safely keep using version 3.4 and wait
for packagers to catch up. People who cannot upgrade the required components
but want to use Gramps 4.0 should use it in Virtualbox.
Major enhancements in Gramps 4.0.0:
* GEP 8: code reorganization: http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
* GEP 8: code reorganization:
http://www.gramps-project.org/wiki/index.php?title=GEPS_008:_File_Organization
* GEP 26: Replace make: http://www.gramps-project.org/wiki/index.php?title=GEPS_026:_Replace_%27make%27_for_Gramps_build
* GEP 26: Replace make:
http://www.gramps-project.org/wiki/index.php?title=GEPS_026:_Replace_%27make%27_for_Gramps_build
* GEP 29: Gtk 3 :http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion
* GEP 29: Gtk 3:
http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion
* GEP 31: Python 3 support: http://www.gramps-project.org/wiki/index.php?title=GEPS_031:_Python_3_support
* GEP 31: Python 3 support:
http://www.gramps-project.org/wiki/index.php?title=GEPS_031:_Python_3_support
* Completely reworked localization handling
Others changes in Gramps 4.0.0:
* The Gramplet view has been renamed Dashboard. This to avoid an overload
of the word Gramplet, and to make it more clear to new users what can
be expected in this view
* GTK 3 uses new themes, so users not on Gnome must set a nice GTK 3
theme to fully appreciate Gramps 4.0. Install a GTK 3 theme and set it.
If Gramps looks ugly, you made an error in this step.
* Different sidebar navigators can be installed
* New Ancestor Fan Chart View and Descendant Fan Chart View, which offer
a lot of insight in your family tree on a small space. Direct printing
is available from these views.
* All wizards are reworked, so the exporter dialog, help and bug report
dialog are different from version 3.4, but offer the same functions
* New To Do Gramplets listing all To Do Notes
* More reports support output in a different language than the interface language
* Narrative Web has been reworked to make it more stable.
More info in the manual
http://www.gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_What%27s_new%3F
+4 -3
View File
@@ -3,9 +3,10 @@
<id type="desktop">gramps.desktop</id>
<licence>CC0</licence>
<description>
<_p>Gramps is a genealogy program that is both intuitive for hobbyists and feature-complete for professional genealogists.</_p>
<_p>It gives you the ability to record the many details of the life of an individual as well as the complex relationships between various people, places and events.</_p>
<_p>All of your research is kept organized, searchable and as precise as you need it to be.</_p>
<_p>Gramps is a genealogy program that is both intuitive for hobbyists and feature-complete for professional genealogists.
It gives you the ability to record the many details of the life of an individual as well as the complex relationships between various people, places and events.
All of your research is kept organized, searchable and as precise as you need it to be.
</_p>
</description>
<url type="homepage">http://gramps-project.org/</url>
<screenshots>
-1
View File
@@ -8,6 +8,5 @@ Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Office;
_Keywords=Genealogy;Family History;Research;Family Tree;GEDCOM;
MimeType=application/x-gramps;application/x-gedcom;application/x-gramps-package;application/x-gramps-xml;
Exec=gramps %F
+12 -30
View File
@@ -5,7 +5,7 @@
#
# Copyright (C) 2001 Graham J. Williams
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2010-2014 Nick Hall
# Copyright (C) 2010-2011 Nick Hall
#
# 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
@@ -25,15 +25,15 @@
-->
<!--
This is the Document Type Definition file for v1.6.0
This is the Document Type Definition file for v1.5.1
of the GRAMPS XML genealogy data format.
Please use the following formal public identifier to identify it:
"-//GRAMPS//DTD GRAMPS XML V1.6.0//EN"
"-//GRAMPS//DTD GRAMPS XML V1.5.1//EN"
For example:
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.6.0//EN"
"http://gramps-project.org/xml/1.6.0/grampsxml.dtd"
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.5.1//EN"
"http://gramps-project.org/xml/1.5.1/grampsxml.dtd"
[...]>
-->
@@ -62,7 +62,7 @@ DATABASE
<!ELEMENT database (header, name-formats?, tags?, events?, people?, families?,
citations?, sources?, places?, objects?, repositories?,
notes?, bookmarks?, namemaps?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.6.0/">
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.5.1/">
<!-- ************************************************************
@@ -215,8 +215,7 @@ EVENT
<!ELEMENT events (event)*>
<!ELEMENT event (type?, (daterange|datespan|dateval|datestr)?, place?, cause?,
description?, attribute*, noteref*, citationref*, objref*,
tagref*)>
description?, attribute*, noteref*, citationref*, objref*)>
<!ATTLIST event
id CDATA #IMPLIED
handle ID #REQUIRED
@@ -230,7 +229,7 @@ SOURCES
<!ELEMENT sources (source)*>
<!ELEMENT source (stitle?, sauthor?, spubinfo?, sabbrev?,
noteref*, objref*, srcattribute*, reporef*, tagref*)>
noteref*, objref*, data_item*, reporef*)>
<!ATTLIST source
id CDATA #IMPLIED
handle ID #REQUIRED
@@ -248,20 +247,16 @@ PLACES
<!ELEMENT places (placeobj)*>
<!ELEMENT placeobj (ptitle?, code?, alt_name*, coord?, placeref*, location*,
objref*, url*, noteref*, citationref*, tagref*)>
<!ELEMENT placeobj (ptitle?, coord?, location*, objref*, url*, noteref*,
citationref*)>
<!ATTLIST placeobj
id CDATA #IMPLIED
handle ID #REQUIRED
priv (0|1) #IMPLIED
change CDATA #REQUIRED
name CDATA #REQUIRED
type CDATA #REQUIRED
>
<!ELEMENT ptitle (#PCDATA)>
<!ELEMENT code (#PCDATA)>
<!ELEMENT alt_name (#PCDATA)>
<!ELEMENT coord EMPTY>
<!ATTLIST coord
@@ -301,7 +296,6 @@ OBJECTS
<!ATTLIST file
src CDATA #REQUIRED
mime CDATA #REQUIRED
checksum CDATA #IMPLIED
description CDATA #REQUIRED
>
@@ -311,7 +305,7 @@ REPOSITORIES
<!ELEMENT repositories (repository)*>
<!ELEMENT repository (rname, type, address*, url*, noteref*, tagref*)>
<!ELEMENT repository (rname, type, address*, url*, noteref*)>
<!ATTLIST repository
id CDATA #IMPLIED
handle ID #REQUIRED
@@ -374,7 +368,7 @@ CITATIONS
<!ELEMENT citations (citation)*>
<!ELEMENT citation ((daterange|datespan|dateval|datestr)?, page?, confidence,
noteref*, objref*, srcattribute*, sourceref, tagref*)>
noteref*, objref*, data_item*, sourceref)>
<!ATTLIST citation
id CDATA #IMPLIED
handle ID #REQUIRED
@@ -499,13 +493,6 @@ SHARED ELEMENTS
value CDATA #REQUIRED
>
<!ELEMENT srcattribute EMPTY>
<!ATTLIST srcattribute
priv (0|1) #IMPLIED
type CDATA #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT place EMPTY>
<!ATTLIST place hlink IDREF #REQUIRED>
@@ -526,11 +513,6 @@ SHARED ELEMENTS
priv (0|1) #IMPLIED
>
<!ELEMENT placeref ((daterange|datespan|dateval|datestr)?)>
<!ATTLIST placeref
hlink IDREF #REQUIRED
>
<!ELEMENT region EMPTY>
<!ATTLIST region
corner1_x CDATA #REQUIRED
+11 -44
View File
@@ -4,7 +4,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2005-2007 Donald N. Allingham
# Copyright (C) 2010-2014 Nick Hall
# Copyright (C) 2010-2011 Nick Hall
#
# 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
@@ -22,16 +22,17 @@
# Written by Alex Roitman
# $Id$
-->
<!--
This is the RELAX NG schema for the Gramps XML genealogy data format.
This is the RELAX NG schema for the GRAMPS XML genealogy data format.
-->
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://gramps-project.org/xml/1.6.0/"
ns="http://gramps-project.org/xml/1.5.1/"
xmlns="http://relaxng.org/ns/structure/1.0">
<start><element name="database">
@@ -427,9 +428,6 @@
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="citation-content">
@@ -443,15 +441,13 @@
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="srcattribute">
<ref name="srcattribute-content"/>
<zeroOrMore><element name="data_item">
<attribute name="key"><text/></attribute>
<attribute name="value"><text/></attribute>
</element></zeroOrMore>
<element name="sourceref">
<ref name="sourceref-content"/>
</element>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="source-content">
@@ -466,31 +462,22 @@
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="srcattribute">
<ref name="srcattribute-content"/>
<zeroOrMore><element name="data_item">
<attribute name="key"><text/></attribute>
<attribute name="value"><text/></attribute>
</element></zeroOrMore>
<zeroOrMore><element name="reporef">
<ref name="reporef-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="place-content">
<ref name="primary-object"/>
<attribute name="name"><text/></attribute>
<attribute name="type"><text/></attribute>
<optional><element name="ptitle"><text/></element></optional>
<optional><element name="code"><text/></element></optional>
<zeroOrMore><element name="alt_name"><text/></element></zeroOrMore>
<optional><element name="coord">
<attribute name="long"><text/></attribute>
<attribute name="lat"><text/></attribute>
</element></optional>
<zeroOrMore><element name="placeref">
<ref name="placeref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="location">
<optional><attribute name="street"><text/></attribute></optional>
<optional><attribute name="locality"><text/></attribute></optional>
@@ -514,9 +501,6 @@
<zeroOrMore><element name="citationref">
<ref name="citationref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="object-content">
@@ -524,8 +508,7 @@
<element name="file">
<attribute name="src"><text/></attribute>
<attribute name="mime"><text/></attribute>
<optional><attribute name="checksum"><text/></attribute></optional>
<optional><attribute name="description"><text/></attribute></optional>
<attribute name="description"><text/></attribute>
</element>
<zeroOrMore><element name="attribute">
<ref name="attribute-content"/>
@@ -555,9 +538,6 @@
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="bookmark-content">
@@ -700,14 +680,6 @@
<ref name="noteref-content"/>
</element></zeroOrMore>
</define>
<define name="srcattribute-content">
<optional><attribute name="priv">
<ref name="priv-content"/>
</attribute></optional>
<attribute name="type"><text/></attribute>
<attribute name="value"><text/></attribute>
</define>
<define name="url-content">
<optional><attribute name="priv">
@@ -772,11 +744,6 @@
<text/>
</define>
<define name="placeref-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
<optional><ref name="date-content"/></optional>
</define>
<define name="tagref-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
</define>
+2 -2
View File
@@ -48,9 +48,9 @@ copyright = u'2012, Gramps project'
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.0'
# The full version, including alpha/beta/rc tags.
release = '4.1.0'
release = '4.0.0-alpha2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+3 -3
View File
@@ -82,9 +82,9 @@ gramps(1) @VERSION@ gramps(1)
**-i** , **--import=** *FILE*
Import data from *FILE* . If you haven't specified a database, then
an empty database is created for you called Family Tree x
(where x is an incrementing number).
Import data from *FILE* . If you haven't specified a database then
a temporary database is used; this is deleted when you exit
gramps.
When more than one input file is given, each has to be preceded
by **-i** flag. The files are imported in the specified order, i.e.
+2 -2
View File
@@ -48,9 +48,9 @@ copyright = u'2012, Gramps project'
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.0'
# The full version, including alpha/beta/rc tags.
release = 'trunk'
release = '4.0.0-alpha2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
+3 -3
View File
@@ -82,8 +82,8 @@ gramps(1) @VERSION@ gramps(1)
**-i** , **--import=** *FICHIER*
Importer des données depuis un *FICHIER* . Si vous n'avez pas
spécifié de base de données, alors une base de données vide
est utilisée.
spécifié de base de données alors une base de données temporaire
est utilisée; elle sera effacée quand vous quitterez gramps.
Quand plus d'un fichier doit être importé, chacun doit être
précédé par la commande **-i** . Ces fichiers sont importés dans le
@@ -152,7 +152,7 @@ gramps(1) @VERSION@ gramps(1)
**Opération**
Si le premie argument de la ligne de commande ne commence pas par un
Si le premier argument de la ligne de commande ne commence pas par un
tiret (i.e. pas d'instruction), gramps va essayer d'ouvrir la base de
données avec le nom donné par le premier argument et démarrer une ses
sion interactive, en ignorant le reste de la ligne de commande.
+5 -5
View File
@@ -1,4 +1,4 @@
.TH "GRAMPS" "1" "09 mars 2015" "4.1" "Gramps"
.TH "GRAMPS" "1" "28 December 2012" "4.0" "Gramps"
.SH NAME
gramps \- Gramps Documentation
.
@@ -106,8 +106,8 @@ sources, vous devez utiliser l\(aqoption d\(aqimport.
.TP
.B \fB\-i\fP , \fB\-\-import=\fP \fIFICHIER\fP
Importer des données depuis un \fIFICHIER\fP . Si vous n\(aqavez pas
spécifié de base de données, alors une base de données vide
est utilisée.
spécifié de base de données alors une base de données temporaire
est utilisée; elle sera effacée quand vous quitterez gramps.
.sp
Quand plus d\(aqun fichier doit être importé, chacun doit être
précédé par la commande \fB\-i\fP . Ces fichiers sont importés dans le
@@ -172,7 +172,7 @@ Imprime le numéro de version pour gramps puis quitte.
.UNINDENT
.TP
.B \fBOpération\fP
Si le premie argument de la ligne de commande ne commence pas par un
Si le premier argument de la ligne de commande ne commence pas par un
tiret (i.e. pas d\(aqinstruction), gramps va essayer d\(aqouvrir la base de
données avec le nom donné par le premier argument et démarrer une ses
sion interactive, en ignorant le reste de la ligne de commande.
@@ -337,6 +337,6 @@ gramps(1) @VERSION@ gramps(1)
.SH AUTHOR
Jerome Rapinat
.SH COPYRIGHT
2015, Gramps project
2012, Gramps project
.\" Generated by docutils manpage writer.
.
+1 -1
View File
@@ -104,7 +104,7 @@ If no action, import or export options are given on the command line then an int
.TP
.BI \-i,\-\^\-import= " FILE"
Import data from \fIFILE\fR. If you haven't specified a database, then an empty database is created for you called Family Tree x (where x is an incrementing number).
Import data from \fIFILE\fR. If you haven't specified a database then a temporary database is used; this is deleted when you exit gramps.
.br
When more than one input file is given, each has to be preceded by \fB\-i\fR
+5 -4
View File
@@ -1,10 +1,10 @@
{% extends "admin/base.html" %}
{% load i18n %}
{% block title %}{{ title }} | Adminstration{% endblock %}
{% block title %}{{ title }} | My New Title{% endblock %}
{% block branding %}
<h1 id="site-name">Administration</h1>
<h1 id="site-name">My new title for the Admin site!</h1>
{% endblock %}
{% block nav-global %}
@@ -13,8 +13,9 @@
.ml {margin:0 10px 10px;display:block;float:left}
</style>
<a href="/" clas="ml">Home</a>
<a href="/admin/" class="ml">Administration home</a>
<a href="/" clas="ml">Website home</a>
<a href="/admin/" class="ml">Admin home</a>
<a href="/admin/members/invoice/" class="ml">Invoices</a>
<a href="/admin/auth/user/?is_active__exact=0" class="ml">New Users</a>
<a href="/admin/auth/user/" class="ml">All Users</a>
{% endif %}
+1 -1
View File
@@ -390,7 +390,7 @@ function buttonOut(button) {
<p id="createdate">
<a href="http://www.gramps-project.org/wiki/index.php?title=Gramps-Connect">Gramps-Connect, version {{gramps_version}}</a>.
</p>
<p id="copyright">&copy; 2009-2013 <a href="http://www.gramps-project.org/">www.gramps-project.org</a>
<p id="copyright">&copy; 2009-2012 <a href="http://www.gramps-project.org/">www.gramps-project.org</a>
</p>
{% endblock %}
</div>
+26 -28
View File
@@ -73,34 +73,6 @@
</table>
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/event/%s" event.handle args %}
<input type="hidden" id="place_return" name="place_return" value=""/>
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/event/" args %}
<input type="hidden" id="place_return" name="place_return" value=""/>
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Event" "/event/add" args %}
{% make_button "?Edit Event" "/event/%s/edit" event.handle args %}
{% make_button "-Delete Event" "/event/%s/delete" event.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
@@ -132,6 +104,32 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/event/%s" event.handle args %}
<input type="hidden" id="place_return" name="place_return" value=""/>
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/event/" args %}
<input type="hidden" id="place_return" name="place_return" value=""/>
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Event" "/event/add" args %}
{% make_button "?Edit Event" "/event/%s/edit" event.handle args %}
{% make_button "-Delete Event" "/event/%s/delete" event.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}
+28 -29
View File
@@ -131,35 +131,6 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/family/%s" family.handle args %}
<input type="hidden" id="father_return" name="father_return" value=""/>
<input type="hidden" id="mother_return" name="mother_return" value=""/>
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/family/" args %}
<input type="hidden" id="father_return" name="father_return" value=""/>
<input type="hidden" id="mother_return" name="mother_return" value=""/>
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Family" "/family/add" args %}
{% make_button "?Edit Family" "/family/%s/edit" family.handle args %}
{% make_button "-Delete Family" "/family/%s/delete" family.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
@@ -200,6 +171,34 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/family/%s" family.handle args %}
<input type="hidden" id="father_return" name="father_return" value=""/>
<input type="hidden" id="mother_return" name="mother_return" value=""/>
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/family/" args %}
<input type="hidden" id="father_return" name="father_return" value=""/>
<input type="hidden" id="mother_return" name="mother_return" value=""/>
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Family" "/family/add" args %}
{% make_button "?Edit Family" "/family/%s/edit" family.handle args %}
{% make_button "-Delete Family" "/family/%s/delete" family.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}
+24 -25
View File
@@ -53,31 +53,6 @@
</tr>
</table>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/media/%s" media.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/media/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Media" "/media/add" args %}
{% make_button "?Edit Media" "/media/%s/edit" media.handle args %}
{% make_button "-Delete Media" "/media/%s/delete" media.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
@@ -105,6 +80,30 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/media/%s" media.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/media/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Media" "/media/add" args %}
{% make_button "?Edit Media" "/media/%s/edit" media.handle args %}
{% make_button "-Delete Media" "/media/%s/delete" media.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}
+17 -18
View File
@@ -70,6 +70,23 @@
</tr>
</table>
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-corner-top ui-state-default"><a class="tab-references" href="#tab-references">Reference</a></li>
<li class="ui-corner-top ui-state-default"><a class="tab-history" href="#tab-history">History</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-references" style="background-color: #f4f0ec;">
{% note_reference_table note user action %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-history" style="background-color: #f4f0ec;">
{% history_table note user action %}
</div>
</div>
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/note/%s" note.handle args %}
@@ -94,24 +111,6 @@
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-corner-top ui-state-default"><a class="tab-references" href="#tab-references">Reference</a></li>
<li class="ui-corner-top ui-state-default"><a class="tab-history" href="#tab-history">History</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-references" style="background-color: #f4f0ec;">
{% note_reference_table note user action %}
</div>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" id="tab-history" style="background-color: #f4f0ec;">
{% history_table note user action %}
</div>
</div>
</div>
</div>
</form>
{% endblock %}
+30 -32
View File
@@ -81,38 +81,6 @@
</div>
</div>
{% if logform %}
<table>
{{logform.as_table}}
</table>
{% endif %}
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/person/%s" person.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/person/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Person" "/person/add" args %}
{% make_button "?Edit Person" "/person/%s/edit" person.handle args %}
{% make_button "-Delete Person" "/person/%s/delete" person.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
@@ -170,6 +138,36 @@
</div>
</div>
{% if logform %}
<table>
{{logform.as_table}}
</table>
{% endif %}
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/person/%s" person.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/person/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Person" "/person/add" args %}
{% make_button "?Edit Person" "/person/%s/edit" person.handle args %}
{% make_button "-Delete Person" "/person/%s/delete" person.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}
+24 -25
View File
@@ -44,31 +44,6 @@
</tr>
</table>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/repository/%s" repository.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/repository/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px">
{% make_button "+Add Repository" "/repository/add" args %}
{% make_button "?Edit Repository" "/repository/%s/edit" repository.handle args %}
{% make_button "-Delete Repository" "/repository/%s/delete" repository.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tab ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
@@ -96,6 +71,30 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/repository/%s" repository.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/repository/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px">
{% make_button "+Add Repository" "/repository/add" args %}
{% make_button "?Edit Repository" "/repository/%s/edit" repository.handle args %}
{% make_button "-Delete Repository" "/repository/%s/delete" repository.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}
+24 -25
View File
@@ -49,31 +49,6 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/source/%s" source.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/source/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Source" "/source/add" args %}
{% make_button "?Edit Source" "/source/%s/edit" source.handle args %}
{% make_button "-Delete Source" "/source/%s/delete" source.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
<!-- Tabs -->
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
@@ -105,5 +80,29 @@
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/source/%s" source.handle args %}
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Save"/>
{% else %}
{% ifequal action "add" %}
{% make_button "Cancel" "/source/" args %}
<input type="hidden" name="action" value="create"/>
<input type="hidden" name="search" value="{{search}}"/>
<input type="hidden" name="page" value="{{page}}"/>
<input type="submit" value="Create"/>
{% else %}
<div style="background-color: lightgray; padding: 2px 0px 0px 2px; clear: both;">
{% make_button "+Add Source" "/source/add" args %}
{% make_button "?Edit Source" "/source/%s/edit" source.handle args %}
{% make_button "-Delete Source" "/source/%s/delete" source.handle args %}
</div>
{% endifequal %}
{% endif %}
{% else %}
{% endif %}
</form>
{% endblock %}
+9 -10
View File
@@ -42,6 +42,15 @@
</tr>
</table>
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a class="tab-references" href="#tab-references" style=":hover {color: black;}">Reference</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-references" style="background-color: #f4f0ec;">
{% tag_reference_table tag user action %}
</div>
</div>
{% if user.is_superuser %}
{% if action == "edit" %}
{% make_button "Cancel" "/tag/%s" tag.handle args %}
@@ -66,16 +75,6 @@
{% endif %}
{% else %}
{% endif %}
<div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs" style="border: none;">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a class="tab-references" href="#tab-references" style=":hover {color: black;}">Reference</a></li>
</ul>
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tab-references" style="background-color: #f4f0ec;">
{% tag_reference_table tag user action %}
</div>
</div>
</form>
{% endblock %}
+1 -1
View File
@@ -89,7 +89,7 @@
<_tip number="48"><b>Web Family Tree Format</b><br/>Gramps can export data to the Web Family Tree (WFT) format. This format allows a family tree to be displayed online using a single file, instead of many html files.</_tip>
<_tip number="49"><b>Making a Genealogy Website</b><br/>You can easily export your family tree to a web page. Select the entire database, family lines or selected individuals to a collection of web pages ready for upload to the World Wide Web.</_tip>
<_tip number="49"><b>Making a Genealogy Website</b><br/>You can easily export your family tree to a web page. Select the entire database, family lines or selected individuals to a collection of web pages ready for upload to the World Wide Web. The Gramps project provides free hosting of websites made with Gramps.</_tip>
<_tip number="50"><b>Reporting Bugs in Gramps</b><br/>The best way to report a bug in Gramps is to use the Gramps bug tracking system at http://bugs.gramps-project.org</_tip>
+1 -1
View File
@@ -3,7 +3,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = GRAMPS_RESOURCES=$$PWD/.. sphinx-build
SPHINXBUILD = sphinx-build
PAPER =
# Internal variables.
+3 -4
View File
@@ -2,7 +2,7 @@
Code Documentation
##################
*Gramps* provides several general API. The most important is the *gen* module, providing access to all code that can be of interest outside of the Gramps program.
*GRAMPS* provides several general API. The most important is the *gen* module, providing access to all code that can be of interest outside of the GRAMPS program.
The :mod:`gen` Module
=======================
@@ -22,7 +22,7 @@ Contents:
gen/gen_proxy
gen/gen_utils
The Gramps Application
The GRAMPS Application
========================
Contents:
@@ -32,12 +32,11 @@ Contents:
corecli/cli
coregui/gui
coregui/gui_widgets
date
relationship
simple
Useful snippets
Usefull snippets
===================
Contents:
+3 -5
View File
@@ -41,16 +41,16 @@ master_doc = 'index'
# General information about the project.
project = u'Gramps'
copyright = u'2012, The Gramps Project'
copyright = u'2013, The Gramps Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.0'
# The full version, including alpha/beta/rc tags.
release = '4.0.99-trunk'
release = '4.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -89,8 +89,6 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, todo entries will be included in the output.
todo_include_todos = True
# -- Options for HTML output ---------------------------------------------------
+19 -2
View File
@@ -153,6 +153,23 @@ Filter Editor
:undoc-members:
:show-inheritance:
*****************************
Gramps Bar
*****************************
.. automodule:: gramps.gui.widgets.grampletbar
.. autoclass:: DetachedWindow
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletBar
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: TabGramplet
:members:
:undoc-members:
:show-inheritance:
*****************************
Navigator
*****************************
@@ -163,7 +180,7 @@ Navigator
:show-inheritance:
*****************************
Plugin Manager
Plugins Manager
*****************************
.. automodule:: gramps.gui.pluginmanager
.. autoclass:: GuiPluginManager
@@ -198,7 +215,7 @@ Utils
:show-inheritance:
*****************************
View Manager
Views Manager
*****************************
.. automodule:: gramps.gui.viewmanager
.. autoclass:: ViewManager
-433
View File
@@ -1,433 +0,0 @@
####################################
The :mod:`gramps.gui.widgets` Module
####################################
.. automodule:: gramps.gui.widgets
*****************************
Basic Entry
*****************************
.. automodule:: gramps.gui.widgets.basicentry
.. autoclass:: BasicEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Buttons
*****************************
.. automodule:: gramps.gui.widgets.buttons
.. autoclass:: IconButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: WarnButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: SimpleButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: PrivacyButton
:members:
:undoc-members:
:show-inheritance:
*****************************
Date Entry
*****************************
.. automodule:: gramps.gui.widgets.dateentry
.. autoclass:: DateEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Expand Collapse Arrow
*****************************
.. automodule:: gramps.gui.widgets.expandcollapsearrow
.. autoclass:: ExpandCollapseArrow
:members:
:undoc-members:
:show-inheritance:
*****************************
Fanchart
*****************************
.. automodule:: gramps.gui.widgets.fanchart
.. autoclass:: FanChartBaseWidget
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: FanChartWidget
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: FanChartGrampsGUI
:members:
:undoc-members:
:show-inheritance:
*****************************
Fanchart Descendant
*****************************
.. automodule:: gramps.gui.widgets.fanchartdesc
.. autoclass:: FanChartDescWidget
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: FanChartDescGrampsGUI
:members:
:undoc-members:
:show-inheritance:
*****************************
Gramplet Bar
*****************************
.. automodule:: gramps.gui.widgets.grampletbar
.. autoclass:: DetachedWindow
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletBar
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: TabGramplet
:members:
:undoc-members:
:show-inheritance:
*****************************
Gramplet Pane
*****************************
.. automodule:: gramps.gui.widgets.grampletpane
.. autoclass:: LinkTag
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletWindow
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GuiGramplet
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GridGramplet
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletPane
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: Configuration
:members:
:undoc-members:
:show-inheritance:
*****************************
Labels
*****************************
.. automodule:: gramps.gui.widgets.labels
.. autoclass:: LinkLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: EditLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: BasicLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GenderLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MarkupLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: DualMarkupLabel
:members:
:undoc-members:
:show-inheritance:
*****************************
Link Box
*****************************
.. automodule:: gramps.gui.widgets.linkbox
.. autoclass:: LinkBox
:members:
:undoc-members:
:show-inheritance:
*****************************
Menu Item
*****************************
.. automodule:: gramps.gui.widgets.menuitem
.. autoclass:: MenuItemWithData
:members:
:undoc-members:
:show-inheritance:
*****************************
Monitored Widgets
*****************************
.. automodule:: gramps.gui.widgets.monitoredwidgets
.. autoclass:: MonitoredCheckbox
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredEntryIndicator
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredSpinButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredText
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredType
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredDataType
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredMenu
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredStrMenu
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredDate
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredComboSelectedEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredTagList
:members:
:undoc-members:
:show-inheritance:
*****************************
Multi Tree View
*****************************
.. automodule:: gramps.gui.widgets.multitreeview
.. autoclass:: MultiTreeView
:members:
:undoc-members:
:show-inheritance:
*****************************
Photo
*****************************
.. automodule:: gramps.gui.widgets.photo
.. autoclass:: Photo
:members:
:undoc-members:
:show-inheritance:
*****************************
Progress Dialog
*****************************
.. automodule:: gramps.gui.widgets.progressdialog
.. autoclass:: LongOpStatus
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: ProgressMonitor
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GtkProgressDialog
:members:
:undoc-members:
:show-inheritance:
*****************************
Shortlist ComboEntry
*****************************
.. automodule:: gramps.gui.widgets.shortlistcomboentry
.. autoclass:: ShortlistComboEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Spring Separator
*****************************
.. automodule:: gramps.gui.widgets.springseparator
.. autoclass:: SpringSeparatorToolItem
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: SpringSeparatorAction
:members:
:undoc-members:
:show-inheritance:
*****************************
Statusbar
*****************************
.. automodule:: gramps.gui.widgets.statusbar
.. autoclass:: Statusbar
:members:
:undoc-members:
:show-inheritance:
*****************************
Styled Text Buffer
*****************************
.. automodule:: gramps.gui.widgets.styledtextbuffer
.. autoclass:: LinkTag
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GtkSpellState
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: StyledTextBuffer
:members:
:undoc-members:
:show-inheritance:
*****************************
Styled Text Editor
*****************************
.. automodule:: gramps.gui.widgets.styledtexteditor
.. autoclass:: StyledTextEditor
:members:
:undoc-members:
:show-inheritance:
*****************************
Tool ComboEntry
*****************************
.. automodule:: gramps.gui.widgets.toolcomboentry
.. autoclass:: ToolComboEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Undoable Buffer
*****************************
.. automodule:: gramps.gui.widgets.undoablebuffer
.. autoclass:: Stack
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableInsert
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableDelete
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableBuffer
:members:
:undoc-members:
:show-inheritance:
*****************************
Undoable Entry
*****************************
.. automodule:: gramps.gui.widgets.undoableentry
.. autoclass:: UndoableInsertEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableDeleteEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Undoable Styled Buffer
*****************************
.. automodule:: gramps.gui.widgets.undoablestyledbuffer
.. autoclass:: UndoableInsertStyled
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableDeleteStyled
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableApplyStyle
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableStyledBuffer
:members:
:undoc-members:
:show-inheritance:
*****************************
Validated Combo Entry
*****************************
.. automodule:: gramps.gui.widgets.validatedcomboentry
.. autoclass:: ValidatedComboEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Validated Masked Entry
*****************************
.. automodule:: gramps.gui.widgets.validatedmaskedentry
.. autoclass:: FadeOut
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MaskedEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: ValidatableMaskedEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Value Action
*****************************
.. automodule:: gramps.gui.widgets.valueaction
.. autoclass:: ValueAction
:members:
:undoc-members:
:show-inheritance:
*****************************
Value Tool Item
*****************************
.. automodule:: gramps.gui.widgets.valuetoolitem
.. autoclass:: ValueToolItem
:members:
:undoc-members:
:show-inheritance:
-7
View File
@@ -10,13 +10,6 @@ DateParser
:undoc-members:
:show-inheritance:
DateStrings
===========
.. automodule:: gramps.gen.datehandler._datestrings
.. autoclass:: DateStrings
:members:
:show-inheritance:
DateDisplay
====================================
.. automodule:: gramps.gen.datehandler._datedisplay
+3 -54
View File
@@ -24,28 +24,14 @@ AddressBase
:undoc-members:
:show-inheritance:
AttributeRootBase
====================================
.. automodule:: gramps.gen.lib.attrbase
.. autoclass:: AttributeRootBase
:members:
:undoc-members:
:show-inheritance:
AttributeBase
====================================
.. automodule:: gramps.gen.lib.attrbase
.. autoclass:: AttributeBase
:members:
:undoc-members:
:show-inheritance:
SrcAttributeBase
====================================
.. autoclass:: SrcAttributeBase
:members:
:undoc-members:
:show-inheritance:
CitationBase
====================================
.. automodule:: gramps.gen.lib.citationbase
@@ -54,13 +40,6 @@ CitationBase
:undoc-members:
:show-inheritance:
IndirectCitationBase
====================================
.. autoclass:: IndirectCitationBase
:members:
:undoc-members:
:show-inheritance:
DateBase
====================================
.. automodule:: gramps.gen.lib.datebase
@@ -268,13 +247,6 @@ Attribute
:undoc-members:
:show-inheritance:
AttributeRoot
====================================
.. autoclass:: AttributeRoot
:members:
:undoc-members:
:show-inheritance:
LdsOrd
====================================
.. automodule:: gramps.gen.lib.ldsord
@@ -351,14 +323,6 @@ PersonRef
:undoc-members:
:show-inheritance:
PlaceRef
====================================
.. automodule:: gramps.gen.lib.placeref
.. autoclass:: PlaceRef
:members:
:undoc-members:
:show-inheritance:
RepoRef
====================================
.. automodule:: gramps.gen.lib.reporef
@@ -368,7 +332,7 @@ RepoRef
:show-inheritance:
*****************************
Table objects
Table object
*****************************
Table object
@@ -378,14 +342,6 @@ Table object
:undoc-members:
:show-inheritance:
Tag
====================================
.. automodule:: gramps.gen.lib.tag
.. autoclass:: Tag
:members:
:undoc-members:
:show-inheritance:
*****************************
Date objects
*****************************
@@ -530,13 +486,6 @@ NoteType
:undoc-members:
:show-inheritance:
PlaceType
=========
.. automodule:: gramps.gen.lib.placetype
:members:
:undoc-members:
:show-inheritance:
RepositoryType
==============
.. automodule:: gramps.gen.lib.repotype
@@ -570,7 +519,7 @@ Privacy
*****************************
PrivateSourceNote
=================
============
.. automodule:: gramps.gen.lib.privsrcnote
.. autoclass:: PrivateSourceNote
+43 -66
View File
@@ -4,12 +4,12 @@ The :mod:`gramps.gen.utils` Module
.. automodule:: gramps.gen.utils
**********************************
Utilities
**********************************
Callback
Utils
====================================
.. automodule:: gramps.gen.utils.alive
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.callback
:members:
:undoc-members:
@@ -18,10 +18,7 @@ Callback
:members:
:undoc-members:
:show-inheritance:
Configuration
====================================
.. automodule:: gramps.gen.utils.configmanager
.. automodule:: gramps.gen.utils.cast
:members:
:undoc-members:
:show-inheritance:
@@ -29,10 +26,7 @@ Configuration
:members:
:undoc-members:
:show-inheritance:
Database
====================================
.. automodule:: gramps.gen.utils.alive
.. automodule:: gramps.gen.utils.configmanager
:members:
:undoc-members:
:show-inheritance:
@@ -40,62 +34,45 @@ Database
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.file
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.grampslocale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.id
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.image
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.keyword
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.lds
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.maclocale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.place
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.string
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.unknown
:members:
:undoc-members:
:show-inheritance:
File
====================================
.. automodule:: gramps.gen.utils.file
:members:
:undoc-members:
:show-inheritance:
Image
====================================
.. automodule:: gramps.gen.utils.image
:members:
:undoc-members:
:show-inheritance:
Locale
====================================
.. automodule:: gramps.gen.utils.grampslocale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.maclocale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.keyword
:members:
:undoc-members:
:show-inheritance:
Place
====================================
.. automodule:: gramps.gen.utils.place
:members:
:undoc-members:
:show-inheritance:
Other
====================================
.. automodule:: gramps.gen.utils.cast
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.id
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.lds
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.string
:members:
:undoc-members:
:show-inheritance:
-7
View File
@@ -1,7 +0,0 @@
person,surname,given
a,"CSV Surname","Given 1"
b,"CSV Surname","Given 2"
marriage,mother,father
1,a,b
1 person surname given
2 a CSV Surname Given 1
3 b CSV Surname Given 2
4 marriage mother father
5 1 a b
+1006 -685
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+1730 -3668
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# gen/__init__.py
# $Id$
#
"""
The core gramps module provides the different packages
+2
View File
@@ -17,6 +17,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Package init for the cli package.
"""
+48 -59
View File
@@ -25,8 +25,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Module responsible for handling the command line arguments for Gramps.
Module responsible for handling the command line arguments for GRAMPS.
"""
#-------------------------------------------------------------------------
@@ -65,31 +67,24 @@ def _split_options(options_str):
Split the options for the action.
Rules:
* Entries in the list of options are separated by commas without
spaces between entries
* List values must be inclosed in brackets ("[" and "]")
* Entries within a list value are separated by commas
* Text values (as a value or as entries in a list) do not have to be
enclosed in quotes unless they include commas or quotation marks.
* Text containing double quotes must be contained in single quotes
* Text containing single quotes must be contained in double quotes
* Text cannot include both single and double quotes
* Entries in the list of options are separated by commas without
spaces between entries
* List values must be inclosed in brackets ("[" and "]")
* Entries within a list value are separated by commas
* Text values (as a value or as entries in a list) do not have to be
enclosed in quotes unless they include commas or quotation marks.
* Text containing double quotes must be contained in single quotes
* Text containing single quotes must be contained in double quotes
* Text cannot include both single and double quotes
Examples:
Multiple options specified::
report -p 'name=ancestor_chart,father_disp=["$n born $b"]'
Using text with commas and quotes::
title="This is some text with ,s and 's"
title='This is some text with ,s and "s'
Using a list of text::
textlist=[row1,row2,"row3 with ' and ,"]
* Multiple options specified:
report -p 'name=ancestor_chart,father_disp=["$n born $b"]'
* Using text with commas and quotes:
title="This is some text with ,s and 's"
title='This is some text with ,s and "s'
* Using a list of text
textlist=[row1,row2,"row3 with ' and ,"]
"""
name = ""
value = ""
@@ -152,16 +147,20 @@ class ArgHandler(object):
"""
This class is responsible for the non GUI handling of commands.
The handler is passed a parser object, sanitizes it, and can execute the
actions requested working on a :class:`.DbState`.
actions requested working on a DbState.
"""
def __init__(self, dbstate, parser, sessionmanager,
errorfunc=None, gui=False):
from .user import User
self.dbstate = dbstate
self.sm = sessionmanager
self.errorfunc = errorfunc
self.gui = gui
self.user = sessionmanager.user
self.user = User(error=self.__error,
auto_accept=parser.auto_accept,
quiet=parser.quiet)
if self.gui:
self.actions = []
self.list = False
@@ -234,7 +233,7 @@ class ArgHandler(object):
else:
self.__error( _('Error: Input Family Tree "%s" does not exist.\n'
"If GEDCOM, Gramps-xml or grdb, use the -i option "
"to import into a Family Tree instead.") % value)
"to import into a family tree instead.") % value)
sys.exit(0)
def __handle_import_option(self, value, family_tree_format):
@@ -273,9 +272,8 @@ class ArgHandler(object):
def __handle_export_option(self, value, family_tree_format):
"""
Handle the "-e" or "--export" option.
.. note:: this can only happen in the CLI version.
Handle the "-e" or "--export" option.
Note: this can only happen in the CLI version.
"""
if self.gui:
return
@@ -321,8 +319,8 @@ class ArgHandler(object):
"""
Attempt to find a database path for the given parameter.
:returns: The path to a Gramps DB or None if a database can not be
deduced.
@return: The path to a Gramps DB
or None if a database can not be deduced.
"""
# First, check if this is the name of a family tree
db_path = self.dbman.get_family_tree_path(db_name_or_path)
@@ -345,16 +343,15 @@ class ArgHandler(object):
#-------------------------------------------------------------------------
def handle_args_gui(self):
"""
Method to handle the arguments that can be given for a GUI session.
:returns: the filename of the family tree that should be opened if
user just passed a famtree or a filename.
1. no options: a family tree can be given, if so, this name is tested
and returned. If a filename, it is imported in a new db and name of
new db returned
2. an open and/or import option can have been given, if so, this is
handled, and None is returned
method to handle the arguments that can be given for a GUI session.
Returns the filename of the family tree that should be opened if
user just passed a famtree or a filename
1/no options: a family tree can be given, if so, this name is
tested and returned. If a filename, it is imported
in a new db and name of new db returned
2/an open and/or import option can have been given, if so, this
is handled, and None is returned
"""
if self.open_gui:
# First check if a Gramps database was provided
@@ -365,7 +362,7 @@ class ArgHandler(object):
# Apparently it is not a database. See if it is a file that
# can be imported.
db_path, title = self.dbman.import_new_db(self.open_gui, self.user)
# Handle the "-l" List Family Trees option.
if db_path:
# Test if not locked or problematic
if not self.check_db(db_path, self.force_unlock):
@@ -376,6 +373,7 @@ class ArgHandler(object):
title = db_path
recent_files(db_path, title)
self.open = db_path
# Handle the "-L" List Family Trees in detail option.
self.__open_action()
else:
sys.exit(0)
@@ -392,8 +390,8 @@ class ArgHandler(object):
Depending on the given arguments, import or open data, launch
session, write files, and/or perform actions.
:param: climan: the manager of a CLI session
:type: :class:`.CLIManager` object
@param: climan: the manager of a CLI session
@type: CLIManager object
"""
# Handle the "-l" List Family Trees option.
if self.list:
@@ -415,8 +413,7 @@ class ArgHandler(object):
print(_("Family Tree \"%s\":") % summary[_("Family Tree")])
for item in sorted(summary):
if item != "Family Tree":
# translators: needed for French, ignore otherwise
print(_(" %s: %s") % (item, summary[item]))
print(" %s: %s" % (item, summary[item]))
sys.exit(0)
# Handle the "-t" List Family Trees, tab delimited option.
@@ -471,10 +468,8 @@ class ArgHandler(object):
def __import_action(self):
"""
Take action for all given import files.
.. note:: Family trees are not supported.
Take action for all given import files. Note: Family trees are
not supported.
If a family tree is open, the import happens on top of it. If not
open, a new family tree is created, and the import done. If this
is CLI, the created tree is deleted at the end (as some action will
@@ -652,14 +647,8 @@ class ArgHandler(object):
category = pdata.category
tool_class = eval('mod.' + pdata.toolclass)
options_class = eval('mod.' + pdata.optionclass)
tool.cli_tool(
dbstate=self.dbstate,
name=name,
category=category,
tool_class=tool_class,
options_class=options_class,
options_str_dict=options_str_dict,
user=self.user)
tool.cli_tool(self.dbstate, name, category, tool_class,
options_class, options_str_dict)
return
msg = _("Unknown tool name.")
else:
+50 -56
View File
@@ -25,8 +25,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Module responsible for handling the command line arguments for Gramps.
Module responsible for handling the command line arguments for GRAMPS.
"""
#-------------------------------------------------------------------------
@@ -131,58 +133,35 @@ class ArgParser(object):
"""
This class is responsible for parsing the command line arguments (if any)
given to gramps, and determining if a GUI or a CLI session must be started.
A filename and/or options may be specified as arguments.
The valid arguments are:
The valid options are:
-O, --open=FAMILY_TREE Open Family Tree
-C, --create=FAMILY_TREE Create on open if new Family Tree
-i, --import=FILENAME Import file
-e, --export=FILENAME Export file
-f, --format=FORMAT Specify Family Tree format
-a, --action=ACTION Specify action
-p, --options=OPTIONS_STRING Specify options
-d, --debug=LOGGER_NAME Enable debug logs
-l List Family Trees
-L List Family Trees in Detail
-t List Family Trees, tab delimited
-u, --force-unlock Force unlock of Family Tree
-s, --show Show config settings
-c, --config=SETTINGS Set config setting(s) and start Gramps
-y, --yes Don't ask to confirm dangerous actions
-q, --quiet Suppress progress indication output
-v, --version Show versions
-h, --help Display the help
--usage Display usage information
If the filename (no options) is specified, the interactive session is
launched using data from filename. In this mode (filename, no options), the
rest of the arguments are ignored. This is a mode suitable by default for
GUI launchers, mime type handlers, and the like.
Possible:
1/ FAMTREE : Just the family tree (name or database dir)
2/ -O, --open=FAMTREE, Open of a family tree
3/ -i, --import=FILE, Import a family tree of any format understood
by an importer, optionally provide -f to indicate format
4/ -e, --export=FILE, export a family tree in required format,
optionally provide -f to indicate format
5/ -f, --format=FORMAT : format after a -i or -e option
6/ -a, --action: An action (possible: 'report', 'tool')
7/ -p, --options=OPTIONS_STRING : specify options
8/ -u, --force-unlock: A locked database can be unlocked by giving
this argument when opening it
If the filename (no flags) is specified, the interactive session is
launched using data from filename.
In this mode (filename, no flags), the rest of the arguments is ignored.
This is a mode suitable by default for GUI launchers, mime type handlers,
and the like
If no filename or -i option is given, a new interactive session (empty
database) is launched, since no data is given anyway.
If -O or -i option is given, but no -e or -a options are given, an
interactive session is launched with the ``FILENAME`` (specified with -i).
interactive session is launched with the FILE (specified with -i).
If both input (-O or -i) and processing (-e or -a) options are given,
interactive session will not be launched.
When using import ot export options (-i or -e), the -f option may be
specified to indicate the family tree format.
Possible values for ``ACTION`` are: 'report', 'book' and 'tool'.
Configuration ``SETTINGS`` may be specified using the -c option. The
settings are of the form config.setting[:value]. If used without a value,
the setting is shown.
If the -y option is given, the user's acceptance of any CLI prompt is
assumed. (see :meth:`.cli.user.User.prompt`)
If the -q option is given, extra noise on sys.stderr, such as progress
indicators, is suppressed.
interactive session will not be launched.
"""
def __init__(self, args):
@@ -219,6 +198,25 @@ class ArgParser(object):
Fill in lists with open, exports, imports, and actions options.
Any errors are added to self.errors
Possible:
1/ Just the family tree (name or database dir)
2/ -O --open: Open of a family tree
3/ -i --import: Import a family tree of any format understood by
an importer, optionally provide -f to indicate format
4/ -e --export: export a family tree in required format, optionally
provide -f to indicate format
5/ -f --format=FORMAT : format after a -i or -e option
6/ -a --action: An action (possible: 'report', 'tool')
7/ -p --options=OPTIONS_STRING : specify options
8/ -u --force-unlock: A locked database can be unlocked by giving
this argument when opening it
9/ -s --show : Show config settings
10/ -c --config=config.setting:value : Set config.setting and start
Gramps without :value, the actual config.setting is shown
11/ -y --yes: assume user's acceptance of any CLI prompt (see cli.user.User.prompt)
12/ -q --quiet: suppress extra noise on sys.stderr, such as progress indicators
"""
try:
# Convert arguments to unicode, otherwise getopt will not work
@@ -324,11 +322,9 @@ class ArgParser(object):
set_value = True
if config.has_default(setting_name):
setting_value = config.get(setting_name)
print(_("Current Gramps config setting: "
"%(name)s:%(value)s")
% {'name' : setting_name,
'value' : repr(setting_value)},
file=sys.stderr)
print(_("Current Gramps config setting: %s:%s")
% (setting_name, repr(setting_value)),
file=sys.stderr)
if set_value:
# does a user want the default config value?
if new_value in ("DEFAULT", _("DEFAULT")):
@@ -338,12 +334,10 @@ class ArgParser(object):
new_value = converter(new_value)
config.set(setting_name, new_value)
# translators: indent "New" to match "Current"
print(_(" New Gramps config setting: "
"%(name)s:%(value)s") %
{'name' : setting_name,
'value' : repr(
config.get(setting_name))},
file=sys.stderr)
print(_(" New Gramps config setting: %s:%s")
% (setting_name,
repr(config.get(setting_name))),
file=sys.stderr)
else:
need_to_quit = True
else:
+17 -19
View File
@@ -20,6 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Provide the management of databases from CLI. This includes opening, renaming,
creating, and deleting of databases.
@@ -133,8 +135,7 @@ class CLIDbManager(object):
self._populate_cli()
def empty(self, val):
"""
Callback that does nothing
"""Callback that does nothing
"""
pass
@@ -225,8 +226,7 @@ class CLIDbManager(object):
return summary_list
def _populate_cli(self):
"""
Get the list of current names in the database dir
""" Get the list of current names in the database dir
"""
# make the default directory if it does not exist
dbdir = os.path.expanduser(config.get('behavior.database-path'))
@@ -266,8 +266,7 @@ class CLIDbManager(object):
return None
def family_tree_list(self):
"""
Return a list of name, dirname of the known family trees
"""Return a list of name, dirname of the known family trees
"""
lst = [(x[0], x[1]) for x in self.current_names]
return lst
@@ -284,7 +283,7 @@ class CLIDbManager(object):
"""
print(_('Import finished...'))
def create_new_db_cli(self, title=None, create_db=True):
def create_new_db_cli(self, title=None):
"""
Create a new database.
"""
@@ -301,10 +300,9 @@ class CLIDbManager(object):
name_file.write(title)
name_file.close()
if create_db:
# write the version number into metadata
newdb = DbBsddb()
newdb.write_version(new_path)
# write the version number into metadata
newdb = DbBsddb()
newdb.write_version(new_path)
(tval, last) = time_val(new_path)
@@ -324,14 +322,14 @@ class CLIDbManager(object):
A new database will only be created if an appropriate importer was
found.
:param filename: a fully-qualified path, filename, and
extension to open.
@param filename: a fully-qualified path, filename, and
extension to open.
:param user: a :class:`.cli.user.User` or :class:`.gui.user.User`
instance for managing user interaction.
@param user: a cli.User or gui.User instance for managing user
interaction.
:returns: A tuple of (new_path, name) for the new database
or (None, None) if no import was performed.
@return: A tuple of (new_path, name) for the new database
or (None, None) if no import was performed.
"""
pmgr = BasePluginManager.get_instance()
# check to see if it isn't a filename directly:
@@ -385,7 +383,7 @@ class CLIDbManager(object):
def is_locked(self, dbpath):
"""
Returns True if there is a lock file in the dirpath
returns True if there is a lock file in the dirpath
"""
if os.path.isfile(os.path.join(dbpath,"lock")):
return True
@@ -393,7 +391,7 @@ class CLIDbManager(object):
def needs_recovery(self, dbpath):
"""
Returns True if the database in dirpath needs recovery
returns True if the database in dirpath needs recovery
"""
if os.path.isfile(os.path.join(dbpath,"need_recover")):
return True
+15 -22
View File
@@ -19,11 +19,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Provides the startcli function, which the main program calls for CLI
execution of Gramps.
execution of GRAMPS.
Provides also two small base classes: :class:`CLIDbLoader`, :class:`CLIManager`
Provides also two small base classes: CLIDbLoader, CLIManager
"""
#-------------------------------------------------------------------------
@@ -71,8 +73,8 @@ from gramps.gen.recentfiles import recent_files
#-------------------------------------------------------------------------
class CLIDbLoader(object):
"""
Base class for Db loading action inside a :class:`.DbState`. Only the
minimum is present needed for CLI handling
Base class for Db loading action inside a dbstate. Only the minimum is
present needed for CLI handling
"""
def __init__(self, dbstate):
self.dbstate = dbstate
@@ -94,11 +96,9 @@ class CLIDbLoader(object):
def _dberrordialog(self, msg):
"""
Show a database error.
:param msg: an error message
:type msg : string
.. note:: Inherit for GUI action
@param: msg : an error message
@type: string
@note: Inherit for GUI action
"""
self._errordialog( '', _("Low level database corruption detected")
+ '\n' +
@@ -208,12 +208,12 @@ class CLIDbLoader(object):
class CLIManager(object):
"""
Sessionmanager for Gramps. This is in effect a reduced :class:`.ViewManager`
Sessionmanager for GRAMPS. This is in effect a reduced viewmanager
instance (see gui/viewmanager), suitable for CLI actions.
Aim is to manage a dbstate on which to work (load, unload), and interact
with the plugin session
"""
def __init__(self, dbstate, setloader, user):
def __init__(self, dbstate, setloader):
self.dbstate = dbstate
if setloader:
self.db_loader = CLIDbLoader(self.dbstate)
@@ -221,7 +221,6 @@ class CLIManager(object):
self.db_loader = None
self.file_loaded = False
self._pmgr = BasePluginManager.get_instance()
self.user = user
def open_activate(self, path):
"""
@@ -324,10 +323,9 @@ class CLIManager(object):
def startcli(errors, argparser):
"""
Starts a cli session of Gramps.
:param errors: errors already encountered
:param argparser: :class:`.ArgParser` instance
Starts a cli session of GRAMPS.
errors : errors already encountered
argparser : ArgParser instance
"""
if errors:
#already errors encountered. Show first one on terminal and exit
@@ -347,13 +345,8 @@ def startcli(errors, argparser):
#we need to keep track of the db state
dbstate = DbState()
#we need a manager for the CLI session
from .user import User
user=User(auto_accept=argparser.auto_accept,
quiet=argparser.quiet)
climanager = CLIManager(dbstate, setloader=True, user=user)
climanager = CLIManager(dbstate, True)
#load the plugins
climanager.do_reg_plugins(dbstate, uistate=None)
# handle the arguments
+2 -1
View File
@@ -25,6 +25,7 @@
#
# cli.plug.__init__
#
# $Id$
#-------------------------------------------------------------------------
@@ -690,7 +691,7 @@ def run_report(db, name, **options_str_dict):
filename in clr.option_class.get_output()
"""
dbstate = DbState()
climanager = CLIManager(dbstate, setloader=False, user=User()) # don't load db
climanager = CLIManager(dbstate, False) # don't load db
climanager.do_reg_plugins(dbstate, None)
pmgr = BasePluginManager.get_instance()
cl_list = pmgr.get_reg_reports()
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
""" Unittest for argparser.py """
from __future__ import print_function
+17 -30
View File
@@ -18,19 +18,17 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
""" CLI tests for gramps """
# $Id$
from __future__ import unicode_literals
""" CLI tests for gramps """
import os
import unittest
import re
import io
import sys
import subprocess
from gramps.gen.constfunc import cuni
from gramps.gen.const import TEMP_DIR
test_ged = """0 HEAD
1 SOUR min1r.ged min 1-rec
@@ -51,8 +49,8 @@ if sys.version_info[0] < 3:
##
ddir = os.path.dirname(__file__)
min1r = os.path.join(ddir, "min1r.ged")
out_ged = os.path.join(ddir, "test_out.ged")
min1r = os.path.join(ddir,"min1r.ged")
out_ged = os.path.join(ddir,"test_out.ged")
class Test(unittest.TestCase):
def setUp(self):
@@ -65,8 +63,7 @@ class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
if not os.path.exists(min1r):
with io.open(min1r, "w") as f:
f.write(test_ged)
open(min1r,"wb").write(test_ged)
@classmethod
def tearDownClass(cls):
@@ -86,17 +83,11 @@ class Test(unittest.TestCase):
ifile = min1r
ofile = out_ged
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
process = subprocess.Popen("python %s" % gcmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
result_str, err_str = process.communicate()
self.assertEqual(process.returncode, 0,
"executed CLI command %r" % gcmd)
rc = os.system("python %s" % gcmd)
self.assertEquals(rc, 0, "executed CLI cmmand %r" % gcmd)
# simple validation o output
self.assertTrue(os.path.isfile(ofile), "output file created")
with io.open(ofile) as f:
content = f.read()
content = open(ofile).read()
g = re.search("INDI", content)
self.assertTrue(g, "found 'INDI' in output file")
@@ -104,24 +95,20 @@ class Test(unittest.TestCase):
# get cleaned before (and after) running a CLI
# (eg cleanout stale files from prior crash-runs)
def test3_files_in_import_dir(self):
ddir = os.path.join(TEMP_DIR, "import_dbdir")
from gramps.gen.const import TEMP_DIR
ddir = os.path.join(TEMP_DIR,"import_dbdir")
os.makedirs(ddir)
bogofiles = [os.path.join(ddir, fn) for fn in ("family.db", "lock")]
bogofiles = [os.path.join(ddir,fn)
for fn in ("family.db", "lock")]
for fn in bogofiles:
with io.open(fn, "w") as f:
f.write("garbage")
f = open(fn, "w").write("garbage")
# ~same as test 2
ifile = min1r
ofile = out_ged
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
process = subprocess.Popen("python %s" % gcmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
result_str, err_str = process.communicate()
self.assertEqual(process.returncode, 0,
"executed CLI command %r" % gcmd)
rc = os.system("python %s" % gcmd)
self.assertEquals(rc, 0, "executed CLI cmmand %r" % gcmd)
for fn in bogofiles:
self.assertFalse(os.path.exists(fn))
@@ -156,10 +143,10 @@ class UnicodeTest(unittest.TestCase):
def test4_arbitrary_uncode_path(self):
(dbpath, title) = self.cli.create_new_db_cli(self.newtitle)
self.assertEqual(self.newpath, os.path.dirname(dbpath),
self.assertEquals(self.newpath, os.path.dirname(dbpath),
"Compare paths %s and %s" % (repr(self.newpath),
repr(dbpath)))
self.assertEqual(self.newtitle, title, "Compare titles %s and %s" %
self.assertEquals(self.newtitle, title, "Compare titles %s and %s" %
(repr(self.newtitle), repr(title)))
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
""" Unittest for user.py """
from __future__ import print_function
+42 -40
View File
@@ -17,6 +17,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
"""
The User class provides basic interaction with the user.
@@ -54,14 +56,14 @@ _SPINNER = ['|', '/', '-', '\\']
class User(user.User):
"""
This class provides a means to interact with the user via CLI.
It implements the interface in :class:`.gen.user.User`
It implements the interface in gramps.gen.user.User()
"""
def __init__(self, callback=None, error=None, auto_accept=False, quiet=False):
"""
Init.
:param error: If given, notify_error delegates to this callback
:type error: function(title, error)
@param error: If given, notify_error delegates to this callback
@type error: function(title, error)
"""
user.User.__init__(self, callback, error)
self.steps = 0;
@@ -81,15 +83,15 @@ class User(user.User):
"""
Start showing a progress indicator to the user.
:param title: the title of the progress meter
:type title: str
:param message: the message associated with the progress meter
:type message: str
:param steps: the total number of steps for the progress meter.
a value of 0 indicates that the ending is unknown and the
meter should just show activity.
:type steps: int
:returns: none
@param title: the title of the progress meter
@type title: str
@param message: the message associated with the progress meter
@type message: str
@param steps: the total number of steps for the progress meter.
a value of 0 indicates that the ending is unknown and the
meter should just show activity.
@type steps: int
@returns: none
"""
self._fileout.write(message)
self.steps = steps
@@ -117,23 +119,22 @@ class User(user.User):
"""
self._fileout.write("\r100%\n")
def prompt(self, title, message, accept_label, reject_label, parent=None):
def prompt(self, title, message, accept_label, reject_label):
"""
Prompt the user with a message to select an alternative.
:param title: the title of the question, e.g.: "Undo history warning"
:type title: str
:param message: the message, e.g.: "Proceeding with the tool will erase
the undo history. If you think you may want to revert
running this tool, please stop here and make a backup
of the DB."
:type question: str
:param accept_label: what to call the positive choice, e.g.: "Proceed"
:type accept_label: str
:param reject_label: what to call the negative choice, e.g.: "Stop"
:type reject_label: str
:returns: the user's answer to the question
:rtype: bool
@param title: the title of the question, e.g.: "Undo history warning"
@type title: str
@param message: the message, e.g.: "Proceeding with the tool will
erase the undo history. If you think you may want to revert
running this tool, please stop here and make a backup of the DB."
@type question: str
@param accept_label: what to call the positive choice, e.g.: "Proceed"
@type accept_label: str
@param reject_label: what to call the negative choice, e.g.: "Stop"
@type reject_label: str
@returns: the user's answer to the question
@rtype: bool
"""
accept_label = accept_label.replace("_", "")
reject_label = reject_label.replace("_", "")
@@ -153,11 +154,11 @@ class User(user.User):
"""
Warn the user.
:param title: the title of the warning
:type title: str
:param warning: the warning
:type warning: str
:returns: none
@param title: the title of the warning
@type title: str
@param warning: the warning
@type warning: str
@returns: none
"""
self._fileout.write("%s %s" % (title, warning))
@@ -165,11 +166,11 @@ class User(user.User):
"""
Notify the user of an error.
:param title: the title of the error
:type title: str
:param error: the error message
:type error: str
:returns: none
@param title: the title of the error
@type title: str
@param error: the error message
@type error: str
@returns: none
"""
if self.error_function:
self.error_function(title, error)
@@ -180,9 +181,9 @@ class User(user.User):
"""
Notify the user of a DB error.
:param error: the error message
:type error: str
:returns: none
@param error: the error message
@type error: str
@returns: none
"""
self.notify_error(
_("Low level database corruption detected"),
@@ -195,4 +196,5 @@ class User(user.User):
"""
Displays information to the CLI
"""
self._fileout.write("{} {}\n".format(msg1, infotext))
self._fileout.write(msg1)
self._fileout.write(infotext)
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# gen/__init__.py
# $Id$
#
"""
The gen module provides packages that are common to all gramps
+4 -8
View File
@@ -4,7 +4,7 @@
#
# Copyright (C) 2005-2007 Donald N. Allingham
# Copyright (C) 2008-2009 Gary Burton
# Copyright (C) 2009-2012 Doug Blank <doug.blank@gmail.com>
# Copyright (C) 2009 Doug Blank <doug.blank@gmail.com>
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
This package implements access to GRAMPS configuration.
"""
@@ -150,7 +152,7 @@ register('behavior.surname-guessing', 0)
register('behavior.use-tips', False)
register('behavior.welcome', 100)
register('behavior.web-search-url', 'http://google.com/#&q=%(text)s')
register('behavior.addons-url', "http://svn.code.sf.net/p/gramps-addons/code/branches/gramps41/")
register('behavior.addons-url', "http://svn.code.sf.net/p/gramps-addons/code/branches/gramps40/")
register('export.proxy-order', [
["privacy", 0],
@@ -169,7 +171,6 @@ register('geography.zoom', 0)
register('geography.zoom_when_center', 12)
register('geography.show_cross', False)
register('geography.path', "")
register('geography.use-keypad', True)
register('htmlview.start-url', "http://gramps-project.org")
register('htmlview.url-handler', False)
@@ -245,10 +246,6 @@ register('interface.person-sel-height', 450)
register('interface.person-sel-width', 600)
register('interface.person-width', 750)
register('interface.place-height', 450)
register('interface.place-name-height', 100)
register('interface.place-name-width', 450)
register('interface.place-ref-height', 450)
register('interface.place-ref-width', 600)
register('interface.place-sel-height', 450)
register('interface.place-sel-width', 600)
register('interface.place-width', 650)
@@ -296,7 +293,6 @@ register('preferences.hide-ep-msg', False)
register('preferences.invalid-date-format', "<b>%s</b>")
register('preferences.iprefix', 'I%04d')
register('preferences.name-format', 1)
register('preferences.place-format', 0)
register('preferences.patronimic-surname', False)
register('preferences.no-given-text', "[%s]" % _("Missing Given Name"))
register('preferences.no-record-text', "[%s]" % _("Missing Record"))
+10 -7
View File
@@ -21,6 +21,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Provides constants for other modules
"""
@@ -49,7 +51,7 @@ from .constfunc import get_env_var, conv_to_unicode
#
#-------------------------------------------------------------------------
PROGRAM_NAME = "Gramps"
from gramps.version import VERSION, VERSION_TUPLE, major_version
from ..version import VERSION, VERSION_TUPLE, major_version
#-------------------------------------------------------------------------
#
# Standard GRAMPS Websites
@@ -134,8 +136,8 @@ sys.path.insert(0, ROOT_DIR)
git_revision = get_git_revision(ROOT_DIR)
if sys.platform == 'win32' and git_revision == "":
git_revision = get_git_revision(os.path.split(ROOT_DIR)[1])
#VERSION += git_revision
VERSION += "-1"
VERSION += git_revision
#VERSION += "-1"
#
# Glade files
@@ -193,8 +195,8 @@ GTK_GETTEXT_DOMAIN = 'gtk30'
#-------------------------------------------------------------------------
COPYRIGHT_MSG = "© 2001-2006 Donald N. Allingham\n" \
"© 2007-2015 The Gramps Developers"
COMMENTS = _("Gramps\n (Genealogical Research and Analysis "
"Management Programming System)\n"
COMMENTS = _("Gramps (Genealogical Research and Analysis "
"Management Programming System)\n"
"is a personal genealogy program.")
AUTHORS = [
"Alexander Roitman",
@@ -215,6 +217,9 @@ DOCUMENTERS = [
'Alexander Roitman',
]
TRANSLATORS = _('TRANSLATORS: Translate this to your '
'name in your native language')
#-------------------------------------------------------------------------
#
# Constants
@@ -225,8 +230,6 @@ THUMBSCALE_LARGE = 180.0
XMLFILE = "data.gramps"
NO_SURNAME = "(%s)" % _("none")
NO_GIVEN = "(%s)" % _("none")
ARABIC_COMMA = "،"
ARABIC_SEMICOLON = "؛"
#-------------------------------------------------------------------------
#
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Some independent constants/functions that can be safely imported
without any translation happening yet. Do _not_ add imports that will
+4 -16
View File
@@ -18,12 +18,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Class handling language-specific selection for date parser and displayer.
"""
from __future__ import print_function, unicode_literals
#-------------------------------------------------------------------------
#
# set up logging
@@ -36,7 +36,6 @@ _ = glocale.translation.sgettext
# import prerequisites for localized handlers
from ._datehandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY,
register_datehandler)
from . import _datestrings
# Import all the localized handlers
from . import _date_ar
@@ -92,16 +91,5 @@ except:
# Import utility functions
from ._dateutils import *
from ._grampslocale import (codeset, tformat)
if __name__ == "__main__":
from ._datedisplay import DateDisplay
m = 0
for l,d in LANG_TO_DISPLAY.items():
if len(l) != 2:
continue
m = max(m, len(d.formats))
print("{}: {} {} own dg: {}".format(
l, len(d.formats), d.formats,
d._display_gregorian != DateDisplay._display_gregorian))
print("MAX: ", m)
from ._grampslocale import (codeset, month_to_int, long_months, short_months,
long_days, short_days, tformat)
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Arabic-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Bulgarian-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
# Catalan Version, 2008
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
"""
Czech-specific classes for parsing and displaying dates.
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
"""
Danish-specific classes for parsing and displaying dates.
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
German-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -20,6 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Greek-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Spanish-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Finnish-specific classes for parsing and displaying dates.
"""
+183 -114
View File
@@ -21,6 +21,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#-------------------------------------------------------------------------
#
# Python modules
@@ -58,15 +60,92 @@ class DateParserFR(DateParser):
month_to_int = DateParser.month_to_int
# Custom short months not the same as long months
month_to_int["janv"] = 1
month_to_int["févr"] = 2
month_to_int["juil"] = 7
month_to_int["sept"] = 9
month_to_int["oct"] = 10
month_to_int["déc"] = 12
# Add common value
month_to_int["bluviose"] = 5
month_to_int["vendose"] = 6
month_to_int["7bre"] = 9
month_to_int["8bre"] = 10
month_to_int["9bre"] = 11
month_to_int["10bre"] = 12
month_to_int["xbre"] = 12
# Add common latin
month_to_int["januaris"] = 1
month_to_int["januarii"] = 1
month_to_int["januarius"] = 1
month_to_int["februaris"] = 2
month_to_int["februarii"] = 2
month_to_int["februarius"] = 2
month_to_int["martii"] = 3
month_to_int["martius"] = 3
month_to_int["aprilis"] = 4
month_to_int["maius"] = 5
month_to_int["maii"] = 5
month_to_int["junius"] = 6
month_to_int["junii"] = 6
month_to_int["julius"] = 7
month_to_int["julii"] = 7
month_to_int["augustus"] = 8
month_to_int["augusti"] = 8
month_to_int["septembris"] = 9
month_to_int["7bris"] = 9
month_to_int["september"] = 9
month_to_int["october"] = 10
month_to_int["octobris"] = 10
month_to_int["8bris"] = 10
month_to_int["novembris"] = 11
month_to_int["9bris"] = 11
month_to_int["november"] = 11
month_to_int["decembris"] = 12
month_to_int["10bris"] = 12
month_to_int["xbris"] = 12
month_to_int["december"] = 12
#local and historical variants
# Add common on east france
month_to_int["janer"] = 1
month_to_int["jenner"] = 1
month_to_int["hartmonat"] = 1
month_to_int["hartung"] = 1
month_to_int["eismond"] = 1
month_to_int["hornung"] = 2
month_to_int["wintermonat"] = 2
month_to_int["taumond"] = 2
month_to_int["narrenmond"] = 2
month_to_int["lenzing"] = 3
month_to_int["ostermond"] = 4
month_to_int["wonnemond"] = 5
month_to_int["wiesenmonat"] = 5
month_to_int["brachet"] = 6
month_to_int["heuet"] = 7
month_to_int["ernting"] = 8
month_to_int["scheiding"] = 9
month_to_int["gilbhard"] = 10
month_to_int["nebelmonat"] = 11
month_to_int["nebelung"] = 11
month_to_int["julmond"] = 12
modifier_to_int = {
'avant' : Date.MOD_BEFORE,
'av.' : Date.MOD_BEFORE,
#u'av' : Date.MOD_BEFORE, # Broke Hebrew "Av" month name
#u'<' : Date.MOD_BEFORE, # Worrying about XML/HTML parsing
'après' : Date.MOD_AFTER,
'ap.' : Date.MOD_AFTER,
'ap' : Date.MOD_AFTER,
#u'>' : Date.MOD_AFTER, # Worrying about XML/HTML parsing
'avant': Date.MOD_BEFORE,
'av.' : Date.MOD_BEFORE,
#u'av' : Date.MOD_BEFORE, # Broke Hebrew "Av" month name
#u'<' : Date.MOD_BEFORE, # Worrying about XML/HTML parsing
'après': Date.MOD_AFTER,
'ap.' : Date.MOD_AFTER,
'ap' : Date.MOD_AFTER,
#u'>' : Date.MOD_AFTER, # Worrying about XML/HTML parsing
'environ' : Date.MOD_ABOUT,
'env.' : Date.MOD_ABOUT,
'env' : Date.MOD_ABOUT,
@@ -78,6 +157,23 @@ class DateParserFR(DateParser):
'~' : Date.MOD_ABOUT,
}
calendar_to_int = {
'grégorien': Date.CAL_GREGORIAN,
'g' : Date.CAL_GREGORIAN,
'julien': Date.CAL_JULIAN,
'j' : Date.CAL_JULIAN,
'hébreu': Date.CAL_HEBREW,
'h' : Date.CAL_HEBREW,
'islamique': Date.CAL_ISLAMIC,
'i' : Date.CAL_ISLAMIC,
'révolutionnaire': Date.CAL_FRENCH,
'r' : Date.CAL_FRENCH,
'perse': Date.CAL_PERSIAN,
'p' : Date.CAL_PERSIAN,
'suédois': Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH,
}
quality_to_int = {
'estimée': Date.QUAL_ESTIMATED,
'est.' : Date.QUAL_ESTIMATED,
@@ -96,7 +192,7 @@ class DateParserFR(DateParser):
def init_strings(self):
"""
This method compiles regular expression strings for matching dates.
Most of the re's in most languages can stay as is. span and range
most likely will need to change. Whatever change is done, this method
may be called first as DateParser.init_strings(self) so that the
@@ -106,119 +202,46 @@ class DateParserFR(DateParser):
"""
DateParser.init_strings(self)
DateParser.calendar_to_int.update({
'révolutionnaire' : Date.CAL_FRENCH,
'r' : Date.CAL_FRENCH,
'perse' : Date.CAL_PERSIAN,
})
DateParser.month_to_int.update({
"januaris" : 1,
"januarii" : 1,
"januarius" : 1,
"janer" : 1,
"jänner" : 1,
"jenner" : 1,
"hartmonat" : 1,
"hartung" : 1,
"horn" : 1,
"eismond" : 1,
"februaris" : 2,
"februarii" : 2,
"februarius" : 2,
"hornig" : 2,
"hornung" : 2,
"wintermonat" : 2,
"taumond" : 2,
"narrenmond" : 2,
"martii" : 3,
"martius" : 3,
"lenzing" : 3,
"aprilis" : 4,
"ostermond" : 4,
"maius" : 5,
"maii" : 5,
"maien" : 5,
"bluviose" : 5,
"wonnemond" : 5,
"wiesenmonat" : 5,
"junius" : 6,
"junii" : 6,
"vendose" : 6,
"brachet" : 6,
"julius" : 7,
"julii" : 7,
"heuet" : 7,
"heuert" : 7,
"augustus" : 8,
"augusti" : 8,
"ernting" : 8,
"septembris" : 9,
"7bre" : 9,
"7bris" : 9,
"september" : 9,
"scheidling" : 9,
"october" : 10,
"octobris" : 10,
"8bre" : 10,
"8bris" : 10,
"gilbhard" : 10,
"november" : 11,
"novembris" : 11,
"9bre" : 11,
"9bris" : 11,
"nebelmonat" : 11,
"nebelung" : 11,
"december" : 12,
"decembris" : 12,
"10bre" : 12,
"10bris" : 12,
"xbre" : 12,
"xbris" : 12,
"julmond" : 12,
"christmond" : 12,
})
# This self._numeric is different from the base
# avoid bug gregorian / french calendar conversion (+/-10 days)
self._numeric = re.compile(r"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\s*$")
self._span = re.compile(r"(de)\s+(?P<start>.+)\s+(à)\s+(?P<stop>.+)",
self._numeric = re.compile("((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\s*$")
self._span = re.compile("(de)\s+(?P<start>.+)\s+(à)\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(r"(entre|ent\.|ent)\s+(?P<start>.+)\s+(et)\s+(?P<stop>.+)",
self._range = re.compile("(entre|ent\.|ent)\s+(?P<start>.+)\s+(et)\s+(?P<stop>.+)",
re.IGNORECASE)
# This self._text are different from the base
# by adding ".?" after the first date and removing "\s*$" at the end
# This self._text are different from the base
# by adding ".?" after the first date and removing "\s*$" at the end
#gregorian and julian
#gregorian and julian
self._text2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._mon_str, re.IGNORECASE)
#hebrew
#hebrew
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._jmon_str, re.IGNORECASE)
#french
#french
self._ftext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._ftext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._fmon_str, re.IGNORECASE)
#persian
#persian
self._ptext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._ptext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._pmon_str, re.IGNORECASE)
#islamic
#islamic
self._itext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._itext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._imon_str, re.IGNORECASE)
#swedish
#swedish
self._stext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._stext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._smon_str, re.IGNORECASE)
#-------------------------------------------------------------------------
@@ -228,8 +251,21 @@ class DateParserFR(DateParser):
#-------------------------------------------------------------------------
class DateDisplayFR(DateDisplay):
"""
French language date display class.
French language date display class.
"""
long_months = ( "", "janvier", "février", "mars", "avril", "mai",
"juin", "juillet", "août", "septembre", "octobre",
"novembre", "décembre" )
short_months = ( "", "janv", "févr", "mars", "avril", "mai", "juin",
"juil", "août", "sept", "oct", "nov", "déc" )
calendar = ("", "Julien", "Hébreu", "Révolutionnaire",
"Perse", "Islamique", "Suédois")
_mod_str = ("", "avant ", "après ", "vers ", "", "", "")
_qual_str = ("", "estimée ", "calculée ", "")
_bce_str = "%s avant le calendrier"
@@ -239,7 +275,7 @@ class DateDisplayFR(DateDisplay):
_locale_tformat = _locale_tformat.replace('%d', "J")
_locale_tformat = _locale_tformat.replace('%m', "M")
_locale_tformat = _locale_tformat.replace('%Y', "A")
formats = ("AAAA-MM-JJ (ISO)", # 0
"Défaut système (" + _locale_tformat + ")", # 1
"Jour Mois Année", # 2
@@ -247,11 +283,11 @@ class DateDisplayFR(DateDisplay):
"Jour. Mois Année", # 4
"Jour. MOI Année", # 5
"Mois Jour, Année", # 6
"MOI Jour, Année",) # 7
"MOI Jour, Année", # 7
)
# this definition must agree with its "_display_gregorian" method
def _display_gregorian(self, date_val, **kwargs):
def _display_gregorian(self, date_val):
"""
display gregorian calendar date in different format
"""
@@ -291,7 +327,7 @@ class DateDisplayFR(DateDisplay):
value = "%s %s" % (self.long_months[date_val[1]], year)
else:
value = "%d %s %s" % (date_val[0],
value = "%d %s %s" % (date_val[0],
self.long_months[date_val[1]], year)
elif self.format == 3:
@@ -304,7 +340,7 @@ class DateDisplayFR(DateDisplay):
value = "%s %s" % (self.short_months[date_val[1]], year)
else:
value = "%d %s %s" % (date_val[0],
value = "%d %s %s" % (date_val[0],
self.short_months[date_val[1]], year)
elif self.format == 4:
@@ -318,10 +354,10 @@ class DateDisplayFR(DateDisplay):
else:
# base_display :
# value = "%d %s %s" % (date_val[0],
# value = "%d %s %s" % (date_val[0],
# self.long_months[date_val[1]], year)
value = "%d. %s %s" % (date_val[0],
value = "%d. %s %s" % (date_val[0],
self.long_months[date_val[1]],
year)
elif self.format == 5:
@@ -336,11 +372,11 @@ class DateDisplayFR(DateDisplay):
else:
# base_display :
# value = "%d %s %s" % (date_val[0],
# value = "%d %s %s" % (date_val[0],
# self.short_months[date_val[1]], year)
value = "%d. %s %s" % (date_val[0],
self.short_months[date_val[1]], year)
value = "%d. %s %s" % (date_val[0],
self.short_months[date_val[1]], year)
elif self.format == 6:
# month_name day, year
@@ -367,13 +403,46 @@ class DateDisplayFR(DateDisplay):
date_val[0], year)
else:
return self.display_iso(date_val)
if date_val[2] < 0:
return self._bce_str % value
else:
return value
display = DateDisplay.display_formatted
def display(self, date):
"""
Return a text string representing the date.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = (self._qual_str)[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
date1 = self.display_cal[cal](start)
date2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'de', date1, 'à',
date2, scal)
elif mod == Date.MOD_RANGE:
date1 = self.display_cal[cal](start)
date2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'entre', date1, 'et',
date2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, (self._mod_str)[mod], text,
scal)
#-------------------------------------------------------------------------
#
@@ -382,4 +451,4 @@ class DateDisplayFR(DateDisplay):
#-------------------------------------------------------------------------
register_datehandler(('fr_FR', 'fr', 'french', 'French', 'fr_CA',
'fr_BE', 'fr_CH'), DateParserFR, DateDisplayFR)
'fr_BE', 'fr_CH'), DateParserFR, DateDisplayFR)
+254 -37
View File
@@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id: _date_hr.py 22672 2013-07-13 18:01:08Z paul-franklin $
# $Id$
#
# Croatian version 2008 by Josip
@@ -50,6 +50,98 @@ from ._datehandler import register_datehandler
#
#-------------------------------------------------------------------------
class DateParserHR(DateParser):
"""
Converts a text string into a Date object
"""
month_to_int = DateParser.month_to_int
month_to_int["siječanj"] = 1
month_to_int["siječnja"] = 1
month_to_int["sij"] = 1
month_to_int["januar"] = 1
month_to_int["januara"] = 1
month_to_int["i"] = 1
month_to_int["veljača"] = 2
month_to_int["veljače"] = 2
month_to_int["velj"] = 2
month_to_int["februar"] = 2
month_to_int["februara"] = 2
month_to_int["ii"] = 2
month_to_int["ožujak"] = 3
month_to_int["ožujka"] = 3
month_to_int["ožu"] = 3
month_to_int["mart"] = 3
month_to_int["marta"] = 3
month_to_int["iii"] = 3
month_to_int["travanj"] = 4
month_to_int["travnja"] = 4
month_to_int["tra"] = 4
month_to_int["april"] = 4
month_to_int["aprila"] = 4
month_to_int["iv"] = 4
month_to_int["svibanj"] = 5
month_to_int["svibnja"] = 5
month_to_int["svi"] = 5
month_to_int["maj"] = 5
month_to_int["maja"] = 5
month_to_int["v"] = 5
month_to_int["lipanj"] = 6
month_to_int["lipnja"] = 6
month_to_int["lip"] = 6
month_to_int["jun"] = 6
month_to_int["juna"] = 6
month_to_int["vi"] = 6
month_to_int["srpanj"] = 7
month_to_int["srpnja"] = 7
month_to_int["srp"] = 7
month_to_int["juli"] = 7
month_to_int["jula"] = 7
month_to_int["vii"] = 7
month_to_int["kolovoz"] = 8
month_to_int["kolovoza"] = 8
month_to_int["kol"] = 8
month_to_int["august"] = 8
month_to_int["augusta"] = 8
month_to_int["viii"] = 8
month_to_int["rujan"] = 9
month_to_int["rujna"] = 9
month_to_int["ruj"] = 9
month_to_int["septembar"] = 9
month_to_int["septembra"] = 9
month_to_int["ix"] = 9
month_to_int["7ber"] = 9
month_to_int["listopad"] = 10
month_to_int["listopada"] = 10
month_to_int["lis"] = 10
month_to_int["oktobar"] = 10
month_to_int["oktobra"] = 10
month_to_int["x"] = 10
month_to_int["8ber"] = 10
month_to_int["studeni"] = 11
month_to_int["studenog"] = 11
month_to_int["stu"] = 11
month_to_int["novembar"] = 11
month_to_int["novembra"] = 11
month_to_int["xi"] = 11
month_to_int["9ber"] = 11
month_to_int["prosinac"] = 12
month_to_int["prosinca"] = 12
month_to_int["pro"] = 12
month_to_int["decembar"] = 12
month_to_int["decembra"] = 12
month_to_int["xii"] = 12
modifier_to_int = {
'prije' : Date.MOD_BEFORE,
'pr. ' : Date.MOD_BEFORE,
@@ -60,6 +152,23 @@ class DateParserHR(DateParser):
}
calendar_to_int = {
'gregorijanski' : Date.CAL_GREGORIAN,
'greg.' : Date.CAL_GREGORIAN,
'julijanski' : Date.CAL_JULIAN,
'jul.' : Date.CAL_JULIAN,
'hebrejski' : Date.CAL_HEBREW,
'hebr.' : Date.CAL_HEBREW,
'islamski' : Date.CAL_ISLAMIC,
'isl.' : Date.CAL_ISLAMIC,
'francuski republikanski': Date.CAL_FRENCH,
'franc.' : Date.CAL_FRENCH,
'perzijski' : Date.CAL_PERSIAN,
'perz. ' : Date.CAL_PERSIAN,
'švedski' : Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH,
}
quality_to_int = {
'približno' : Date.QUAL_ESTIMATED,
'prb.' : Date.QUAL_ESTIMATED,
@@ -77,16 +186,18 @@ class DateParserHR(DateParser):
DateParser.init_strings(self)
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
% self._mon_str, re.IGNORECASE)
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile(
"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
self._span = re.compile(
"(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)",
self._numeric = re.compile(
"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$"
)
self._span = re.compile("(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
"(između)\s+(?P<start>.+)\s+(i)\s+(?P<stop>.+)",
re.IGNORECASE)
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'\
% self._jmon_str, re.IGNORECASE)
% self._jmon_str, re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -97,44 +208,150 @@ class DateDisplayHR(DateDisplay):
"""
Croatian language date display class.
"""
# TODO fix BUG 7064: non-Gregorian calendars wrongly use BCE notation for negative dates
# not refactoring _bce_str into base class because it'll be gone under #7064
long_months = ( "",
"siječnja",
"veljače",
"ožujka",
"travnja",
"svibnja",
"lipnja",
"srpnja",
"kolovoza",
"rujna",
"listopada",
"studenog",
"prosinca"
)
#currently unused
short_months = ( "", "sij", "velj", "ožu", "tra", "svi", "lip",
"srp", "kol", "ruj", "lis", "stu", "pro"
)
calendar = (
"", "julijanski", "hebrejski",
"francuski republikanski", "perzijski", "islamski",
"swedish"
)
_mod_str = ("", "prije ", "poslije ", "okolo ", "", "", "")
_qual_str = ("", "približno ", "izračunato ")
_bce_str = "%s p.n.e."
display = DateDisplay.display_formatted
formats = (
"GGGG-MM-DD (ISO-8601)",
"Numerički",
"D.M.GGGG.",
"D. MMMM GGGG.",
"D. Rb GGGG."
)
# this definition must agree with its "_display_gregorian" method
def dd_dformat01(self, date_val):
roman_months = (
"",
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XI",
"XII"
)
def _display_gregorian(self, date_val):
"""
numerical
"""
if date_val[3]:
return self.display_iso(date_val)
else:
if date_val[0] == date_val[1] == 0:
return str(date_val[2]) + '.'
else:
value = self._tformat.replace('%m', str(date_val[1]))
value = value.replace('%d', str(date_val[0]))
value = value.replace('%Y', str(abs(date_val[2])))
return value
def dd_dformat04(self, date_val, inflect, long_months):
"""
day month_name year
display gregorian calendar date in different format
"""
# this must agree with its locale-specific "formats" definition
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year + '.'
if self.format == 0:
return self.display_iso(date_val)
elif self.format == 1:
# numerical
if date_val[3]:
return self.display_iso(date_val)
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
if date_val[0] == 0 and date_val[1] == 0:
value = str(date_val[2])
else:
value = self._tformat.replace('%m', str(date_val[1]))
value = value.replace('%d', str(date_val[0]))
value = value.replace('%Y', str(abs(date_val[2])))
value = value.replace('-', '/')
elif self.format == 2:
# day.month_number.year.
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s.%s." % (date_val[1], year)
else:
value = "%s.%d.%s." % (date_val[0], date_val[1], year)
elif self.format == 3:
# day. month_name year.
if date_val[0] == 0:
if date_val[1] == 0:
value = "%s." % year
else:
value = "%s %s." % (self.long_months[date_val[1]], year)
else:
value = "%d. %s %s." % (date_val[0],
self.long_months[date_val[1]], year)
else:
return "{day:d}. {long_month.f[G]} {year}.".format(
day = date_val[0],
long_month = long_months[date_val[1]],
year = year)
# day. Roman_number_month year.
if date_val[0] == 0:
if date_val[1] == 0:
value = "%s." % year
else:
value = "%s %s." % (self.roman_months[date_val[1]], year)
else:
value = "%d. %s %s." % (date_val[0],
self.roman_months[date_val[1]], year)
if date_val[2] < 0:
return self._bce_str % value
else:
return value
def display(self, date):
"""
Return a text string representing the date.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d_1 = self.display_cal[cal](start)
d_2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'od', d_1, 'do', d_2,
scal)
elif mod == Date.MOD_RANGE:
d_1 = self.display_cal[cal](start)
d_2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'između', d_1, 'i', d_2,
scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text,
scal)
#-------------------------------------------------------------------------
#
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
# Italian version, 2009 (derived from the catalan version)
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Lithuanian-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Norwegian-specific classes for parsing and displaying dates.
"""
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
# Written by Benny Malengier
# Last change 2005/12/05:
# Correspond naming of dates with actual action, so for abbreviation
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
# Polish version 2007 by Piotr Czubaszek
# Updated in 2010 by Łukasz Rymarczyk
+2
View File
@@ -21,6 +21,8 @@
# Portuguese version translated by Duarte Loreto <happyguy_pt@hotmail.com>, 2007.
# Based on the Spanish file.
# $Id$
"""
Portuguese-specific classes for parsing and displaying dates.
"""
+256 -22
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Russian-specific classes for parsing and displaying dates.
"""
@@ -46,10 +48,11 @@ from ._datehandler import register_datehandler
#
#-------------------------------------------------------------------------
class DateParserRU(DateParser):
modifier_to_int = {
'перед' : Date.MOD_BEFORE,
'по' : Date.MOD_BEFORE,
'до' : Date.MOD_BEFORE,
'по' : Date.MOD_BEFORE,
'после' : Date.MOD_AFTER,
'п.' : Date.MOD_AFTER,
'п' : Date.MOD_AFTER,
@@ -67,6 +70,22 @@ class DateParserRU(DateParser):
'прибл' : Date.MOD_ABOUT,
}
calendar_to_int = {
'григорианский' : Date.CAL_GREGORIAN,
'г' : Date.CAL_GREGORIAN,
'юлианский' : Date.CAL_JULIAN,
'ю' : Date.CAL_JULIAN,
'еврейский' : Date.CAL_HEBREW,
'е' : Date.CAL_HEBREW,
'исламский' : Date.CAL_ISLAMIC,
'и' : Date.CAL_ISLAMIC,
'республиканский': Date.CAL_FRENCH,
'р' : Date.CAL_FRENCH,
'персидский' : Date.CAL_PERSIAN,
'п' : Date.CAL_PERSIAN,
'swedish' : Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH,
}
quality_to_int = {
'оценено' : Date.QUAL_ESTIMATED,
@@ -81,18 +100,126 @@ class DateParserRU(DateParser):
'выч' : Date.QUAL_CALCULATED,
}
hebrew_to_int = {
"тишрей":1,
"тишрея":1,
"хешван":2,
"хешвана":2,
"кислев":3,
"кислева":3,
"тевет":4,
"тевета":4,
"шеват":5,
"шевата":5,
"адар":6,
"адара":6,
"адара бет":7,
"нисан":8,
"нисана":8,
"ниссан":8,
"ниссана":8,
"ияр":9,
"ияра":9,
"сиван":10,
"сивана":10,
"тамуз":11,
"тамуза":11,
"таммуз":11,
"таммуза":11,
"ав":12,
"ава":12,
"элул":13,
"элула":13,
"элуль":13,
"элуля":13,
}
islamic_to_int = {
"мухаррам":1,
"мухаррама":1,
"сафар":2,
"сафара":2,
"раби-аль-авваль":3,
"раби-аль-авваля":3,
"раби-ассани":4,
"джумада-аль-уля":5,
"джумада-аль-ахира":6,
"раджаб":7,
"раджаба":7,
"шаабан":8,
"шаабана":8,
"рамадан":9,
"рамадана":9,
"шавваль":10,
"шавваля":10,
"зуль-каада":11,
"зуль-хиджжа":12,
}
persian_to_int = {
"фарвардин":1,
"фарвардина":1,
"урдбихишт":2,
"урдбихишта":2,
"хурдад":3,
"хурдада":3,
"тир":4,
"тира":4,
"мурдад":5,
"мурдада":5,
"шахривар":6,
"шахривара":6,
"михр":7,
"михра":7,
"абан":8,
"абана":8,
"азар":9,
"азара":9,
"дай":10,
"дая":10,
"бахман":11,
"бахмана":11,
"исфаидармуз":12,
"исфаидармуза":12,
}
french_to_int = {
"вандемьер":1,
"вандемьера":1,
"брюмер":2,
"брюмера":2,
"фример":3,
"фримера":3,
"нивоз":4,
"нивоза":4,
"плювиоз":5,
"плювиоза":5,
"вантоз":6,
"вантоза":6,
"жерминаль":7,
"жерминаля":7,
"флореаль":8,
"флореаля":8,
"прериаль":9,
"прериаля":9,
"мессидор":10,
"мессидора":10,
"термидор":11,
"термидора":11,
"фрюктидор":12,
"фрюктидора":12,
"доп.":13,
"дополн.":13,
"дополнит.":13,
}
bce = [
'до нашей эры', 'до н. э.', 'до н.э.',
'до н э', 'до нэ'] + DateParser.bce
def init_strings(self):
DateParser.init_strings(self)
DateParser.calendar_to_int.update({
'персидский' : Date.CAL_PERSIAN,
'п' : Date.CAL_PERSIAN,
})
_span_1 = ['с', 'от']
#_span_2 = ['по', 'до'] # <-- clashes with bce parsing :-(
_span_2 = ['по']
_range_1 = ['между', 'меж\.', 'меж']
_range_2 = ['и']
@@ -112,29 +239,136 @@ class DateDisplayRU(DateDisplay):
"""
Russian language date display class.
"""
long_months = ( "", "января", "февраля", "марта", "апреля", "мая",
"июня", "июля", "августа", "сентября", "октября",
"ноября", "декабря" )
short_months = ( "", "янв", "фев", "мар", "апр", "мая", "июн",
"июл", "авг", "сен", "окт", "ноя", "дек" )
calendar = (
"",
"юлианский",
"еврейский",
"республиканский",
"персидский",
"исламский",
"шведский"
)
_mod_str = (
"",
"до ",
"после ",
"около ",
"", "", "")
_qual_str = ("", "оцен ", "вычисл ")
# TODO fix BUG 7064: non-Gregorian calendars wrongly use BCE notation for negative dates
# not refactoring _bce_str into base class because it'll be gone under #7064
_bce_str = "%s до н.э."
display = DateDisplay.display_formatted
formats = (
"ГГГГ-ММ-ДД (ISO)", "Численный", "Месяц День, Год",
"МЕС ДД, ГГГГ", "День Месяц, Год", "ДД МЕС, ГГГГ"
)
# this must agree with DateDisplayEn's "formats" definition
# (since no locale-specific _display_gregorian exists, here)
def dd_dformat04(self, date_val, inflect, long_months):
hebrew = ( "",
"тишрея",
"хешвана",
"кислева",
"тевета",
"шевата",
"адара",
"адара бет",
"нисана",
"ияра",
"сивана",
"таммуза",
"ава",
"элула",
)
islamic = ( "",
"мухаррама",
"сафара",
"раби-аль-авваля",
"раби-ассани",
"джумада-аль-уля",
"джумада-аль-ахира",
"раджаба",
"шаабана",
"рамадана",
"шавваля",
"зуль-каада",
"зуль-хиджжа",
)
persian = ( "",
"фарвардина",
"урдбихишта",
"хурдада",
"тира",
"мурдада",
"шахривара",
"михра",
"абана",
"азара",
"дая",
"бахмана",
"исфаидармуза",
)
french = ( "",
"вандемьера",
"брюмера",
"фримера",
"нивоза",
"плювиоза",
"вантоза",
"жерминаля",
"флореаля",
"прериаля",
"мессидора",
"термидора",
"фрюктидора",
"дополнит."
)
def display(self, date):
"""
day month_name year -- for Russian locale
Return a text string representing the date.
"""
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%sс %s %s %s%s" % (qual_str, d1, 'по', d2,
scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'между', d1, 'и',
d2, scal)
else:
return "{day:d} {long_month.f[Р]} {year}".format(
day = date_val[0],
long_month = long_months[date_val[1]],
year = year)
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod],
text, scal)
#-------------------------------------------------------------------------
#
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
# Slovenian version 2010 by Bernard Banko, based on croatian one by Josip
+39 -97
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
# Serbian version by Vlada Perić <vlada.peric@gmail.com>, 2009.
# Based on the Croatian DateHandler by Josip
@@ -230,15 +232,46 @@ class DateParserSR(DateParser):
# Serbian display
#
#-------------------------------------------------------------------------
class DateDisplaySR_Base(DateDisplay):
class DateDisplaySR_latin(DateDisplay):
"""
Serbian (base) date display class
Serbian (latin) date display class
"""
long_months = ("",
"januara", "februara", "marta", "aprila",
"maja", "juna", "jula", "avgusta",
"septembra", "oktobra", "novembra", "decembra"
)
short_months = ("",
"jan", "feb", "mar", "apr", "maj", "jun",
"jul", "avg", "sep", "okt", "nov", "dec"
)
roman_months = (
"", "I", "II", "III", "IV", "V", "VI",
"VII", "VIII", "IX", "X", "XI", "XII"
)
calendar = (
"", "julijanski", "hebrejski",
"francuski republikanski", "persijski", "islamski",
"švedski"
)
_mod_str = ("", "pre ", "posle ", "oko ", "", "", "")
_qual_str = ("", "procenjeno ", "izračunato ")
_bce_str = "%s p.n.e."
formats = (
"GGGG-MM-DD (ISO-8601)",
"Numerički (DD.MM.GGGG.)",
"D. MMM GGGG.",
"D. Mesec GGGG.",
"D. Rb GGGG."
)
# this definition must agree with its "_display_gregorian" method
def _display_gregorian(self, date_val):
"""
@@ -307,10 +340,6 @@ class DateDisplaySR_Base(DateDisplay):
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
span1 = self._span1
span2 = self._span2
range1 = self._range1
range2 = self._range2
if mod == Date.MOD_TEXTONLY:
return date.get_text()
@@ -320,13 +349,13 @@ class DateDisplaySR_Base(DateDisplay):
d_1 = self.display_cal[cal](start)
d_2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, span1, d_1, span2, d_2,
return "%s%s %s %s %s%s" % (qual_str, 'od', d_1, 'do', d_2,
scal)
elif mod == Date.MOD_RANGE:
d_1 = self.display_cal[cal](start)
d_2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, range1, d_1, range2, d_2,
return "%s%s %s %s %s%s" % (qual_str, 'između', d_1, 'i', d_2,
scal)
else:
text = self.display_cal[date.get_calendar()](start)
@@ -334,98 +363,11 @@ class DateDisplaySR_Base(DateDisplay):
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text,
scal)
class DateDisplaySR_Latin(DateDisplaySR_Base):
"""
Serbian (Latin) date display class
"""
long_months = ("",
"januara", "februara", "marta", "aprila",
"maja", "juna", "jula", "avgusta",
"septembra", "oktobra", "novembra", "decembra"
)
short_months = ("",
"jan", "feb", "mar", "apr", "maj", "jun",
"jul", "avg", "sep", "okt", "nov", "dec"
)
calendar = (
"", "julijanski", "hebrejski",
"francuski republikanski", "persijski", "islamski",
"švedski"
)
_mod_str = ("", "pre ", "posle ", "oko ", "", "", "")
_qual_str = ("", "procenjeno ", "izračunato ")
_bce_str = "%s p.n.e."
formats = (
"GGGG-MM-DD (ISO-8601)",
"Numerički (DD.MM.GGGG.)",
"D. MMM GGGG.",
"D. Mesec GGGG.",
"D. Rb GGGG."
)
# this definition must agree with its "_display_gregorian" method
_span1 = 'od'
_span2 = 'do'
_range1 = 'između'
_range2 = 'i'
class DateDisplaySR_Cyrillic(DateDisplaySR_Base):
"""
Serbian (Cyrillic) date display class
"""
long_months = ("",
"Јануар", "Фебруар", "Март", "Април",
"Мај", "Јуне", "Јули", "Аугуст",
"Септембар", "Оцтобер", "Новембер", "Децембар"
)
short_months = ("",
"Јан", "Феб", "Мар", "Апр", "Мај", "Јун",
"Јул", "Авг", "Сеп", "Окт", "Нов", "Дец"
)
calendar = (
"", "Јулиан", "хебрејски",
"француски републиканац", "Персиан", "исламски",
"шведски"
)
_mod_str = ("", "пре ", "после ", "око ", "", "", "")
_qual_str = ("", "процењено ", "израчунато ")
_bce_str = "%s п.н.е."
formats = (
"ГГГГ-ММ-ДД (ISO-8601)",
"Нумеричка (ДД.ММ.ГГГГ.)",
"Д. МММ ГГГГ.",
"Д. Месец ГГГГ.",
"Д. Rb ГГГГ."
)
# this definition must agree with its "_display_gregorian" method
_span1 = 'из'
_span2 = 'до'
_range1 = 'између'
_range2 = 'и'
#-------------------------------------------------------------------------
#
# Register classes
#
#-------------------------------------------------------------------------
register_datehandler(('srpski', 'Srpski',
'sr_Latn', 'sr_Latn_RS', 'sr_RS@latin'),
DateParserSR, DateDisplaySR_Latin)
register_datehandler(('sr', 'српски', 'Српски', 'serbian',
'sr_RS', 'sr_Cyrl', 'sr_Cyrl_RS'),
DateParserSR, DateDisplaySR_Cyrillic)
register_datehandler(('sr', 'serbian', 'srpski', 'sr_RS'),
DateParserSR, DateDisplaySR_latin)
+2
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Swedish-specific classes for parsing and displaying dates.
"""
+239 -18
View File
@@ -3,7 +3,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2004-2006 Donald N. Allingham
# Copyright (C) 2013-2014 Fedir Zinchuk <fedikw[at]gmail.com>
# Copyright (C) 2013 Fedir Zinchuk <fedikw[at]gmail.com>
#
# 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
@@ -20,6 +20,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Ukrainian-specific classes for parsing and displaying dates.
"""
@@ -42,6 +44,7 @@ from ..lib.date import Date
from ._dateparser import DateParser
from ._datedisplay import DateDisplay
from ._datehandler import register_datehandler
from . import _grampslocale
#-------------------------------------------------------------------------
#
@@ -50,10 +53,53 @@ from ._datehandler import register_datehandler
#-------------------------------------------------------------------------
class DateParserUK(DateParser):
"""
Convert a text string into a :class:`.Date` object. If the date cannot be
Convert a text string into a Date object. If the date cannot be
converted, the text string is assigned.
"""
month_to_int = DateParser.month_to_int
# the genitive
month_to_int["січня"] = 1
month_to_int["лютого"] = 2
month_to_int["березня"] = 3
month_to_int["квітня"] = 4
month_to_int["травня"] = 5
month_to_int["червня"] = 6
month_to_int["липня"] = 7
month_to_int["серпня"] = 8
month_to_int["вересня"] = 9
month_to_int["жовтня"] = 10
month_to_int["листопада"] = 11
month_to_int["грудня"] = 12
# some short variants of the months
month_to_int["січ."] = 1
month_to_int["січ"] = 1
month_to_int["лют."] = 2
month_to_int["лют"] = 2
month_to_int["бер."] = 3
month_to_int["бер"] = 3
month_to_int["квіт."] = 4
month_to_int["квіт"] = 4
month_to_int["трав."] = 5
month_to_int["трав"] = 5
month_to_int["черв."] = 6
month_to_int["черв"] = 6
month_to_int["лип."] = 7
month_to_int["лип"] = 7
month_to_int["серп."] = 8
month_to_int["серп"] = 8
month_to_int["вер."] = 9
month_to_int["вер"] = 9
month_to_int["жовт."] = 10
month_to_int["жовт"] = 10
month_to_int["лист."] = 11
month_to_int["лист"] = 11
month_to_int["груд."] = 12
month_to_int["груд"] = 12
# modifiers before the date
modifier_to_int = {
'перед' : Date.MOD_BEFORE,
@@ -72,6 +118,89 @@ class DateParserUK(DateParser):
'біля' : Date.MOD_ABOUT,
}
hebrew_to_int = {
"тішрі" : 1, "хешвен" : 2, "кіслев" : 3,
"тевет" : 4, "шват" : 5, "адар" : 6,
"адара" : 7, "нісан" : 8, "іяр" : 9,
"сиван" : 10, "таммуз" : 11, "ав" : 12,
"елул" : 13,
#alternative spelling
"мархешван": 2, "ве адар" : 7,
#GEDCOM months
"tsh" : 1, "csh": 5, "ksl": 3, "tvt": 4, "shv": 5, "adr": 6,
"ads" : 7, "nsn": 8, "iyr": 9, "svn":10, "tmz":11, "aav":12,
"ell":13,
}
french_to_int = {
'вандем’єр' : 1, 'брюмер' : 2,
'фрімер' : 3, 'нівоз' : 4,
'плювіоз' : 5, 'вентоз' : 6,
'жерміналь' : 7, 'флореаль' : 8,
'преріаль' : 9, 'мессідор' : 10,
'термідор' : 11, 'фрюктідор': 12,
'додатковий' : 13,
#short
'ванд' : 1, 'брюм' : 2,
'фрім' : 3, 'нів' : 4,
'плюв' : 5, 'вент' : 6,
'жерм' : 7, 'флор' : 8,
'прер' : 9, 'месс' : 10,
'терм' : 11, 'фрюкт': 12,
'дод' : 13,
#GEDCOM months
'vend' : 1, 'brum' : 2,
'frim' : 3, 'nivo' : 4,
'pluv' : 5, 'vent' : 6,
'germ' : 7, 'flor' : 8,
'prai' : 9, 'mess' : 10,
'ther' : 11, 'fruc' : 12,
'comp' : 13,
}
islamic_to_int = {
"мухаррам" : 1, "мухаррем" : 1,
"сафар" : 2, "рабі-аль-авваль" : 3,
"рабі-ассані" : 4,
"джумада-аль-уля" : 5, "джумада-аль-авваль" : 5,
"джумада-аль-ахіра" : 6, "джумада-ас-сані" : 6,
"раджаб" : 7, "шаабан" : 8,
"рамадан" : 9, "рамазан" : 9,
"шавваль" : 10, "зуль-каада" : 11,
"зуль-хіджжа" : 12,
}
persian_to_int = {
"фарвардін" : 1, "ордібехешт" : 2,
"хордад" : 3, "тир" : 4,
"мордад" : 5, "шахрівар" : 6,
"мехр" : 7, "абан" : 8,
"азар" : 9, "дей" : 10,
"бахман" : 11, "есфанд" : 12,
}
bce = ['до нашої ери', 'до н. е.', 'до н.е.']
calendar_to_int = {
'григоріанський' : Date.CAL_GREGORIAN,
'г' : Date.CAL_GREGORIAN,
'юліанський' : Date.CAL_JULIAN,
'ю' : Date.CAL_JULIAN,
'єврейський' : Date.CAL_HEBREW,
'є' : Date.CAL_HEBREW,
'ісламський' : Date.CAL_ISLAMIC,
'і' : Date.CAL_ISLAMIC,
'французький' : Date.CAL_FRENCH,
'французький республіканський': Date.CAL_FRENCH,
'французький революційний' : Date.CAL_FRENCH,
'ф' : Date.CAL_FRENCH,
'іранський' : Date.CAL_PERSIAN,
'перський' : Date.CAL_PERSIAN,
'п' : Date.CAL_PERSIAN,
'шведський' : Date.CAL_SWEDISH,
'ш' : Date.CAL_SWEDISH,
}
quality_to_int = {
'за оцінкою' : Date.QUAL_ESTIMATED,
'за оц.' : Date.QUAL_ESTIMATED,
@@ -79,7 +208,6 @@ class DateParserUK(DateParser):
'орієнтовно' : Date.QUAL_ESTIMATED,
'приблизно' : Date.QUAL_ESTIMATED,
'прибл.' : Date.QUAL_ESTIMATED,
'підраховано' : Date.QUAL_CALCULATED,
'підрах.' : Date.QUAL_CALCULATED,
'розраховано' : Date.QUAL_CALCULATED,
@@ -87,11 +215,6 @@ class DateParserUK(DateParser):
'розрах.' : Date.QUAL_CALCULATED,
}
bce = [
'до нашої ери', 'до н. е.', 'до н.е.',
'до народження Христа'
] + DateParser.bce
def init_strings(self):
"""
This method compiles regular expression strings for matching dates.
@@ -100,19 +223,12 @@ class DateParserUK(DateParser):
"""
DateParser.init_strings(self)
DateParser.hebrew_to_int.update({
'мархешван': 2,
'ве адар' : 7,
'адар бет' : 7,
'авів' : 8,
})
_span_1 = ['з', 'від']
# b.c.e. pattern also have "до" so skip "до н."
_span_2 = ['по', 'до(?!\s+н)']
_span_2 = ['по', 'до?!\sн\.']
_range_1 = ['між']
_range_2 = ['і', 'та']
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
@@ -129,10 +245,115 @@ class DateDisplayUK(DateDisplay):
Ukrainian language date display class.
"""
# the months as the noun or as the genitive???
# as the genitive:
long_months = (
"", "січня", "лютого", "березня", "квітня",
"травня", "червня", "липня", "серпня",
"вересня", "жовтня", "листопада", "грудня"
)
# as the noun:
# long_months = (
# "", "січень", "лютий", "березень", "квітень",
# "травень", "червень", "липень", "серпень",
# "вересень", "жовтень", "листопад", "грудень"
# )
short_months = (
"", "січ.", "лют.", "бер.", "квіт.", "трав.", "черв.",
"лип.", "серп.", "вер.", "жовт.", "лист.", "груд."
)
hebrew = (
"", "тішрі", "хешвен", "кіслев", "тевет", "шват",
"адар", "адара", "нісан", "іяр", "сиван", "таммуз",
"ав", "елул"
)
french = (
'', 'вандем’єр', 'брюмер', 'фрімер', 'нівоз',
'плювіоз', 'вентоз', 'жерміналь', 'флореаль',
'преріаль', 'мессідор', 'термідор', 'фрюктідор',
'додатковий'
)
persian = (
"", "фарвардін", "ордібехешт", "хордад", "тир",
"мордад", "шахрівар", "мехр", "абан",
"азар", "дей", "бахман", "есфанд"
)
islamic = (
"", "мухаррам", "сафар", "рабі-аль-авваль",
"рабі-ассані", "джумада-аль-уля", "джумада-аль-ахіра",
"раджаб", "шаабан", "рамадан", "шавваль", "зуль-каада",
"зуль-хіджжа",
)
# Replace the previous "Numerical" by a string which
# do have an explicit meaning: "System default (format)"
_locale_tformat = _grampslocale.tformat
_locale_tformat = _locale_tformat.replace('%d', "д")
_locale_tformat = _locale_tformat.replace('%m', "м")
_locale_tformat = _locale_tformat.replace('%Y', "р")
formats = (
"рррр-мм-дд (ISO)", #0
"стандартний для системи (" + _locale_tformat + ")", #1
"місяць день, рік", #2
"міс. дд, рррр", #3
"день місяць рік", #4
"дд міс. рррр" #5
)
# this must agree with DateDisplayEn's "formats" definition
# (since no locale-specific _display_gregorian exists, here)
calendar = (
"", "юліанський", "єврейський", "французький республіканський",
"іранський", "ісламський", "шведський"
)
_mod_str = ("", "до ", "після ", "близько ", "", "", "")
_qual_str = ("", "орієнтовно ", "розрахунково ")
_bce_str = "%s до н.е."
display = DateDisplay.display_formatted
def display(self, date):
"""
Return a text string representing the date.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%sз %s %s %s%s" % (qual_str, d1, 'по', d2,
scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'між', d1, 'та',
d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod],
text, scal)
#-------------------------------------------------------------------------
#
+2
View File
@@ -18,6 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
#-------------------------------------------------------------------------
#
+189 -436
View File
@@ -3,8 +3,6 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2004-2006 Donald N. Allingham
# Copyright (C) 2013 Vassilii Khachaturov
# Copyright (C) 2014 Paul Franklin
#
# 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
@@ -20,6 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
U.S English date display class. Should serve as the base class for all
@@ -42,8 +41,6 @@ log = logging.getLogger(".DateDisplay")
#-------------------------------------------------------------------------
from ..lib.date import Date
from . import _grampslocale
from ..utils.grampslocale import GrampsLocale
from ._datestrings import DateStrings
#-------------------------------------------------------------------------
#
@@ -54,62 +51,78 @@ class DateDisplay(object):
"""
Base date display class.
"""
_locale = GrampsLocale(lang='en_US', languages='en')
long_months = ( "", "January", "February", "March", "April", "May",
"June", "July", "August", "September", "October",
"November", "December" )
short_months = ( "", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" )
_tformat = _grampslocale.tformat
_ = _grampslocale.glocale.translation.sgettext
formats = (
# format 0 - must always be ISO
_("YYYY-MM-DD (ISO)"),
# format # 1 - must always be locale-preferred numerical format
# such as YY.MM.DD, MM-DD-YY, or whatever your locale prefers.
# This should be the format that is used under the locale by
# strftime() for '%x'.
# You may translate this as "Numerical", "System preferred", or similar.
_("date format|Numerical"),
# Full month name, day, year
_("Month Day, Year"),
# Abbreviated month name, day, year
_("MON DAY, YEAR"),
# Day, full month name, year
_("Day Month Year"),
# Day, abbreviated month name, year
_("DAY MON YEAR")
hebrew = (
"", "Tishri", "Heshvan", "Kislev", "Tevet", "Shevat",
"AdarI", "AdarII", "Nisan", "Iyyar", "Sivan", "Tammuz",
"Av", "Elul"
)
french = (
'',
"Vendémiaire",
'Brumaire',
'Frimaire',
"Nivôse",
"Pluviôse",
"Ventôse",
'Germinal',
"Floréal",
'Prairial',
'Messidor',
'Thermidor',
'Fructidor',
'Extra',
)
persian = (
"", "Farvardin", "Ordibehesht", "Khordad", "Tir",
"Mordad", "Shahrivar", "Mehr", "Aban", "Azar",
"Dey", "Bahman", "Esfand"
)
islamic = (
"", "Muharram", "Safar", "Rabi`al-Awwal", "Rabi`ath-Thani",
"Jumada l-Ula", "Jumada t-Tania", "Rajab", "Sha`ban",
"Ramadan", "Shawwal", "Dhu l-Qa`da", "Dhu l-Hijja"
)
"""
.. note:: Will be overridden if a locale-specific date displayer exists.
If your localized :meth:`~_display_calendar`/:meth:`~_display_gregorian`
are overridden, you should override the whole formats list according
to your own formats, and you need not localize the format names here.
This ``formats`` must agree with
:meth:`~_display_calendar`/:meth:`~_display_gregorian`.
"""
del _
swedish = (
"", "Januari", "Februari", "Mars",
"April", "Maj", "Juni",
"Juli", "Augusti", "September",
"Oktober", "November", "December"
)
formats = ("YYYY-MM-DD (ISO)", )
# this will be overridden if a locale-specific date displayer exists
calendar = (
"", "Julian", "Hebrew", "French Republican",
"Persian", "Islamic", "Swedish"
)
# this will be overridden if a locale-specific date displayer exists
newyear = ("", "Mar1", "Mar25", "Sep1")
_mod_str = ("", "before ", "after ", "about ", "", "", "")
# this will be overridden if a locale-specific date displayer exists
_qual_str = ("", "estimated ", "calculated ")
# this will be overridden if a locale-specific date displayer exists
_bce_str = "%s B.C.E."
# this will be overridden if a locale-specific date displayer exists
def __init__(self, format=None):
self._ds = DateStrings(self._locale)
calendar = list(self._ds.calendar)
calendar[Date.CAL_GREGORIAN] = "" # that string only used in parsing,
# gregorian cal name shouldn't be output!
self.calendar = tuple(calendar)
self.short_months = self._ds.short_months
self.swedish = self.long_months = self._ds.long_months
self.hebrew = self._ds.hebrew
self.french = self._ds.french
self.persian = self._ds.persian
self.islamic = self._ds.islamic
self.display_cal = [
self._display_gregorian,
self._display_julian,
@@ -118,132 +131,12 @@ class DateDisplay(object):
self._display_persian,
self._display_islamic,
self._display_swedish]
self._mod_str = self._ds.modifiers
self._qual_str = self._ds.qualifiers
self.long_days = self._ds.long_days
if format is None:
self.format = 0
else:
self.format = format
self._ = _ = self._locale.translation.sgettext
self.FORMATS_long_month_year = {
# Inflection control due to modifier.
# Protocol: DateDisplayXX passes a key to the dictionary in the
# parameter ``inflect`` to ``_display_calendar``.
# The modifier passed is not necessarily the one printed, it's just
# a representative that induces the same inflection control.
# For example, in Russian "before May", "after May", and "about May"
# all require genitive form for May, whereas no modifier (just "May 1234")
# require nominative, so DateDisplayRU.display will pass "before"
# in all 3 cases, collapsing the 3 modifiers into 1.
#
# Another example in Russian is that "between April 1234 and June 1235"
# requires the same inflection for both April and June, so just "between"
# is used by DateDisplayRU.display, collapsing two more modifiers into 1.
#
# If inflect is not specified, then it means that the modifier doesn't have
# grammatical control over the format, and so the format can be
# localized in a context-free way.
# The translator is responsible for:
# 1) proper collapse of modifier classes
# 2) translating the formats that are selected in runtime
# 3) ignoring the other formats in .po (it does no harm to translate them,
# it's just a lot of extra work)
#
# To prevent POT pollution, not all possibilities are populated here yet.
# To be amended as the actual localized handlers use it.
#
# Not moving to DateStrings, as this is part of display code only,
# coupled tightly with the formats used in this file.
""
: _("{long_month} {year}"),
"from"
# first date in a span
# You only need to translate this string if you translate one of the
# inflect=_("...") with "from"
: _("from|{long_month} {year}"),
"to"
# second date in a span
# You only need to translate this string if you translate one of the
# inflect=_("...") with "to"
: _("to|{long_month} {year}"),
"between"
# first date in a range
# You only need to translate this string if you translate one of the
# inflect=_("...") with "between"
: _("between|{long_month} {year}"),
"and"
# second date in a range
# You only need to translate this string if you translate one of the
# inflect=_("...") with "and"
: _("and|{long_month} {year}"),
"before"
# If "before <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
: _("before|{long_month} {year}"),
"after"
# If "after <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
: _("after|{long_month} {year}"),
"about"
# If "about <Month>" needs a special inflection in your
# language, translate this to "{long_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
: _("about|{long_month} {year}"),
# TODO if no modifier, but with qual, might need to inflect in some lang.
}
self.FORMATS_short_month_year = {
""
: _("{short_month} {year}"),
"from"
# first date in a span
: _("from|{short_month} {year}"),
"to"
# second date in a span
: _("to|{short_month} {year}"),
"between"
# first date in a range
: _("between|{short_month} {year}"),
"and"
# second date in a range
: _("and|{short_month} {year}"),
"before"
# If "before <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
: _("before|{short_month} {year}"),
"after"
# If "after <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
: _("after|{short_month} {year}"),
"about"
# If "about <Month>" needs a special inflection in your
# language, translate this to "{short_month.f[X]} {year}"
# (where X is one of the month-name inflections you defined)
: _("about|{short_month} {year}"),
}
def set_format(self, format):
self.format = format
@@ -271,10 +164,7 @@ class DateDisplay(object):
def display(self, date):
"""
Return a text string representing the date.
Disregard any format settings and use display_iso for each date.
(Will be overridden if a locale-specific date displayer exists.)
(will be overridden if a locale-specific date displayer exists)
"""
mod = date.get_modifier()
cal = date.get_calendar()
@@ -328,297 +218,133 @@ class DateDisplay(object):
else:
return value
def display_formatted(self, date):
"""
Return a text string representing the date, according to the format.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
_ = self._
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start,
# If there is no special inflection for "from <Month>" in your
# language, don't translate this string.
# Otherwise, translate it to the ENGLISH!!! ENGLISH!!!
# key appearing above in the FORMATS_... dict
# that maps to the special inflected format string that you need to localize.
inflect=_("from-date|"))
d2 = self.display_cal[cal](date.get_stop_date(),
# If there is no special inflection for "to <Month>" in your
# language, don't translate this string.
# Otherwise, translate it to the ENGLISH!!! ENGLISH!!!
# key appearing above in the FORMATS_... dict
# that maps to the special inflected format string that you need to localize.
inflect=_("to-date|"))
scal = self.format_extras(cal, newyear)
return _("{date_quality}from {date_start} to {date_stop}"
"{nonstd_calendar_and_ny}").format(
date_quality=qual_str,
date_start=d1,
date_stop=d2,
nonstd_calendar_and_ny=scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start,
# If there is no special inflection for "between <Month>" in your
# language, don't translate this string.
# Otherwise, translate it to the ENGLISH!!! ENGLISH!!!
# key appearing above in the FORMATS_... dict
# that maps to the special inflected format string that you need to localize.
inflect=_("between-date|"))
d2 = self.display_cal[cal](date.get_stop_date(),
# If there is no special inflection for "and <Month>" in your
# language, don't translate this string.
# Otherwise, translate it to the ENGLISH!!! ENGLISH!!!
# key appearing above in the FORMATS_... dict
# that maps to the special inflected format string that you need to localize.
inflect=_("and-date|"))
scal = self.format_extras(cal, newyear)
return _("{date_quality}between {date_start} and {date_stop}"
"{nonstd_calendar_and_ny}").format(
date_quality=qual_str,
date_start=d1,
date_stop=d2,
nonstd_calendar_and_ny=scal)
else:
if mod == Date.MOD_BEFORE:
# If there is no special inflection for "before <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "before" in ENGLISH!!! ENGLISH!!!
date_type = _("before-date|")
elif mod == Date.MOD_AFTER:
# If there is no special inflection for "after <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "after" in ENGLISH!!! ENGLISH!!!
date_type = _("after-date|")
elif mod == Date.MOD_ABOUT:
# If there is no special inflection for "about <Month>"
# in your language, DON'T translate this string. Otherwise,
# "translate" this to "about" in ENGLISH!!! ENGLISH!!!
date_type = _("about-date|")
else:
date_type = ""
text = self.display_cal[cal](start, inflect=date_type)
scal = self.format_extras(cal, newyear)
return _("{date_quality}{noncompound_modifier}{date}"
"{nonstd_calendar_and_ny}").format(
date_quality=qual_str,
noncompound_modifier=self._mod_str[mod],
date=text,
nonstd_calendar_and_ny=scal)
def _display_gregorian(self, date_val, **kwargs):
return self._display_calendar(date_val, self.long_months,
self.short_months, **kwargs)
# Julian and Swedish date display is the same as Gregorian
_display_julian = _display_swedish = _display_gregorian
def format_long_month_year(self, month, year, inflect, long_months):
if not hasattr(long_months[1], 'f'): # not a Lexeme: no inflection
return "{long_month} {year}".format(
long_month = long_months[month], year = year)
return self.FORMATS_long_month_year[inflect].format(
long_month = long_months[month], year = year)
def format_short_month_year(self, month, year, inflect, short_months):
if not hasattr(short_months[1], 'f'): # not a Lexeme: no inflection
return "{short_month} {year}".format(
short_month = short_months[month], year = year)
return self.FORMATS_short_month_year[inflect].format(
short_month = short_months[month], year = year)
def format_long_month(self, month, inflect, long_months):
if not hasattr(long_months[1], 'f'): # not a Lexeme: no inflection
return "{long_month}".format(long_month = long_months[month])
return self.FORMATS_long_month_year[inflect].format(
long_month = long_months[month], year = '').rstrip()
def format_short_month(self, month, inflect, short_months):
if not hasattr(short_months[1], 'f'): # not a Lexeme: no inflection
return "{short_month}".format(short_month = short_months[month])
return self.FORMATS_short_month_year[inflect].format(
short_month = short_months[month], year = '').rstrip()
def dd_dformat01(self, date_val):
"""
numerical
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
if date_val[3]:
return self.display_iso(date_val)
else:
if date_val[0] == date_val[1] == 0:
return str(date_val[2])
else:
value = self._tformat.replace('%m', str(date_val[1]))
if date_val[0] == 0: # ignore the zero day and its delimiter
i_day = value.find('%d')
value = value.replace(value[i_day:i_day+3], '')
value = value.replace('%d', str(date_val[0]))
value = value.replace('%Y', str(abs(date_val[2])))
return value.replace('-', '/')
def dd_dformat02(self, date_val, inflect, long_months):
"""
month_name day, year
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
_ = self._locale.translation.sgettext
def _display_gregorian(self, date_val):
# this one must agree with DateDisplayEn's "formats" definition
# (it may be overridden if a locale-specific date displayer exists)
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
else:
# TRANSLATORS: this month is ALREADY inflected: ignore it
return _("{long_month} {day:d}, {year}").format(
long_month = self.format_long_month(date_val[1],
inflect,
long_months),
day = date_val[0],
year = year)
def dd_dformat03(self, date_val, inflect, short_months):
"""
month_abbreviation day, year
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
_ = self._locale.translation.sgettext
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return self.format_short_month_year(date_val[1], year,
inflect, short_months)
else:
# TRANSLATORS: this month is ALREADY inflected: ignore it
return _("{short_month} {day:d}, {year}").format(
short_month = self.format_short_month(date_val[1],
inflect,
short_months),
day = date_val[0],
year = year)
def dd_dformat04(self, date_val, inflect, long_months):
"""
day month_name year
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
_ = self._locale.translation.sgettext
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
else:
# TRANSLATORS: this month is ALREADY inflected: ignore it
return _("{day:d} {long_month} {year}").format(
day = date_val[0],
long_month = self.format_long_month(date_val[1],
inflect,
long_months),
year = year)
def dd_dformat05(self, date_val, inflect, short_months):
"""
day month_abbreviation year
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
_ = self._locale.translation.sgettext
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return self.format_short_month_year(date_val[1], year,
inflect, short_months)
else:
# TRANSLATORS: this month is ALREADY inflected: ignore it
return _("{day:d} {short_month} {year}").format(
day = date_val[0],
short_month = self.format_short_month(date_val[1],
inflect,
short_months),
year = year)
def _display_calendar(self, date_val, long_months, short_months = None,
inflect=""):
"""
this must agree with DateDisplayEn's "formats" definition
(it may be overridden if a locale-specific date displayer exists)
"""
if short_months is None:
# Let the short formats work the same as long formats
short_months = long_months
if self.format == 0:
return self.display_iso(date_val)
elif self.format == 1:
# numerical
value = self.dd_dformat01(date_val)
if date_val[3]:
return self.display_iso(date_val)
else:
if date_val[0] == date_val[1] == 0:
value = str(date_val[2])
else:
value = self._tformat.replace('%m', str(date_val[1]))
value = value.replace('%d', str(date_val[0]))
value = value.replace('%Y', str(abs(date_val[2])))
value = value.replace('-', '/')
elif self.format == 2:
# month_name day, year
value = self.dd_dformat02(date_val, inflect, long_months)
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %s" % (self.long_months[date_val[1]], year)
else:
value = "%s %d, %s" % (self.long_months[date_val[1]],
date_val[0], year)
elif self.format == 3:
# month_abbreviation day, year
value = self.dd_dformat03(date_val, inflect, short_months)
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %s" % (self.short_months[date_val[1]], year)
else:
value = "%s %d, %s" % (self.short_months[date_val[1]],
date_val[0], year)
elif self.format == 4:
# day month_name year
value = self.dd_dformat04(date_val, inflect, long_months)
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %s" % (self.long_months[date_val[1]], year)
else:
value = "%d %s %s" % (date_val[0],
self.long_months[date_val[1]], year)
# elif self.format == 5:
else:
# day month_abbreviation year
value = self.dd_dformat05(date_val, inflect, short_months)
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %s" % (self.short_months[date_val[1]], year)
else:
value = "%d %s %s" % (date_val[0],
self.short_months[date_val[1]], year)
if date_val[2] < 0:
# TODO fix BUG 7064: non-Gregorian calendars wrongly use BCE notation for negative dates
return self._bce_str % value
else:
return value
def _display_julian(self, date_val):
# Julian date display is the same as Gregorian
return self._display_gregorian(date_val)
def _display_french(self, date_val, **kwargs):
return self._display_calendar(date_val, self.french, **kwargs)
def _display_calendar(self, date_val, month_list):
# used to display non-Gregorian calendars (Hebrew, Islamic, etc.)
year = abs(date_val[2])
if self.format == 0 or self.format == 1:
return self.display_iso(date_val)
else:
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %d" % (month_list[date_val[1]], year)
else:
value = "%s %d, %s" % (month_list[date_val[1]], date_val[0],
year)
if date_val[2] < 0:
return self._bce_str % value
else:
return value
def _display_hebrew(self, date_val, **kwargs):
return self._display_calendar(date_val, self.hebrew, **kwargs)
def _display_french(self, date_val):
year = abs(date_val[2])
if self.format == 0 or self.format == 1:
return self.display_iso(date_val)
else:
if date_val[0] == 0:
if date_val[1] == 0:
value = year
else:
value = "%s %d" % (self.french[date_val[1]], year)
else:
value = "%d %s %s" % (date_val[0], self.french[date_val[1]],
year)
if date_val[2] < 0:
return self._bce_str % value
else:
return value
def _display_persian(self, date_val, **kwargs):
return self._display_calendar(date_val, self.persian, **kwargs)
def _display_hebrew(self, date_val):
return self._display_calendar(date_val, self.hebrew)
def _display_islamic(self, date_val, **kwargs):
return self._display_calendar(date_val, self.islamic, **kwargs)
def _display_persian(self, date_val):
return self._display_calendar(date_val, self.persian)
def _display_islamic(self, date_val):
return self._display_calendar(date_val, self.islamic)
def _display_swedish(self, date_val):
return self._display_calendar(date_val, self.swedish)
class DateDisplayEn(DateDisplay):
"""
English language date display class.
"""
formats = (
"YYYY-MM-DD (ISO)", "Numerical", "Month Day, Year",
"MON DAY, YEAR", "Day Month Year", "DAY MON YEAR"
)
# this (English) "formats" must agree with "_display_gregorian" (above)
def __init__(self, format=None):
"""
@@ -629,6 +355,33 @@ class DateDisplayEn(DateDisplay):
DateDisplay.__init__(self, format)
display = DateDisplay.display_formatted
def display(self, date):
"""
Return a text string representing the date.
"""
mod = date.get_modifier()
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
_locale = DateDisplay._locale # normally set in register_datehandler
qual_str = self._qual_str[qual]
if mod == Date.MOD_TEXTONLY:
return date.get_text()
elif start == Date.EMPTY:
return ""
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%sfrom %s to %s%s" % (qual_str, d1, d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%sbetween %s and %s%s" % (qual_str, d1, d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
+10 -14
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Class handling language-specific selection for date parser and displayer.
"""
@@ -47,7 +49,6 @@ from ._dateparser import DateParser
from ._datedisplay import DateDisplay, DateDisplayEn
from ..constfunc import win, cuni
from ..const import GRAMPS_LOCALE as glocale
from gramps.gen.utils.grampslocale import GrampsLocale
#-------------------------------------------------------------------------
#
@@ -98,20 +99,15 @@ def register_datehandler(locales,parse_class,display_class):
Registers the passed date parser class and date displayer
classes with the specified language locales.
Set the parser_class and display_class ._locale attribute
to the corresponding :class:`.GrampsLocale` object.
:param locales: tuple of strings containing language codes.
The character encoding is not included, so the language
should be in the form of fr_FR, not fr_FR.utf8
:type locales: tuple
:param parse_class: Class to be associated with parsing
:type parse_class: :class:`.DateParser`
:param display_class: Class to be associated with displaying
:type display_class: :class:`.DateDisplay`
@param locales: tuple of strings containing language codes.
The character encoding is not included, so the language
should be in the form of fr_FR, not fr_FR.utf8
@type locales: tuple
@param parse_class: Class to be associated with parsing
@type parse_class: DateParse
@param display_class: Class to be associated with displaying
@type display_class: DateDisplay
"""
for lang_str in locales:
LANG_TO_PARSER[lang_str] = parse_class
LANG_TO_DISPLAY[lang_str] = display_class
parse_class._locale = display_class._locale = GrampsLocale(lang=locales[0])
+61 -148
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Date parsing class. Serves as the base class for any localized
date parsing class. The default base class provides parsing for English.
@@ -47,10 +49,8 @@ log = logging.getLogger(".DateParser")
# GRAMPS modules
#
#-------------------------------------------------------------------------
from ..lib.date import Date, DateError, Today
from ..lib.date import Date, DateError
from . import _grampslocale
from ..utils.grampslocale import GrampsLocale
from ._datestrings import DateStrings
#-------------------------------------------------------------------------
#
@@ -120,69 +120,6 @@ def french_valid(date_tuple):
valid = False
return valid
def _build_prefix_table(month_to_int, month_variants):
"""
Populate a DateParser.month_to_int-like dict
with all the prefixes found in month_variants.
"""
month_variants = list(month_variants) # drain the generator, if any
month_to_int_new = {}
# Populate with full names first, w/o prefixes
log.debug("Mapping full names...")
for i in range(0,len(month_variants)):
for month in month_variants[i]:
m = month.lower()
log.debug("Mapping {} -> {}".format(m, i))
month_to_int_new[m] = i
month_to_int.update(month_to_int_new)
log.debug("Mapping new prefixes...")
months_sorted = list(month_to_int_new.keys())
months_sorted.sort(key=len, reverse=True)
for m in months_sorted:
for prefixlen in reversed(range(1,len(m))):
mp = m[:prefixlen]
if mp.strip() != mp:
continue
if mp in month_to_int:
break
else:
i = month_to_int[m]
log.debug("Mapping {} -> {}".format(mp, i))
month_to_int[mp] = i
def _generate_variants(months):
"""
Generate all month variants for passing to _build_prefix_table
:param months: an iterable ordered collection, 1st item is empty, the rest
1..N, for a calendar with N months overall, contain, each,
an iterable of alternative specifications.
Each such specification can be:
1) a Lexeme, supporting .variants() to return the list of
variants underneath
2) a literal string
3) a |-separated string of alternatives
Empty strings are discarded.
:return: generator of lists per month with all variants listed once only
the 1st item will be empty
"""
for month_lexemes_and_alternatives in months:
v = []
for m in month_lexemes_and_alternatives:
try:
# Lexeme? ask it to compute the variants it knows
mv = list(m.variants())
except AttributeError:
# plain string, not a lexeme with inflections...
# Maybe a '|'-separated list of alternatives, maybe empty,
# maybe a single string. Suppress empty strings!
mv = (s for s in m.split('|') if s)
v.extend(mv)
yield(list(set(v)))
#-------------------------------------------------------------------------
#
# DateParser class
@@ -190,12 +127,10 @@ def _generate_variants(months):
#-------------------------------------------------------------------------
class DateParser(object):
"""
Convert a text string into a :class:`.Date` object. If the date cannot be
Convert a text string into a Date object. If the date cannot be
converted, the text string is assigned.
"""
_locale = GrampsLocale(lang='en', languages='en')
_fmt_parse = re.compile(".*%(\S).*%(\S).*%(\S).*")
# RFC-2822 only uses capitalized English abbreviated names, no locales.
@@ -206,12 +141,7 @@ class DateParser(object):
'Sep' : 9, 'Oct' : 10, 'Nov' : 11, 'Dec' : 12,
}
# seeded with __init_prefix_tables
swedish_to_int = month_to_int = {}
"""
Map Gregorian month names and their prefixes, wherever unambiguous,
to the relevant integer index (1..12).
"""
month_to_int = _grampslocale.month_to_int
# modifiers before the date
# (overridden if a locale-specific date parser exists)
@@ -242,7 +172,13 @@ class DateParser(object):
}
french_to_int = {
# the long ones are seeded with __init_prefix_tables
'vendémiaire' : 1, 'brumaire' : 2,
'frimaire' : 3, 'nivôse': 4,
'pluviôse' : 5, 'ventôse' : 6,
'germinal' : 7, 'floréal' : 8,
'prairial' : 9, 'messidor' : 10,
'thermidor' : 11, 'fructidor' : 12,
'extra' : 13,
#GEDCOM months
'vend' : 1, 'brum' : 2,
'frim' : 3, 'nivo' : 4,
@@ -254,8 +190,6 @@ class DateParser(object):
}
islamic_to_int = {
# some are already seeded with __init_prefix_tables,
# but it is a pain to separate them out from the variants...
"muharram" : 1, "muharram ul haram" : 1,
"safar" : 2, "rabi`al-awwal" : 3,
"rabi'l" : 3, "rabi`ul-akhir" : 4,
@@ -273,14 +207,44 @@ class DateParser(object):
"dhu hijja" : 12, "thw al-hijjah" : 12,
}
# seeded with __init_prefix_tables
persian_to_int = { }
persian_to_int = {
"farvardin" : 1, "ordibehesht" : 2,
"khordad" : 3, "tir" : 4,
"mordad" : 5, "shahrivar" : 6,
"mehr" : 7, "aban" : 8,
"azar" : 9, "dey" : 10,
"bahman" : 11, "esfand" : 12,
}
swedish_to_int = {
"januari" : 1, "februari" : 2,
"mars" : 3, "april" : 4,
"maj" : 5, "juni" : 6,
"juli" : 7, "augusti" : 8,
"september" : 9, "oktober" : 10,
"november" : 11, "december" : 12,
}
bce = ["B.C.E.", "B.C.E", "BCE", "B.C.", "B.C", "BC" ]
# (overridden if a locale-specific date parser exists)
# seeded with __init_prefix_tables
calendar_to_int = {
'gregorian' : Date.CAL_GREGORIAN,
'g' : Date.CAL_GREGORIAN,
'julian' : Date.CAL_JULIAN,
'j' : Date.CAL_JULIAN,
'hebrew' : Date.CAL_HEBREW,
'h' : Date.CAL_HEBREW,
'islamic' : Date.CAL_ISLAMIC,
'i' : Date.CAL_ISLAMIC,
'french' : Date.CAL_FRENCH,
'french republican': Date.CAL_FRENCH,
'f' : Date.CAL_FRENCH,
'persian' : Date.CAL_PERSIAN,
'p' : Date.CAL_PERSIAN,
'swedish' : Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH,
}
# (probably overridden if a locale-specific date parser exists)
@@ -300,39 +264,7 @@ class DateParser(object):
'calculated' : Date.QUAL_CALCULATED,
}
# (overridden if a locale-specific date parser exists)
today = ["$T",]
# Override with a list of *synonyms* for "today" in your language.
# Note: the word "today" itself will already be pulled in from your translation DB,
# see init_strings, so there is no need to override this if you have no aliases
# for "today".
# We also secretly support "$T" like in some reports.
_langs = set()
def __init_prefix_tables(self):
lang = self._locale.lang
if lang in DateParser._langs:
log.debug("Prefix tables for {} already built".format(lang))
return
else:
DateParser._langs.add(lang)
ds = DateStrings(self._locale)
log.debug("Begin building parser prefix tables for {}".format(lang))
_build_prefix_table(DateParser.month_to_int,
_generate_variants(
zip(ds.long_months, ds.short_months,
ds.swedish_SV, ds.alt_long_months)))
_build_prefix_table(DateParser.hebrew_to_int,
_generate_variants(zip(ds.hebrew)))
_build_prefix_table(DateParser.french_to_int,
_generate_variants(zip(ds.french)))
_build_prefix_table(DateParser.islamic_to_int,
_generate_variants(zip(ds.islamic)))
_build_prefix_table(DateParser.persian_to_int,
_generate_variants(zip(ds.persian)))
_build_prefix_table(DateParser.calendar_to_int,
_generate_variants(zip(ds.calendar)))
def __init__(self):
self.init_strings()
self.parser = {
@@ -362,8 +294,8 @@ class DateParser(object):
sorted so that longest keys match first. Any '.' characters
are quoted.
"""
keys.sort(key=len, reverse=True)
return '(' + '|'.join([re.escape(key) for key in keys]) + ')'
keys.sort(key=lambda x: len(x), reverse=True)
return '(' + '|'.join([key.replace('.', '\.') for key in keys]) + ')'
def init_strings(self):
"""
@@ -374,13 +306,8 @@ class DateParser(object):
may be called first as DateParser.init_strings(self) so that the
invariant expresions don't need to be repeteadly coded. All differences
can be coded after DateParser.init_strings(self) call, that way they
override stuff from this method.
.. seealso:: :class:`.DateParserRU` as an example.
override stuff from this method. See DateParserRU() as an example.
"""
_ = self._locale.translation.gettext
self.__init_prefix_tables()
self._rfc_mon_str = '(' + '|'.join(list(self._rfc_mons_to_int.keys())) + ')'
self._rfc_day_str = '(' + '|'.join(self._rfc_days) + ')'
@@ -399,8 +326,6 @@ class DateParser(object):
self._cal_str = self.re_longest_first(list(self.calendar_to_int.keys()))
self._ny_str = self.re_longest_first(list(self.newyear_to_int.keys()))
self._today_str = self.re_longest_first(self.today + [_("today"),])
# bce, calendar type and quality may be either at the end or at
# the beginning of the given date string, therefore they will
# be parsed from the middle and will be in match.group(2).
@@ -459,7 +384,6 @@ class DateParser(object):
self._isotimestamp = re.compile("^\s*?(\d{4})([01]\d)([0123]\d)(?:(?:[012]\d[0-5]\d[0-5]\d)|(?:\s+[012]\d:[0-5]\d(?::[0-5]\d)?))?\s*?$")
self._rfc = re.compile("(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+(\+|-)\d\d\d\d"
% (self._rfc_day_str, self._rfc_mon_str))
self._today = re.compile("^\s*%s\s*$" % self._today_str, re.IGNORECASE)
def _get_int(self, val):
"""
@@ -552,7 +476,7 @@ class DateParser(object):
return Date.EMPTY
def _parse_subdate(self, text, subparser=None, cal=None):
def _parse_subdate(self, text, subparser=None):
"""
Convert only the date portion of a date.
"""
@@ -629,12 +553,8 @@ class DateParser(object):
else:
y = self._get_int(groups[4])
if self.dmy:
if groups[3] is None:
m = self._get_int(groups[1])
d = 0
else:
m = self._get_int(groups[3])
d = self._get_int(groups[1])
m = self._get_int(groups[3])
d = self._get_int(groups[1])
else:
m = self._get_int(groups[1])
d = self._get_int(groups[3])
@@ -642,14 +562,7 @@ class DateParser(object):
if check and not check((d, m, y)):
value = Date.EMPTY
return value
match = self._today.match(text)
if match:
today = Today()
if cal:
today = today.to_calendar(cal)
return today.get_dmy(get_slash=True)
return Date.EMPTY
def match_calendar(self, text, cal):
@@ -722,14 +635,14 @@ class DateParser(object):
if match:
text_parser = self.parser[cal]
(text1, bc1) = self.match_bce(match.group('start'))
start = self._parse_subdate(text1, text_parser, cal)
start = self._parse_subdate(text1, text_parser)
if start == Date.EMPTY and text1 != "":
return 0
if bc1:
start = self.invert_year(start)
(text2, bc2) = self.match_bce(match.group('stop'))
stop = self._parse_subdate(text2, text_parser, cal)
stop = self._parse_subdate(text2, text_parser)
if stop == Date.EMPTY and text2 != "":
return 0
if bc2:
@@ -749,14 +662,14 @@ class DateParser(object):
if match:
text_parser = self.parser[cal]
(text1, bc1) = self.match_bce(match.group('start'))
start = self._parse_subdate(text1, text_parser, cal)
start = self._parse_subdate(text1, text_parser)
if start == Date.EMPTY and text1 != "":
return 0
if bc1:
start = self.invert_year(start)
(text2, bc2) = self.match_bce(match.group('stop'))
stop = self._parse_subdate(text2, text_parser, cal)
stop = self._parse_subdate(text2, text_parser)
if stop == Date.EMPTY and text2 != "":
return 0
if bc2:
@@ -793,7 +706,7 @@ class DateParser(object):
match = self._modifier.match(text)
if match:
grps = match.groups()
start = self._parse_subdate(grps[1], self.parser[cal], cal)
start = self._parse_subdate(grps[1], self.parser[cal])
mod = self.modifier_to_int.get(grps[0].lower(), Date.MOD_NONE)
if start == Date.EMPTY:
date.set_modifier(Date.MOD_TEXTONLY)
@@ -808,7 +721,7 @@ class DateParser(object):
match = self._modifier_after.match(text)
if match:
grps = match.groups()
start = self._parse_subdate(grps[0], self.parser[cal], cal)
start = self._parse_subdate(grps[0], self.parser[cal])
mod = self.modifier_after_to_int.get(grps[1].lower(),
Date.MOD_NONE)
if start == Date.EMPTY:
@@ -822,7 +735,7 @@ class DateParser(object):
match = self._abt2.match(text)
if match:
grps = match.groups()
start = self._parse_subdate(grps[0], cal=cal)
start = self._parse_subdate(grps[0])
mod = Date.MOD_ABOUT
if start == Date.EMPTY:
date.set_modifier(Date.MOD_TEXTONLY)
@@ -859,7 +772,7 @@ class DateParser(object):
return
try:
subdate = self._parse_subdate(text, self.parser[cal], cal)
subdate = self._parse_subdate(text, self.parser[cal])
if subdate == Date.EMPTY and text != "":
date.set_as_text(text)
return
@@ -879,7 +792,7 @@ class DateParser(object):
def parse(self, text):
"""
Parses the text, returning a :class:`.Date` object.
Parses the text, returning a Date object.
"""
new_date = Date()
try:
-357
View File
@@ -1,357 +0,0 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov
#
# 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.
#
"""
Date strings to translate per each language for display and parsing.
"""
from __future__ import print_function, unicode_literals
#-------------------------------------------------------------------------
#
# set up logging
#
#-------------------------------------------------------------------------
import logging
log = logging.getLogger(".DateStrings")
#-------------------------------------------------------------------------
#
# DateStrings
#
#-------------------------------------------------------------------------
class DateStrings(object):
"""
String tables for :class:`.DateDisplay` and :class:`.DateParser`.
"""
# This table needs not be localized, it's only for parsing
# Swedish calendar dates using Swedish month names.
# Display of these months uses the regular long_months.
# TODO should we pack these into alt_long_months instead?
swedish_SV = (
"", "Januari", "Februari", "Mars",
"April", "Maj", "Juni",
"Juli", "Augusti", "September",
"Oktober", "November", "December"
)
def __init__(self, locale):
_ = locale.translation.lexgettext
self.long_months = ( "",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to select proper inflection to be used in your localized
# DateDisplayer code!
_("localized lexeme inflections||January"),
_("localized lexeme inflections||February"),
_("localized lexeme inflections||March"),
_("localized lexeme inflections||April"),
_("localized lexeme inflections||May"),
_("localized lexeme inflections||June"),
_("localized lexeme inflections||July"),
_("localized lexeme inflections||August"),
_("localized lexeme inflections||September"),
_("localized lexeme inflections||October"),
_("localized lexeme inflections||November"),
_("localized lexeme inflections||December") )
self.short_months = ( "",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to select proper inflection to be used in your localized
# DateDisplayer code!
_("localized lexeme inflections - short month form||Jan"),
_("localized lexeme inflections - short month form||Feb"),
_("localized lexeme inflections - short month form||Mar"),
_("localized lexeme inflections - short month form||Apr"),
_("localized lexeme inflections - short month form||May"),
_("localized lexeme inflections - short month form||Jun"),
_("localized lexeme inflections - short month form||Jul"),
_("localized lexeme inflections - short month form||Aug"),
_("localized lexeme inflections - short month form||Sep"),
_("localized lexeme inflections - short month form||Oct"),
_("localized lexeme inflections - short month form||Nov"),
_("localized lexeme inflections - short month form||Dec") )
_ = locale.translation.sgettext
self.alt_long_months = ( "",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to add proper alternatives to be recognized in your localized
# DateParser code!
_("alternative month names for January||"),
_("alternative month names for February||"),
_("alternative month names for March||"),
_("alternative month names for April||"),
_("alternative month names for May||"),
_("alternative month names for June||"),
_("alternative month names for July||"),
_("alternative month names for August||"),
_("alternative month names for September||"),
_("alternative month names for October||"),
_("alternative month names for November||"),
_("alternative month names for December||") )
self.calendar = (
# Must appear in the order indexed by Date.CAL_... numeric constants
_("calendar|Gregorian"),
_("calendar|Julian"),
_("calendar|Hebrew"),
_("calendar|French Republican"),
_("calendar|Persian"),
_("calendar|Islamic"),
_("calendar|Swedish") )
_ = locale.translation.lexgettext
self.hebrew = (
"",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to select proper inflection to be used in your localized
# DateDisplayer code!
_("Hebrew month lexeme|Tishri"),
_("Hebrew month lexeme|Heshvan"),
_("Hebrew month lexeme|Kislev"),
_("Hebrew month lexeme|Tevet"),
_("Hebrew month lexeme|Shevat"),
_("Hebrew month lexeme|AdarI"),
_("Hebrew month lexeme|AdarII"),
_("Hebrew month lexeme|Nisan"),
_("Hebrew month lexeme|Iyyar"),
_("Hebrew month lexeme|Sivan"),
_("Hebrew month lexeme|Tammuz"),
_("Hebrew month lexeme|Av"),
_("Hebrew month lexeme|Elul")
)
self.french = (
"",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to select proper inflection to be used in your localized
# DateDisplayer code!
_("French month lexeme|Vendémiaire"),
_("French month lexeme|Brumaire"),
_("French month lexeme|Frimaire"),
_("French month lexeme|Nivôse"),
_("French month lexeme|Pluviôse"),
_("French month lexeme|Ventôse"),
_("French month lexeme|Germinal"),
_("French month lexeme|Floréal"),
_("French month lexeme|Prairial"),
_("French month lexeme|Messidor"),
_("French month lexeme|Thermidor"),
_("French month lexeme|Fructidor"),
_("French month lexeme|Extra"),
)
self.islamic = (
"",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to select proper inflection to be used in your localized
# DateDisplayer code!
_("Islamic month lexeme|Muharram"),
_("Islamic month lexeme|Safar"),
_("Islamic month lexeme|Rabi`al-Awwal"),
_("Islamic month lexeme|Rabi`ath-Thani"),
_("Islamic month lexeme|Jumada l-Ula"),
_("Islamic month lexeme|Jumada t-Tania"),
_("Islamic month lexeme|Rajab"),
_("Islamic month lexeme|Sha`ban"),
_("Islamic month lexeme|Ramadan"),
_("Islamic month lexeme|Shawwal"),
_("Islamic month lexeme|Dhu l-Qa`da"),
_("Islamic month lexeme|Dhu l-Hijja"),
)
self.persian = (
"",
# TRANSLATORS: see
# http://gramps-project.org/wiki/index.php?title=Translating_Gramps#Translating_dates
# to learn how to select proper inflection to be used in your localized
# DateDisplayer code!
_("Persian month lexeme|Farvardin"),
_("Persian month lexeme|Ordibehesht"),
_("Persian month lexeme|Khordad"),
_("Persian month lexeme|Tir"),
_("Persian month lexeme|Mordad"),
_("Persian month lexeme|Shahrivar"),
_("Persian month lexeme|Mehr"),
_("Persian month lexeme|Aban"),
_("Persian month lexeme|Azar"),
_("Persian month lexeme|Dey"),
_("Persian month lexeme|Bahman"),
_("Persian month lexeme|Esfand"),
)
self.modifiers = ("",
_("date modifier|before "),
_("date modifier|after "),
_("date modifier|about "),
"", "", "")
self.qualifiers = ("",
_("date quality|estimated "),
_("date quality|calculated "),
)
# 6753: localized day names. Eventually should sprout into
# a per-calendar type thing instead.
self.long_days = ("",
_("Sunday"),
_("Monday"),
_("Tuesday"),
_("Wednesday"),
_("Thursday"),
_("Friday"),
_("Saturday"),
)
__doc__ += """
__main__
--------
Run this code with the appropriate ``LANG`` and ``LC_DATE`` set for your target
language, in order to generate the .po snippets initialized with the strings
from your locale (from the deprecated data provided in _grampslocale).
E.g., for French::
LANG=fr_FR.utf8 LC_ALL=fr_FR.utf8 GRAMPS_RESOURCES=$PWD python -m gramps.gen.datehandler._datestrings
Then merge the output into your language's .po file, and further modify the
strings as needed. Then remove the strings from your language's
:class:`DateParserXX` and :class:`DateHandlerXX` classes.
"""
if __name__ == '__main__':
import sys
from ..utils.grampslocale import GrampsLocale
from gramps.gen.const import GRAMPS_LOCALE as glocale
from ._grampslocale import (_deprecated_long_months as old_long,
_deprecated_short_months as old_short,
_deprecated_long_days as old_days)
from ._datedisplay import DateDisplay
import gettext
lang = glocale.lang
lang_short = lang[:2]
available_langs = glocale.get_available_translations()
if glocale.check_available_translations(lang) is None:
print ("Translation for current language {lang} not available.\n"
"Available translations: {list}.\n"
"Does po/{lang_short}*.po exist in gramps source tree?!\n"
"Please set your LANG / LC_ALL environment to something else...\n".format(
lang=lang, list=available_langs, lang_short=lang_short),
file=sys.stderr)
sys.exit(1)
print ("# Generating snippets for {}*.po\n"
"# Available languages: {}".format(
lang_short, available_langs))
glocale = GrampsLocale(languages=(lang))
dd = glocale.date_displayer
ds = dd._ds
glocale_EN = GrampsLocale(languages=('en'))
ds_EN = DateStrings(glocale_EN)
filename = __file__
try:
localized_months = dd.__class__.long_months
except AttributeError:
localized_months = old_long
def print_po_snippet(en_loc_old_lists, context):
for m,localized,old in zip(*en_loc_old_lists):
if m == "":
continue
if m == localized:
localized = old
print ('#: {file}:{line}\n'
'msgid "{context}{en_month}"\n'
'msgstr "{localized_month}"\n'.format(
context = context,
file = filename,
line = print_po_snippet.line,
en_month = m,
localized_month = localized))
print_po_snippet.line += 1
print_po_snippet.line = 10000
try:
localized_months = dd.__class__.long_months
except AttributeError:
localized_months = old_long
print_po_snippet((ds_EN.long_months, localized_months, old_long),
"localized lexeme inflections||")
try:
localized_months = dd.__class__.short_months
except AttributeError:
localized_months = old_short
print_po_snippet((ds_EN.short_months, localized_months, old_short),
"localized lexeme inflections - short month form||")
try:
loc = dd.__class__.hebrew
print_po_snippet((ds_EN.hebrew, loc, loc),
"Hebrew month lexeme|")
except AttributeError:
pass
try:
loc = dd.__class__.french
print_po_snippet((ds_EN.french, loc, loc),
"French month lexeme|")
except AttributeError:
pass
try:
loc = dd.__class__.islamic
print_po_snippet((ds_EN.islamic, loc, loc),
"Islamic month lexeme|")
except AttributeError:
pass
try:
loc = dd.__class__.persian
print_po_snippet((ds_EN.persian, loc, loc),
"Persian month lexeme|")
except AttributeError:
pass
try:
loc = dd.__class__._mod_str
print_po_snippet((ds_EN.modifiers, loc, loc),
"date modifier|")
except AttributeError:
pass
try:
loc = dd.__class__._qual_str
print_po_snippet((ds_EN.qualifiers, loc, loc),
"date quality|")
except AttributeError:
pass
print_po_snippet((ds_EN.long_days, old_days, old_days), "")
+14 -12
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Class handling language-specific selection for date parser and displayer.
"""
@@ -59,27 +61,27 @@ def set_format(value):
def set_date(date_base, text) :
"""
Set the date of the :class:`.DateBase` instance.
Set the date of the DateBase instance.
The date is parsed into a :class:`.Date` instance.
The date is parsed into a Date instance.
@param date_base: The DateBase instance to set the date to.
@type date_base: DateBase
@param text: The text to use for the text string in date
@type text: str
:param date_base: The :class:`.DateBase` instance to set the date to.
:type date_base: :class:`.DateBase`
:param text: The text to use for the text string in date
:type text: str
"""
parser.set_date(date_base.get_date_object(), text)
def get_date(date_base) :
"""
Return a string representation of the date of the :class:`.DateBase`
instance.
Return a string representation of the date of the DateBase instance.
This representation is based off the default date display format
determined by the locale's :class:`.DateDisplay` instance.
:return: Returns a string representing the :class:`.DateBase` date
:rtype: str
determined by the locale's DateDisplay instance.
@return: Returns a string representing the DateBase date
@rtype: str
"""
return displayer.display(date_base.get_date_object())
+63 -10
View File
@@ -19,6 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
import locale
import sys
@@ -45,8 +46,34 @@ codeset = glocale.encoding
try:
# here only for the upgrade tool, see _datestrings.py __main__
_deprecated_long_months = (
month_to_int = {
to_uni(locale.nl_langinfo(locale.MON_1), codeset).lower() : 1,
to_uni(locale.nl_langinfo(locale.ABMON_1), codeset).lower() : 1,
to_uni(locale.nl_langinfo(locale.MON_2), codeset).lower() : 2,
to_uni(locale.nl_langinfo(locale.ABMON_2), codeset).lower() : 2,
to_uni(locale.nl_langinfo(locale.MON_3), codeset).lower() : 3,
to_uni(locale.nl_langinfo(locale.ABMON_3), codeset).lower() : 3,
to_uni(locale.nl_langinfo(locale.MON_4), codeset).lower() : 4,
to_uni(locale.nl_langinfo(locale.ABMON_4), codeset).lower() : 4,
to_uni(locale.nl_langinfo(locale.MON_5), codeset).lower() : 5,
to_uni(locale.nl_langinfo(locale.ABMON_5), codeset).lower() : 5,
to_uni(locale.nl_langinfo(locale.MON_6), codeset).lower() : 6,
to_uni(locale.nl_langinfo(locale.ABMON_6), codeset).lower() : 6,
to_uni(locale.nl_langinfo(locale.MON_7), codeset).lower() : 7,
to_uni(locale.nl_langinfo(locale.ABMON_7), codeset).lower() : 7,
to_uni(locale.nl_langinfo(locale.MON_8), codeset).lower() : 8,
to_uni(locale.nl_langinfo(locale.ABMON_8), codeset).lower() : 8,
to_uni(locale.nl_langinfo(locale.MON_9), codeset).lower() : 9,
to_uni(locale.nl_langinfo(locale.ABMON_9), codeset).lower() : 9,
to_uni(locale.nl_langinfo(locale.MON_10), codeset).lower() : 10,
to_uni(locale.nl_langinfo(locale.ABMON_10), codeset).lower(): 10,
to_uni(locale.nl_langinfo(locale.MON_11), codeset).lower() : 11,
to_uni(locale.nl_langinfo(locale.ABMON_11), codeset).lower(): 11,
to_uni(locale.nl_langinfo(locale.MON_12), codeset).lower() : 12,
to_uni(locale.nl_langinfo(locale.ABMON_12), codeset).lower(): 12,
}
long_months = (
"",
to_uni(locale.nl_langinfo(locale.MON_1), codeset),
to_uni(locale.nl_langinfo(locale.MON_2), codeset),
@@ -62,7 +89,7 @@ try:
to_uni(locale.nl_langinfo(locale.MON_12), codeset),
)
_deprecated_short_months = (
short_months = (
"",
to_uni(locale.nl_langinfo(locale.ABMON_1), codeset),
to_uni(locale.nl_langinfo(locale.ABMON_2), codeset),
@@ -84,7 +111,7 @@ try:
# not the international convention (ISO 8601) that Monday
# is the first day of the week."
# see http://docs.python.org/library/locale.html
_deprecated_long_days = (
long_days = (
"",
to_uni(locale.nl_langinfo(locale.DAY_1), codeset), # Sunday
to_uni(locale.nl_langinfo(locale.DAY_2), codeset), # Monday
@@ -95,7 +122,7 @@ try:
to_uni(locale.nl_langinfo(locale.DAY_7), codeset), # Saturday
)
_deprecated_short_days = (
short_days = (
"",
to_uni(locale.nl_langinfo(locale.ABDAY_1), codeset), # Sunday
to_uni(locale.nl_langinfo(locale.ABDAY_2), codeset), # Monday
@@ -114,7 +141,34 @@ try:
except:
import time
_deprecated_long_months = (
month_to_int = {
to_uni(time.strftime('%B',(1,1,1,1,1,1,1,1,1)), codeset).lower() : 1,
to_uni(time.strftime('%b',(1,1,1,1,1,1,1,1,1)), codeset).lower() : 1,
to_uni(time.strftime('%B',(1,2,1,1,1,1,1,1,1)), codeset).lower() : 2,
to_uni(time.strftime('%b',(1,2,1,1,1,1,1,1,1)), codeset).lower() : 2,
to_uni(time.strftime('%B',(1,3,1,1,1,1,1,1,1)), codeset).lower() : 3,
to_uni(time.strftime('%b',(1,3,1,1,1,1,1,1,1)), codeset).lower() : 3,
to_uni(time.strftime('%B',(1,4,1,1,1,1,1,1,1)), codeset).lower() : 4,
to_uni(time.strftime('%b',(1,4,1,1,1,1,1,1,1)), codeset).lower() : 4,
to_uni(time.strftime('%B',(1,5,1,1,1,1,1,1,1)), codeset).lower() : 5,
to_uni(time.strftime('%b',(1,5,1,1,1,1,1,1,1)), codeset).lower() : 5,
to_uni(time.strftime('%B',(1,6,1,1,1,1,1,1,1)), codeset).lower() : 6,
to_uni(time.strftime('%b',(1,6,1,1,1,1,1,1,1)), codeset).lower() : 6,
to_uni(time.strftime('%B',(1,7,1,1,1,1,1,1,1)), codeset).lower() : 7,
to_uni(time.strftime('%b',(1,7,1,1,1,1,1,1,1)), codeset).lower() : 7,
to_uni(time.strftime('%B',(1,8,1,1,1,1,1,1,1)), codeset).lower() : 8,
to_uni(time.strftime('%b',(1,8,1,1,1,1,1,1,1)), codeset).lower() : 8,
to_uni(time.strftime('%B',(1,9,1,1,1,1,1,1,1)), codeset).lower() : 9,
to_uni(time.strftime('%b',(1,9,1,1,1,1,1,1,1)), codeset).lower() : 9,
to_uni(time.strftime('%B',(1,10,1,1,1,1,1,1,1)), codeset).lower() : 10,
to_uni(time.strftime('%b',(1,10,1,1,1,1,1,1,1)), codeset).lower() : 10,
to_uni(time.strftime('%B',(1,11,1,1,1,1,1,1,1)), codeset).lower() : 11,
to_uni(time.strftime('%b',(1,11,1,1,1,1,1,1,1)), codeset).lower() : 11,
to_uni(time.strftime('%B',(1,12,1,1,1,1,1,1,1)), codeset).lower() : 12,
to_uni(time.strftime('%b',(1,12,1,1,1,1,1,1,1)), codeset).lower() : 12,
}
long_months = (
"",
to_uni(time.strftime('%B',(1,1,1,1,1,1,1,1,1)), codeset),
to_uni(time.strftime('%B',(1,2,1,1,1,1,1,1,1)), codeset),
@@ -130,7 +184,7 @@ except:
to_uni(time.strftime('%B',(1,12,1,1,1,1,1,1,1)), codeset),
)
_deprecated_short_months = (
short_months = (
"",
to_uni(time.strftime('%b',(1,1,1,1,1,1,1,1,1)), codeset),
to_uni(time.strftime('%b',(1,2,1,1,1,1,1,1,1)), codeset),
@@ -155,7 +209,7 @@ except:
# number. tm_wday => range [0,6], Monday is 0
# Note. Only the seventh tuple entry matters. The others are
# just a dummy.
_deprecated_long_days = (
long_days = (
"",
to_uni(time.strftime('%A',(1,1,1,1,1,1,6,1,1)), codeset), # Sunday
to_uni(time.strftime('%A',(1,1,1,1,1,1,0,1,1)), codeset), # Monday
@@ -166,7 +220,7 @@ except:
to_uni(time.strftime('%A',(1,1,1,1,1,1,5,1,1)), codeset), # Saturday
)
_deprecated_short_days = (
short_days = (
"",
to_uni(time.strftime('%a',(1,1,1,1,1,1,6,1,1)), codeset), # Sunday
to_uni(time.strftime('%a',(1,1,1,1,1,1,0,1,1)), codeset), # Monday
@@ -194,7 +248,6 @@ except:
'10/25/2005' : '%m/%d/%Y',
'2005/10/25' : '%Y/%m/%d',
'25.10.2005' : '%d.%m.%Y',
'25.10.2005.' : '%d.%m.%Y.',
'10.25.2005' : '%m.%d.%Y',
'2005.10.25' : '%Y.%m.%d',
}
@@ -1,117 +0,0 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov
#
# 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.
#
"""
Deeper testing of some DateParser internals.
"""
from __future__ import print_function, unicode_literals
import unittest
from ...utils.grampslocale import GrampsLocale
from ...lib.date import Date
class DateDisplayTest(unittest.TestCase):
def setUp(self):
from .._datedisplay import DateDisplay
self.display = DateDisplay()
self.display_RU = GrampsLocale(lang='ru').date_displayer
def assert_map_key_val(self, m, k, v):
try:
self.assertEqual(m[k], v)
except KeyError:
self.assertTrue(False, list(m.items()))
class DateDisplayCalendarTest(DateDisplayTest):
def test_calendar_gregorian_is_empty(self):
self.assert_map_key_val(self.display.calendar, Date.CAL_GREGORIAN, "")
def test_calendar_julian_RU(self):
self.assert_map_key_val(self.display_RU.calendar, Date.CAL_JULIAN, 'юлианский')
# This class tests common functionality in DateDisplay as applied to RU,
# and so it is coupled to translated strings and inflection names
# extracted by lexgettext from ru.po
class DateDisplayInflectionsTestRU(DateDisplayTest):
def setUp(self):
DateDisplayTest.setUp(self)
self.dd = self.display = self.display_RU
self.months = self.dd._ds.long_months
# TODO hardwired magic numbers! Bad API smell.
self.dd.set_format(4) # day month_name year
self.may = self.months[5]
def assertInflectionInDate(self, inflection, date, month=None):
if month is None:
month = date.get_month()
month_lexeme = self.months[month]
self.assertIn(month_lexeme.f[inflection],
self.dd.display(date))
def test_month_only_date_nominative(self):
for qual in (Date.QUAL_NONE, Date.QUAL_ESTIMATED, Date.QUAL_CALCULATED):
d1945may = Date(1945, 5, 0)
d1945may.set_quality(qual)
self.assertInflectionInDate('И', d1945may)
def test_day_month_date_genitive(self):
d1945may9 = Date(1945, 5, 9)
self.assertInflectionInDate('Р', d1945may9)
def test_before_month_only_date_genitive(self):
d1945may = Date(1945, 5, 0)
d1945may.set_modifier(Date.MOD_BEFORE)
# TODO hardwired magic numbers! Bad API smell.
for inflecting_format in (3,4):
self.dd.set_format(inflecting_format)
# this depends on the fact that in Russian the short and long forms for May
# will be the same!
self.assertIn("до мая", self.dd.display(d1945may))
def test_between_month_only_dates_ablative(self):
b1945may_1946may = Date()
b1945may_1946may.set(
modifier=Date.MOD_RANGE,
value=(0, 5, 1945, False, 0, 5, 1946, False))
# TODO hardwired magic numbers! Bad API smell.
for inflecting_format in (3,4):
self.dd.set_format(inflecting_format)
# this depends on the fact that in Russian the short and long forms for May
# will be the same!
self.assertIn("между маем", self.dd.display(b1945may_1946may))
self.assertIn("и маем", self.dd.display(b1945may_1946may))
def test_month_only_date_span_from_genitive_to_accusative(self):
f1945may_t1946may = Date()
f1945may_t1946may.set(
modifier=Date.MOD_SPAN,
value=(0, 5, 1945, False, 0, 5, 1946, False))
# TODO hardwired magic numbers! Bad API smell.
for inflecting_format in (3,4):
self.dd.set_format(inflecting_format)
# this depends on the fact that in Russian the short and long forms for May
# will be the same!
self.assertIn("с мая", self.dd.display(f1945may_t1946may))
self.assertIn("по май", self.dd.display(f1945may_t1946may))
if __name__ == "__main__":
unittest.main()
@@ -21,6 +21,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Validate localized date parser and displayer.
@@ -57,14 +59,20 @@ from .. import displayer as _dd
#
#-------------------------------------------------------------------------
class DateHandlerTest(unittest.TestCase):
def base_test(self, test_date):
datestr = _dd.display(test_date)
new_date = _dp.parse(datestr)
self.assertTrue(test_date.is_equal(new_date),
"{} -> {}\n{} -> {}".format(
test_date, new_date,
test_date.to_struct(), new_date.to_struct()))
def base_test(self, test_date):
try:
datestr = _dd.display(test_date)
except:
self.assertFail('Date displayer exception')
try:
new_date = _dp.parse(datestr)
except:
self.assertFail('Date parser exception')
self.assertTrue(test_date.is_equal(new_date))
def test_simple(self):
@@ -1,126 +0,0 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov
#
# 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.
#
"""
Deeper testing of some DateParser internals.
"""
from __future__ import print_function, unicode_literals
import unittest
from ...utils.grampslocale import GrampsLocale
from ...lib.date import Date
class DateParserTest(unittest.TestCase):
def setUp(self):
from .._dateparser import DateParser
self.parser = DateParser()
self.parser_RU = GrampsLocale(lang='ru').date_parser
def assert_map_key_val(self, m, k, v):
try:
self.assertEqual(m[k], v)
except KeyError:
self.assertTrue(False, list(m.items()))
def test_month_to_int_jan_is_1(self):
self.assert_map_key_val(self.parser.month_to_int, 'jan', 1)
def test_prefix_table_for_RU_built(self):
self.assertIn('ru_RU', self.parser._langs)
def test_month_to_int_septem_RU_is_9(self):
self.assert_map_key_val(self.parser.month_to_int, 'сентяб', 9)
def test_hebrew_to_int_av_is_12(self):
self.assert_map_key_val(self.parser.hebrew_to_int, 'av', 12)
self.assert_map_key_val(self.parser.hebrew_to_int, 'ав', 12) # RU
def test_french_to_int_thermidor_is_11(self):
self.assert_map_key_val(self.parser.french_to_int, 'thermidor', 11)
self.assert_map_key_val(self.parser.french_to_int, 'термидор', 11) # RU
def test_islamic_to_int_ramadan_is_9(self):
self.assert_map_key_val(self.parser.islamic_to_int, 'ramadan', 9)
self.assert_map_key_val(self.parser.islamic_to_int, 'рамадан', 9) # RU
def test_persian_to_int_tir_is_4(self):
self.assert_map_key_val(self.parser.persian_to_int, 'tir', 4)
self.assert_map_key_val(self.parser.persian_to_int, 'тир', 4) # RU
def test_calendar_to_int_gregorian(self):
self.assert_map_key_val(self.parser.calendar_to_int, 'gregorian', Date.CAL_GREGORIAN)
self.assert_map_key_val(self.parser.calendar_to_int, 'g', Date.CAL_GREGORIAN)
self.assert_map_key_val(self.parser.calendar_to_int, 'григорианский', Date.CAL_GREGORIAN)
self.assert_map_key_val(self.parser.calendar_to_int, 'г', Date.CAL_GREGORIAN)
def test_calendar_to_int_julian(self):
self.assert_map_key_val(self.parser.calendar_to_int, 'julian', Date.CAL_JULIAN)
self.assert_map_key_val(self.parser.calendar_to_int, 'j', Date.CAL_JULIAN)
self.assert_map_key_val(self.parser.calendar_to_int, 'юлианский', Date.CAL_JULIAN)
self.assert_map_key_val(self.parser.calendar_to_int, 'ю', Date.CAL_JULIAN)
class Test_generate_variants(unittest.TestCase):
def setUp(self):
from .. import _datestrings
from .._dateparser import _generate_variants
self.ds = ds = _datestrings.DateStrings(GrampsLocale(languages=('ru')))
self.month_variants = list(_generate_variants(
zip(ds.long_months, ds.short_months,
ds.swedish_SV, ds.alt_long_months)))
def testVariantsSameLengthAsLongMonths(self):
self.assertEqual(len(self.ds.long_months),
len(self.month_variants))
def testRussianHasDifferentVariantsForEachMonth(self):
for i in range(1, 13):
mvi = self.month_variants[i]
self.assertTrue(len(mvi) > 1, msg=mvi)
def testNoEmptyStringInVariants(self):
for i in range(1, 13):
mvi = self.month_variants[i]
self.assertNotIn("", mvi)
def testLongMonthsAppearInVariants(self):
for i in range(1, 13):
lmi = self.ds.long_months[i]
mvi = self.month_variants[i]
self.assertIn("{}".format(lmi), mvi)
def testShortMonthsAppearInVariants(self):
for i in range(1, 13):
smi = self.ds.short_months[i]
mvi = self.month_variants[i]
self.assertIn("{}".format(smi), mvi)
def testLongMonthVariantsUnique(self):
for i in range(1, 13):
mvi = self.month_variants[i]
self.assertEqual(len(mvi), len(set(mvi)), msg=mvi)
def testRuMayVariantsContainSvMaj(self):
v = self.month_variants[5]
self.assertIn("Maj", v)
if __name__ == "__main__":
unittest.main()
@@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov
#
# 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.
#
from __future__ import print_function, unicode_literals
import unittest
from .. import _datestrings
from ...lib.date import Date
class DateStringsTest(unittest.TestCase):
def setUp(self):
from ...utils.grampslocale import GrampsLocale
self.ds = _datestrings.DateStrings(GrampsLocale()) # whatever the default...
self.ds_EN = _datestrings.DateStrings(GrampsLocale(languages='en'))
self.ds_RU = _datestrings.DateStrings(GrampsLocale(languages='ru'))
def testTwelfthMonthIsDecember(self):
self.assertEqual(self.ds_EN.long_months[12], 'December')
self.assertEqual(self.ds_EN.short_months[12], 'Dec')
# May is 3-letter in Russian, and so abbreviated form
# will be different for inflections!
def testRussianHasDifferentInflectionsForShortMay(self):
v5 = list(self.ds_RU.short_months[5].variants())
self.assertTrue(len(v5) > 1, msg=v5)
def testEnAdarI_in_AdarII(self):
adar1 = self.ds_EN.hebrew[6]
adar2 = self.ds_EN.hebrew[7]
self.assertIn(str(adar1), str(adar2))
def testEnLastFrenchIsExtra(self):
self.assertEqual(str(self.ds_EN.french[-1]), "Extra")
def testEnPersianKhordadMordad(self):
khordad = self.ds_EN.persian[3].lower()
mordad = self.ds_EN.persian[5].lower()
self.assertEqual(khordad, "khordad")
self.assertEqual(mordad, "mordad")
def testEnIslamicRamadan9(self):
self.assertEqual(str(self.ds_EN.islamic[9]), "Ramadan")
def testFirstStringEmpty(self):
self.assertEqual(self.ds.long_months[0], "")
self.assertEqual(self.ds.short_months[0], "")
self.assertEqual(self.ds.alt_long_months[0], "")
self.assertEqual(self.ds.long_days[0], "")
def testCalendarIndex(self):
self.assertEqual(self.ds_EN.calendar[Date.CAL_GREGORIAN], "Gregorian")
self.assertEqual(self.ds_EN.calendar[Date.CAL_JULIAN], "Julian")
self.assertEqual(self.ds_EN.calendar[Date.CAL_HEBREW], "Hebrew")
self.assertEqual(self.ds_EN.calendar[Date.CAL_FRENCH], "French Republican")
self.assertEqual(self.ds_EN.calendar[Date.CAL_PERSIAN], "Persian")
self.assertEqual(self.ds_EN.calendar[Date.CAL_ISLAMIC], "Islamic")
self.assertEqual(self.ds_EN.calendar[Date.CAL_SWEDISH], "Swedish")
def testDayNamesLenIs8(self):
self.assertEqual(len(self.ds.long_days), 8)
if __name__ == "__main__":
unittest.main()
+41 -53
View File
@@ -17,71 +17,59 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# gen/db/__init__.py
# $Id$
#
"""
Gramps Database API.
Gramps Database API.
Database Architecture
=====================
Database Architecture
=====================
Access to the database is made through Python classes. Exactly
what functionality you have is dependent on the properties of the
database. For example, if you are accessing a read-only view, then
you will only have access to a subset of the methods available.
Access to the database is made through Python classes. Exactly
what functionality you have is dependent on the properties of the
database. For example, if you are accessing a read-only view, then
you will only have access to a subset of the methods available.
At the root of any database interface is either :py:class:`.DbReadBase` and/or
:py:class:`.DbWriteBase`. These define the methods to read and write to a
database, respectively.
At the root of any database interface is either DbReadBase and/or
DbWriteBase. These define the methods to read and write to a
database, respectively.
The full database hierarchy is:
The full database hierarchy is:
- :py:class:`.DbBsddb` - read and write implementation to BSDDB databases
- B{DbBsddb} - read and write implementation to BSDDB databases (U{gen/db/write<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/write.py?view=markup>})
- B{DbWriteBase} - virtual and implementation-independent methods for reading data (U{gen/db/base.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/base.py?view=markup>})
- B{DbBsddbRead} - read-only (accessors, getters) implementation to BSDDB databases (U{gen/db/read.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/read.py?view=markup})
- B{DbReadBase} - virtual and implementation-independent methods for reading data (U{gen/db/base.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/base.py?view=markup})
- B{Callback} - callback and signal functions (U{gen/utils/callback.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/utils/callback.py?view=markup})
- B{UpdateCallback} - callback functionality (U{gen/updatecallback.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/read.py?view=markup gen/updatecallback.py?view=markup>})
- B{DbDjango} - read and write implementation to Django-based databases (U{web/dbdjango.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/webapp/dbdjango.py?view=markup})
- B{DbWriteBase} - virtual and implementation-independent methods for reading data (U{gen/db/base.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/base.py?view=markup})
- B{DbReadBase} - virtual and implementation-independent methods for reading data (U{gen/db/base.py<http://svn.code.sf.net/p/gramps/code/trunk/gramps/gen/db/base.py?view=markup})
* :py:class:`.DbWriteBase` - virtual and implementation-independent methods
for reading data
DbBsddb
=======
* :py:class:`.DbBsddbRead` - read-only (accessors, getters) implementation
to BSDDB databases
The DbBsddb interface defines a hierarchical database
(non-relational) written in
U{http://www.jcea.es/programacion/pybsddb.htm PyBSDDB}. There is no
such thing as a database schema, and the meaning of the data is
defined in the Python classes above. The data is stored as pickled
tuples and unserialized into the primary data types (below).
+ :py:class:`.DbReadBase` - virtual and implementation-independent
methods for reading data
DbDjango
========
+ :py:class:`.Callback` - callback and signal functions
The DbDjango interface defines the Gramps data in terms of
I{models} and I{relations} from the
U{Django project<http://www.djangoproject.com/}. The database
backend can be any implementation that supports Django, including
such popular SQL implementations as sqlite, MySQL, Postgresql, and
Oracle. The data is retrieved from the SQL fields, serialized and
then unserialized into the primary data types (below).
* :py:class:`.UpdateCallback` - callback functionality
- :py:class:`.DbDjango` - read and write implementation to Django-based
databases
* :py:class:`.DbWriteBase` - virtual and implementation-independent methods
for reading data
* :py:class:`.DbReadBase` - virtual and implementation-independent methods
for reading data
DbBsddb
=======
The :py:class:`.DbBsddb` interface defines a hierarchical database
(non-relational) written in
`PyBSDDB <http://www.jcea.es/programacion/pybsddb.htm>`_. There is no
such thing as a database schema, and the meaning of the data is
defined in the Python classes above. The data is stored as pickled
tuples and unserialized into the primary data types (below).
DbDjango
========
The DbDjango interface defines the Gramps data in terms of
*models* and *relations* from the
`Django project <http://www.djangoproject.com/>`_. The database
backend can be any implementation that supports Django, including
such popular SQL implementations as sqlite, MySQL, Postgresql, and
Oracle. The data is retrieved from the SQL fields, serialized and
then unserialized into the primary data types (below).
More details can be found in the manual's
`Using database API <http://www.gramps-project.org/wiki/index.php?title=Using_database_API>`_.
More details can be found in the manual's U{Using database API<http://www.gramps-project.org/wiki/index.php?title=Using_database_API>}.
"""
from .base import *
+30 -28
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# gen/db/backup.py
# $Id$
#
"""
Description
@@ -81,11 +83,11 @@ def backup(database):
Exports the database to a set of backup files. These files consist
of the pickled database tables, one file for each table.
The heavy lifting is done by the private :py:func:`__do__export` function.
The purpose of this function is to catch any exceptions that occur.
The heavy lifting is done by the private __do__export function. The
purpose of this function is to catch any exceptions that occur.
:param database: database instance to backup
:type database: DbDir
@param database: database instance to backup
@type database: DbDir
"""
try:
__do_export(database)
@@ -96,10 +98,10 @@ def __mk_backup_name(database, base):
"""
Return the backup name of the database table
:param database: database instance
:type database: DbDir
:param base: base name of the table
:type base: str
@param database: database instance
@type database: DbDir
@param base: base name of the table
@type base: str
"""
return os.path.join(database.get_save_path(), base + ".gbkp")
@@ -107,10 +109,10 @@ def __mk_tmp_name(database, base):
"""
Return the temporary backup name of the database table
:param database: database instance
:type database: DbDir
:param base: base name of the table
:type base: str
@param database: database instance
@type database: DbDir
@param base: base name of the table
@type base: str
"""
return os.path.join(database.get_save_path(), base + ".gbkp.new")
@@ -119,8 +121,8 @@ def __do_export(database):
Loop through each table of the database, saving the pickled data
a file.
:param database: database instance to backup
:type database: DbDir
@param database: database instance to backup
@type database: DbDir
"""
try:
for (base, tbl) in __build_tbl_map(database):
@@ -149,11 +151,11 @@ def restore(database):
Restores the database to a set of backup files. These files consist
of the pickled database tables, one file for each table.
The heavy lifting is done by the private :py:func:`__do__restore` function.
The purpose of this function is to catch any exceptions that occur.
The heavy lifting is done by the private __do__restore function. The
purpose of this function is to catch any exceptions that occur.
:param database: database instance to restore
:type database: DbDir
@param database: database instance to restore
@type database: DbDir
"""
try:
__do_restore(database)
@@ -165,8 +167,8 @@ def __do_restore(database):
Loop through each table of the database, restoring the pickled data
to the appropriate database file.
:param database: database instance to backup
:type database: DbDir
@param database: database instance to backup
@type database: DbDir
"""
for (base, tbl) in __build_tbl_map(database):
backup_name = __mk_backup_name(database, base)
@@ -179,12 +181,12 @@ def __load_tbl_txn(database, backup_table, tbl):
"""
Return the temporary backup name of the database table
:param database: database instance
:type database: DbDir
:param backup_table: file containing the backup data
:type backup_table: file
:param tbl: Berkeley db database table
:type tbl: Berkeley db database table
@param database: database instance
@type database: DbDir
@param backup_table: file containing the backup data
@type backup_table: file
@param tbl: Berkeley db database table
@type tbl: Berkeley db database table
"""
try:
while True:
@@ -199,8 +201,8 @@ def __build_tbl_map(database):
"""
Builds a table map of names to database tables.
:param database: database instance to backup
:type database: DbDir
@param database: database instance to backup
@type database: DbDir
"""
return [
( PERSON_TBL, database.person_map.db),
+56 -88
View File
@@ -20,8 +20,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Base class for the Gramps databases. All database interfaces should inherit
Base class for the GRAMPS databases. All database interfaces should inherit
from this class.
"""
@@ -35,7 +37,7 @@ _ = glocale.translation.gettext
#-------------------------------------------------------------------------
#
# Gramps libraries
# GRAMPS libraries
#
#-------------------------------------------------------------------------
from ..lib.childreftype import ChildRefType
@@ -45,7 +47,7 @@ from .exceptions import DbTransactionCancel
class DbReadBase(object):
"""
Gramps database object. This object is a base class for all
GRAMPS database object. This object is a base class for all
database interfaces. All methods raise NotImplementedError
and must be implemented in the derived class as required.
"""
@@ -59,18 +61,6 @@ class DbReadBase(object):
"""
self.basedb = self
self.__feature = {} # {"feature": VALUE, ...}
self._tables = {
"Citation": {},
"Event": {},
"Family": {},
"Media": {},
"Note": {},
"Person": {},
"Place": {},
"Repository": {},
"Source": {},
"Tag": {},
}
def get_feature(self, feature):
"""
@@ -135,56 +125,56 @@ class DbReadBase(object):
def find_next_event_gramps_id(self):
"""
Return the next available Gramps ID for a Event object based off the
Return the next available GRAMPS' ID for a Event object based off the
event ID prefix.
"""
raise NotImplementedError
def find_next_family_gramps_id(self):
"""
Return the next available Gramps ID for a Family object based off the
Return the next available GRAMPS' ID for a Family object based off the
family ID prefix.
"""
raise NotImplementedError
def find_next_note_gramps_id(self):
"""
Return the next available Gramps ID for a Note object based off the
Return the next available GRAMPS' ID for a Note object based off the
note ID prefix.
"""
raise NotImplementedError
def find_next_object_gramps_id(self):
"""
Return the next available Gramps ID for a MediaObject object based
Return the next available GRAMPS' ID for a MediaObject object based
off the media object ID prefix.
"""
raise NotImplementedError
def find_next_person_gramps_id(self):
"""
Return the next available Gramps ID for a Person object based off the
Return the next available GRAMPS' ID for a Person object based off the
person ID prefix.
"""
raise NotImplementedError
def find_next_place_gramps_id(self):
"""
Return the next available Gramps ID for a Place object based off the
Return the next available GRAMPS' ID for a Place object based off the
place ID prefix.
"""
raise NotImplementedError
def find_next_repository_gramps_id(self):
"""
Return the next available Gramps ID for a Repository object based
Return the next available GRAMPS' ID for a Repository object based
off the repository ID prefix.
"""
raise NotImplementedError
def find_next_source_gramps_id(self):
"""
Return the next available Gramps ID for a Source object based off the
Return the next available GRAMPS' ID for a Source object based off the
source ID prefix.
"""
raise NotImplementedError
@@ -228,7 +218,7 @@ class DbReadBase(object):
def get_event_from_gramps_id(self, val):
"""
Find an Event in the database from the passed Gramps ID.
Find an Event in the database from the passed GRAMPS ID.
If no such Event exists, None is returned.
Needs to be overridden by the derived class.
@@ -237,7 +227,7 @@ class DbReadBase(object):
def get_event_from_handle(self, handle):
"""
Find a Event in the database from the passed Gramps ID.
Find a Event in the database from the passed gramps' ID.
If no such Event exists, None is returned.
"""
@@ -257,19 +247,6 @@ class DbReadBase(object):
"""
raise NotImplementedError
def get_event_attribute_types(self):
"""
Return a list of all Attribute types assocated with Event instances
in the database.
"""
raise NotImplementedError
def get_event_types(self):
"""
Return a list of all event types in the database.
"""
raise NotImplementedError
def get_family_attribute_types(self):
"""
Return a list of all Attribute types associated with Family instances
@@ -291,13 +268,14 @@ class DbReadBase(object):
def get_family_event_types(self):
"""
Deprecated: Use get_event_types
Return a list of all Event types associated with Family instances in
the database.
"""
raise NotImplementedError
def get_family_from_gramps_id(self, val):
"""
Find a Family in the database from the passed Gramps ID.
Find a Family in the database from the passed GRAMPS ID.
If no such Family exists, None is returned.
Need to be overridden by the derived class.
@@ -306,7 +284,7 @@ class DbReadBase(object):
def get_family_from_handle(self, handle):
"""
Find a Family in the database from the passed Gramps ID.
Find a Family in the database from the passed gramps' ID.
If no such Family exists, None is returned.
"""
@@ -412,7 +390,7 @@ class DbReadBase(object):
def get_note_from_gramps_id(self, val):
"""
Find a Note in the database from the passed Gramps ID.
Find a Note in the database from the passed gramps' ID.
If no such Note exists, None is returned.
Needs to be overridden by the derived classderri.
@@ -421,7 +399,7 @@ class DbReadBase(object):
def get_note_from_handle(self, handle):
"""
Find a Note in the database from the passed Gramps ID.
Find a Note in the database from the passed gramps' ID.
If no such Note exists, None is returned.
"""
@@ -497,7 +475,7 @@ class DbReadBase(object):
def get_object_from_gramps_id(self, val):
"""
Find a MediaObject in the database from the passed Gramps ID.
Find a MediaObject in the database from the passed gramps' ID.
If no such MediaObject exists, None is returned.
Needs to be overridden by the derived class.
@@ -506,7 +484,7 @@ class DbReadBase(object):
def get_object_from_handle(self, handle):
"""
Find an Object in the database from the passed Gramps ID.
Find an Object in the database from the passed gramps' ID.
If no such Object exists, None is returned.
"""
@@ -527,13 +505,14 @@ class DbReadBase(object):
def get_person_event_types(self):
"""
Deprecated: Use get_event_types
Return a list of all Event types associated with Person instances in
the database.
"""
raise NotImplementedError
def get_person_from_gramps_id(self, val):
"""
Find a Person in the database from the passed Gramps ID.
Find a Person in the database from the passed GRAMPS ID.
If no such Person exists, None is returned.
Needs to be overridden by the derived class.
@@ -542,7 +521,7 @@ class DbReadBase(object):
def get_person_from_handle(self, handle):
"""
Find a Person in the database from the passed Gramps ID.
Find a Person in the database from the passed gramps' ID.
If no such Person exists, None is returned.
"""
@@ -557,13 +536,6 @@ class DbReadBase(object):
"""
raise NotImplementedError
def get_source_attribute_types(self):
"""
Return a list of all Attribute types associated with Source/Citation
instances in the database.
"""
raise NotImplementedError
def get_place_bookmarks(self):
"""
Return the list of Place handles in the bookmarks.
@@ -578,7 +550,7 @@ class DbReadBase(object):
def get_place_from_gramps_id(self, val):
"""
Find a Place in the database from the passed Gramps ID.
Find a Place in the database from the passed gramps' ID.
If no such Place exists, None is returned.
Needs to be overridden by the derived class.
@@ -587,7 +559,7 @@ class DbReadBase(object):
def get_place_from_handle(self, handle):
"""
Find a Place in the database from the passed Gramps ID.
Find a Place in the database from the passed gramps' ID.
If no such Place exists, None is returned.
"""
@@ -694,7 +666,7 @@ class DbReadBase(object):
def get_repository_from_gramps_id(self, val):
"""
Find a Repository in the database from the passed Gramps ID.
Find a Repository in the database from the passed gramps' ID.
If no such Repository exists, None is returned.
Needs to be overridden by the derived class.
@@ -703,7 +675,7 @@ class DbReadBase(object):
def get_repository_from_handle(self, handle):
"""
Find a Repository in the database from the passed Gramps ID.
Find a Repository in the database from the passed gramps' ID.
If no such Repository exists, None is returned.
"""
@@ -750,7 +722,7 @@ class DbReadBase(object):
def get_source_from_gramps_id(self, val):
"""
Find a Source in the database from the passed Gramps ID.
Find a Source in the database from the passed gramps' ID.
If no such Source exists, None is returned.
Needs to be overridden by the derived class.
@@ -759,7 +731,7 @@ class DbReadBase(object):
def get_source_from_handle(self, handle):
"""
Find a Source in the database from the passed Gramps ID.
Find a Source in the database from the passed gramps' ID.
If no such Source exists, None is returned.
"""
@@ -795,7 +767,7 @@ class DbReadBase(object):
def get_citation_from_gramps_id(self, val):
"""
Find a Citation in the database from the passed Gramps ID.
Find a Citation in the database from the passed gramps' ID.
If no such Citation exists, None is returned.
Needs to be overridden by the derived class.
@@ -804,7 +776,7 @@ class DbReadBase(object):
def get_citation_from_handle(self, handle):
"""
Find a Citation in the database from the passed Gramps ID.
Find a Citation in the database from the passed gramps' ID.
If no such Citation exists, None is returned.
"""
@@ -864,13 +836,6 @@ class DbReadBase(object):
"""
raise NotImplementedError
def get_place_types(self):
"""
Return a list of all custom place types assocated with Place instances
in the database.
"""
raise NotImplementedError
def gramps_upgrade(self):
"""
Return True if database is upgraded
@@ -1078,9 +1043,8 @@ class DbReadBase(object):
internal data dependent on the database should be rebuilt.
Note that all rebuild signals on all objects are emitted at the same
time. It is correct to assume that this is always the case.
.. todo:: it might be better to replace these rebuild signals by one
single database-rebuild signal.
TODO: it might be better to replace these rebuild signals by one single
database-rebuild signal.
"""
raise NotImplementedError
@@ -1092,7 +1056,7 @@ class DbReadBase(object):
def set_event_id_prefix(self, val):
"""
Set the naming template for Gramps Event ID values.
Set the naming template for GRAMPS Event ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1102,7 +1066,7 @@ class DbReadBase(object):
def set_family_id_prefix(self, val):
"""
Set the naming template for Gramps Family ID values. The string is
Set the naming template for GRAMPS Family ID values. The string is
expected to be in the form of a simple text string, or in a format
that contains a C/Python style format string using %d, such as F%d
or F%04d.
@@ -1111,7 +1075,7 @@ class DbReadBase(object):
def set_note_id_prefix(self, val):
"""
Set the naming template for Gramps Note ID values.
Set the naming template for GRAMPS Note ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1121,7 +1085,7 @@ class DbReadBase(object):
def set_object_id_prefix(self, val):
"""
Set the naming template for Gramps MediaObject ID values.
Set the naming template for GRAMPS MediaObject ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1131,7 +1095,7 @@ class DbReadBase(object):
def set_person_id_prefix(self, val):
"""
Set the naming template for Gramps Person ID values.
Set the naming template for GRAMPS Person ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1141,7 +1105,7 @@ class DbReadBase(object):
def set_place_id_prefix(self, val):
"""
Set the naming template for Gramps Place ID values.
Set the naming template for GRAMPS Place ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1158,7 +1122,7 @@ class DbReadBase(object):
def set_repository_id_prefix(self, val):
"""
Set the naming template for Gramps Repository ID values.
Set the naming template for GRAMPS Repository ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1168,7 +1132,7 @@ class DbReadBase(object):
def set_source_id_prefix(self, val):
"""
Set the naming template for Gramps Source ID values.
Set the naming template for GRAMPS Source ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1228,7 +1192,7 @@ class DbReadBase(object):
class DbWriteBase(DbReadBase):
"""
Gramps database object. This object is a base class for all
GRAMPS database object. This object is a base class for all
database interfaces. All methods raise NotImplementedError
and must be implemented in the derived class as required.
"""
@@ -1262,7 +1226,8 @@ class DbWriteBase(DbReadBase):
def add_family_event(self, event, transaction):
"""
Deprecated: Use add_event
Add an Event to the database, assigning internal IDs if they have
not already been defined.
"""
raise NotImplementedError
@@ -1295,7 +1260,8 @@ class DbWriteBase(DbReadBase):
def add_person_event(self, event, transaction):
"""
Deprecated: Use add_event
Add an Event to the database, assigning internal IDs if they have
not already been defined.
"""
raise NotImplementedError
@@ -1368,7 +1334,8 @@ class DbWriteBase(DbReadBase):
def commit_family_event(self, event, transaction, change_time=None):
"""
Deprecated: Use commit_event
Commit the specified family Event to the database, storing the
changes as part of the transaction.
"""
raise NotImplementedError
@@ -1395,7 +1362,8 @@ class DbWriteBase(DbReadBase):
def commit_personal_event(self, event, transaction, change_time=None):
"""
Deprecated: Use commit_event
Commit the specified personal Event to the database, storing the
changes as part of the transaction.
"""
raise NotImplementedError
@@ -1590,9 +1558,9 @@ class DbWriteBase(DbReadBase):
before the start of such database operations.
:param transaction: Gramps transaction ...
:type transaction: :py:class:`.DbTxn`
:type transaction: DbTxn
:returns: Returns the Gramps transaction.
:rtype: :py:class:`.DbTxn`
:rtype: DbTxn
"""
raise NotImplementedError
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
BSDDBTxn class: Wrapper for BSDDB transaction-oriented methods
"""
+6 -14
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# gen/db/cursor.py
# $Id$
#
#-------------------------------------------------------------------------
#
@@ -31,20 +33,10 @@ else:
from pickle import dumps, loads
from ..config import config
try:
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3 import db
else:
from bsddb import db
except:
# FIXME: make this more abstract to deal with other backends
class db:
DB_RMW = 0
DB_FIRST = 0
DB_LAST = 0
DB_CURRENT = 0
DB_PREV = 0
DB_NEXT = 0
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3 import db
else:
from bsddb import db
#-------------------------------------------------------------------------
#
+10 -16
View File
@@ -19,6 +19,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Declare constants used by database modules
"""
@@ -39,7 +41,7 @@ __all__ = (
('DBPAGE', 'DBMODE', 'DBCACHE', 'DBLOCKS', 'DBOBJECTS', 'DBUNDO',
'DBEXT', 'DBMODE_R', 'DBMODE_W', 'DBUNDOFN', 'DBLOCKFN',
'DBRECOVFN','BDBVERSFN', 'DBLOGNAME', 'DBFLAGS_O', 'DBFLAGS_R',
'DBFLAGS_D', 'SCHVERSFN', 'PCKVERSFN'
'DBFLAGS_D', 'SCHVERSFN'
) +
('PERSON_KEY', 'FAMILY_KEY', 'SOURCE_KEY', 'CITATION_KEY',
@@ -56,7 +58,6 @@ DBLOCKFN = "lock" # File name of lock file
DBRECOVFN = "need_recover" # File name of recovery file
BDBVERSFN = "bdbversion.txt"# File name of Berkeley DB version file
SCHVERSFN = "schemaversion.txt"# File name of schema version file
PCKVERSFN = "pickleupgrade.txt" # Indicator that pickle has been upgrade t Python3
DBLOGNAME = ".Db" # Name of logger
DBMODE_R = "r" # Read-only access
DBMODE_W = "w" # Full Read/Write access
@@ -68,20 +69,13 @@ DBOBJECTS = 100000 # Maximum number of simultaneously locked objects
DBUNDO = 1000 # Maximum size of undo buffer
from ..config import config
try:
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
else:
from bsddb.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
DBFLAGS_O = DB_CREATE | DB_AUTO_COMMIT # Default flags for database open
DBFLAGS_R = DB_RDONLY # Flags to open a database read-only
DBFLAGS_D = DB_DUP | DB_DUPSORT # Default flags for duplicate keys
except:
print("WARNING: no bsddb support")
# FIXME: make this more abstract to deal with other backends, or do not import
DBFLAGS_O = DB_CREATE = DB_AUTO_COMMIT = 0
DBFLAGS_R = DB_RDONLY = 0
DBFLAGS_D = DB_DUP = DB_DUPSORT = 0
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
else:
from bsddb.db import DB_CREATE, DB_AUTO_COMMIT, DB_DUP, DB_DUPSORT, DB_RDONLY
DBFLAGS_O = DB_CREATE | DB_AUTO_COMMIT # Default flags for database open
DBFLAGS_R = DB_RDONLY # Flags to open a database read-only
DBFLAGS_D = DB_DUP | DB_DUPSORT # Default flags for duplicate keys
PERSON_KEY = 0
FAMILY_KEY = 1
+66 -310
View File
@@ -16,6 +16,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
""" Implements a Db interface as a Dictionary """
@@ -34,16 +36,14 @@ import time
import re
from . import DbReadBase, DbWriteBase, DbTxn
from . import (PERSON_KEY,
FAMILY_KEY,
CITATION_KEY,
SOURCE_KEY,
EVENT_KEY,
MEDIA_KEY,
PLACE_KEY,
REPOSITORY_KEY,
NOTE_KEY,
TAG_KEY)
FAMILY_KEY,
CITATION_KEY,
SOURCE_KEY,
EVENT_KEY,
MEDIA_KEY,
PLACE_KEY,
REPOSITORY_KEY,
NOTE_KEY)
from ..utils.id import create_id
from ..lib.researcher import Researcher
from ..lib.mediaobj import MediaObject
@@ -86,8 +86,8 @@ class Bookmarks:
pass
class DictionaryTxn(DbTxn):
def __init__(self, message, db, batch=False):
DbTxn.__init__(self, message, db, batch)
def __init__(self, message, db):
DbTxn.__init__(self, message, db)
def get(self, key, default=None, txn=None, **kwargs):
"""
@@ -107,112 +107,94 @@ class DictionaryDb(DbWriteBase, DbReadBase):
"""
A Gramps Database Backend. This replicates the grampsdb functions.
"""
def __init__(self, *args, **kwargs):
DbReadBase.__init__(self)
DbWriteBase.__init__(self)
self._tables['Person'].update(
{
self._tables = {
'Person':
{
"handle_func": self.get_person_from_handle,
"gramps_id_func": self.get_person_from_gramps_id,
"class_func": Person,
"cursor_func": self.get_person_cursor,
"handles_func": self.get_person_handles,
"add_func": self.add_person,
"commit_func": self.commit_person,
})
self._tables['Family'].update(
{
},
'Family':
{
"handle_func": self.get_family_from_handle,
"gramps_id_func": self.get_family_from_gramps_id,
"class_func": Family,
"cursor_func": self.get_family_cursor,
"handles_func": self.get_family_handles,
"add_func": self.add_family,
"commit_func": self.commit_family,
})
self._tables['Source'].update(
{
},
'Source':
{
"handle_func": self.get_source_from_handle,
"gramps_id_func": self.get_source_from_gramps_id,
"class_func": Source,
"cursor_func": self.get_source_cursor,
"handles_func": self.get_source_handles,
"add_func": self.add_source,
"commit_func": self.commit_source,
})
self._tables['Citation'].update(
{
},
'Citation':
{
"handle_func": self.get_citation_from_handle,
"gramps_id_func": self.get_citation_from_gramps_id,
"class_func": Citation,
"cursor_func": self.get_citation_cursor,
"handles_func": self.get_citation_handles,
"add_func": self.add_citation,
"commit_func": self.commit_citation,
})
self._tables['Event'].update(
{
},
'Event':
{
"handle_func": self.get_event_from_handle,
"gramps_id_func": self.get_event_from_gramps_id,
"class_func": Event,
"cursor_func": self.get_event_cursor,
"handles_func": self.get_event_handles,
"add_func": self.add_event,
"commit_func": self.commit_event,
})
self._tables['Media'].update(
{
},
'Media':
{
"handle_func": self.get_object_from_handle,
"gramps_id_func": self.get_object_from_gramps_id,
"class_func": MediaObject,
"cursor_func": self.get_media_cursor,
"handles_func": self.get_media_object_handles,
"add_func": self.add_object,
"commit_func": self.commit_media_object,
})
self._tables['Place'].update(
{
},
'Place':
{
"handle_func": self.get_place_from_handle,
"gramps_id_func": self.get_place_from_gramps_id,
"class_func": Place,
"cursor_func": self.get_place_cursor,
"handles_func": self.get_place_handles,
"add_func": self.add_place,
"commit_func": self.commit_place,
})
self._tables['Repository'].update(
{
},
'Repository':
{
"handle_func": self.get_repository_from_handle,
"gramps_id_func": self.get_repository_from_gramps_id,
"class_func": Repository,
"cursor_func": self.get_repository_cursor,
"handles_func": self.get_repository_handles,
"add_func": self.add_repository,
"commit_func": self.commit_repository,
})
self._tables['Note'].update(
{
},
'Note':
{
"handle_func": self.get_note_from_handle,
"gramps_id_func": self.get_note_from_gramps_id,
"class_func": Note,
"cursor_func": self.get_note_cursor,
"handles_func": self.get_note_handles,
"add_func": self.add_note,
"commit_func": self.commit_note,
})
self._tables['Tag'].update(
{
},
'Tag':
{
"handle_func": self.get_tag_from_handle,
"gramps_id_func": None,
"class_func": Tag,
"cursor_func": self.get_tag_cursor,
"handles_func": self.get_tag_handles,
"add_func": self.add_tag,
"commit_func": self.commit_tag,
})
},
}
# skip GEDCOM cross-ref check for now:
self.set_feature("skip-check-xref", True)
self.set_feature("skip-import-additions", True)
self.readonly = False
self.db_is_open = True
self.name_formats = []
@@ -273,20 +255,6 @@ class DictionaryDb(DbWriteBase, DbReadBase):
self.txn = DictionaryTxn("DbDictionary Transaction", self)
self.transaction = None
def version_supported(self):
"""Return True when the file has a supported version."""
return True
def get_table_names(self):
"""Return a list of valid table names."""
return list(self._tables.keys())
def get_table_metadata(self, table_name):
"""Return the metadata for a valid table name."""
if table_name in self._tables:
return self._tables[table_name]
return None
def transaction_commit(self, txn):
pass
@@ -329,17 +297,17 @@ class DictionaryDb(DbWriteBase, DbReadBase):
id_number = gramps_id[len(str_prefix):]
if id_number.isdigit():
id_value = int(id_number, 10)
#if len(str(id_value)) > nr_width:
# # The ID to be imported is too large to fit in the
# # users format. For now just create a new ID,
# # because that is also what happens with IDs that
# # are identical to IDs already in the database. If
# # the problem of colliding import and already
# # present IDs is solved the code here also needs
# # some solution.
# gramps_id = id_pattern % 1
#else:
gramps_id = id_pattern % id_value
if len(str(id_value)) > nr_width:
# The ID to be imported is too large to fit in the
# users format. For now just create a new ID,
# because that is also what happens with IDs that
# are identical to IDs already in the database. If
# the problem of colliding import and already
# present IDs is solved the code here also needs
# some solution.
gramps_id = id_pattern % 1
else:
gramps_id = id_pattern % id_value
return gramps_id
else:
def closure_func(gramps_id):
@@ -697,34 +665,34 @@ class DictionaryDb(DbWriteBase, DbReadBase):
return len(self.repository_map)
def get_place_cursor(self):
return Cursor(self.place_map, self.get_raw_place_data)
return Cursor(self.place_map, self.get_raw_place_data).iter()
def get_person_cursor(self):
return Cursor(self.person_map, self.get_raw_person_data)
return Cursor(self.person_map, self.get_raw_person_data).iter()
def get_family_cursor(self):
return Cursor(self.family_map, self.get_raw_family_data)
return Cursor(self.family_map, self.get_raw_family_data).iter()
def get_event_cursor(self):
return Cursor(self.event_map, self.get_raw_event_data)
return Cursor(self.event_map, self.get_raw_event_data).iter()
def get_note_cursor(self):
return Cursor(self.note_map, self.get_raw_note_data)
return Cursor(self.note_map, self.get_raw_note_data).iter()
def get_tag_cursor(self):
return Cursor(self.tag_map, self.get_raw_tag_data)
return Cursor(self.tag_map, self.get_raw_tag_data).iter()
def get_repository_cursor(self):
return Cursor(self.repository_map, self.get_raw_repository_data)
return Cursor(self.repository_map, self.get_raw_repository_data).iter()
def get_media_cursor(self):
return Cursor(self.media_map, self.get_raw_object_data)
return Cursor(self.media_map, self.get_raw_object_data).iter()
def get_citation_cursor(self):
return Cursor(self.citation_map, self.get_raw_citation_data)
return Cursor(self.citation_map, self.get_raw_citation_data).iter()
def get_source_cursor(self):
return Cursor(self.source_map, self.get_raw_source_data)
return Cursor(self.source_map, self.get_raw_source_data).iter()
def has_gramps_id(self, obj_key, gramps_id):
key2table = {
@@ -985,215 +953,3 @@ class DictionaryDb(DbWriteBase, DbReadBase):
for (handle, data) in cursor():
map = getattr(self, "%s_map" % key.lower())
map[handle] = class_.create(data)
def get_transaction_class(self):
"""
Get the transaction class associated with this database backend.
"""
return DictionaryTxn
def get_from_name_and_handle(self, table_name, handle):
"""
Returns a gen.lib object (or None) given table_name and
handle.
Examples:
>>> self.get_from_name_and_handle("Person", "a7ad62365bc652387008")
>>> self.get_from_name_and_handle("Media", "c3434653675bcd736f23")
"""
if table_name in self._tables:
return self._tables[table_name]["handle_func"](handle)
return None
def get_from_name_and_gramps_id(self, table_name, gramps_id):
"""
Returns a gen.lib object (or None) given table_name and
Gramps ID.
Examples:
>>> self.get_from_name_and_gramps_id("Person", "I00002")
>>> self.get_from_name_and_gramps_id("Family", "F056")
>>> self.get_from_name_and_gramps_id("Media", "M00012")
"""
if table_name in self._tables:
return self._tables[table_name]["gramps_id_func"](gramps_id)
return None
def remove_person(self, handle, transaction):
"""
Remove the Person specified by the database handle from the database,
preserving the change in the passed transaction.
"""
if self.readonly or not handle:
return
person = self.get_person_from_handle(handle)
#self.genderStats.uncount_person (person)
#self.remove_from_surname_list(person)
if isinstance(handle, UNITYPE):
handle = handle.encode('utf-8')
if transaction.batch:
with BSDDBTxn(self.env, self.person_map) as txn:
self.delete_primary_from_reference_map(handle, transaction,
txn=txn.txn)
txn.delete(handle)
else:
self.delete_primary_from_reference_map(handle, transaction,
txn=self.txn)
self.person_map.delete(handle, txn=self.txn)
transaction.add(PERSON_KEY, TXNDEL, handle, person.serialize(), None)
def remove_source(self, handle, transaction):
"""
Remove the Source specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.source_map,
SOURCE_KEY)
def remove_citation(self, handle, transaction):
"""
Remove the Citation specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.citation_map,
CITATION_KEY)
def remove_event(self, handle, transaction):
"""
Remove the Event specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.event_map,
EVENT_KEY)
def remove_object(self, handle, transaction):
"""
Remove the MediaObjectPerson specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.media_map,
MEDIA_KEY)
def remove_place(self, handle, transaction):
"""
Remove the Place specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.place_map,
PLACE_KEY)
def remove_family(self, handle, transaction):
"""
Remove the Family specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.family_map,
FAMILY_KEY)
def remove_repository(self, handle, transaction):
"""
Remove the Repository specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.repository_map,
REPOSITORY_KEY)
def remove_note(self, handle, transaction):
"""
Remove the Note specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.note_map,
NOTE_KEY)
def remove_tag(self, handle, transaction):
"""
Remove the Tag specified by the database handle from the
database, preserving the change in the passed transaction.
"""
self.__do_remove(handle, transaction, self.tag_map,
TAG_KEY)
def __do_remove(self, handle, transaction, data_map, key):
if self.readonly or not handle:
return
if isinstance(handle, UNITYPE):
handle = handle.encode('utf-8')
if transaction.batch:
with BSDDBTxn(self.env, data_map) as txn:
self.delete_primary_from_reference_map(handle, transaction,
txn=txn.txn)
txn.delete(handle)
else:
self.delete_primary_from_reference_map(handle, transaction,
txn=self.txn)
old_data = data_map.get(handle, txn=self.txn)
data_map.delete(handle, txn=self.txn)
transaction.add(key, TXNDEL, handle, old_data, None)
def delete_primary_from_reference_map(self, handle, transaction, txn=None):
"""
Remove all references to the primary object from the reference_map.
handle should be utf-8
"""
primary_cur = self.get_reference_map_primary_cursor()
try:
ret = primary_cur.set(handle)
except:
ret = None
remove_list = set()
while (ret is not None):
(key, data) = ret
# data values are of the form:
# ((primary_object_class_name, primary_object_handle),
# (referenced_object_class_name, referenced_object_handle))
# so we need the second tuple give us a reference that we can
# combine with the primary_handle to get the main key.
if sys.version_info[0] < 3:
#handle should be in python 2 str
main_key = (handle, pickle.loads(data)[1][1])
else:
#python 3 work internally with unicode
main_key = (handle.decode('utf-8'), pickle.loads(data)[1][1])
# The trick is not to remove while inside the cursor,
# but collect them all and remove after the cursor is closed
remove_list.add(main_key)
ret = primary_cur.next_dup()
primary_cur.close()
# Now that the cursor is closed, we can remove things
for main_key in remove_list:
self.__remove_reference(main_key, transaction, txn)
def __remove_reference(self, key, transaction, txn):
"""
Remove the reference specified by the key, preserving the change in
the passed transaction.
"""
if isinstance(key, tuple):
#create a byte string key, first validity check in python 3!
for val in key:
if sys.version_info[0] >= 3 and isinstance(val, bytes):
raise DbError(_('An attempt is made to save a reference key '
'which is partly bytecode, this is not allowed.\n'
'Key is %s') % str(key))
key = str(key)
if isinstance(key, UNITYPE):
key = key.encode('utf-8')
if not self.readonly:
if not transaction.batch:
old_data = self.reference_map.get(key, txn=txn)
transaction.add(REFERENCE_KEY, TXNDEL, key, old_data, None)
#transaction.reference_del.append(str(key))
self.reference_map.delete(key, txn=txn)
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""Exceptions generated by the Db package."""
#-------------------------------------------------------------------------
+116 -186
View File
@@ -20,8 +20,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Read classes for the Gramps databases.
Read classes for the GRAMPS databases.
"""
#-------------------------------------------------------------------------
@@ -42,19 +44,11 @@ import os
from sys import maxsize
from ..config import config
try:
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3 import db
else:
from bsddb import db
except:
# FIXME: make this more abstract to deal with other backends
class db:
DBRunRecoveryError = 0
DBAccessError = 0
DBPageNotFoundError = 0
DBInvalidArgError = 0
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3 import db
else:
from bsddb import db
import re
import logging
@@ -195,52 +189,13 @@ class DbReadCursor(BsddbBaseCursor):
self.cursor = source.db.cursor(txn)
self.source = source
#-------------------------------------------------------------------------
#
# DbBsddbTreeCursor
#
#-------------------------------------------------------------------------
class DbBsddbTreeCursor(BsddbBaseCursor):
def __init__(self, source, primary, readonly, txn=None, **kwargs):
BsddbBaseCursor.__init__(self, txn=txn, **kwargs)
self.cursor = source.cursor(txn)
self.source = source
self.primary = primary
self.readonly = readonly
def __iter__(self):
"""
Iterator
"""
_n = self.next_dup
to_do = [b'']
while to_do:
key = to_do.pop()
key = key.encode('utf-8') if not isinstance(key, bytes) else key
data = self.set(key)
while data:
### FIXME: this is a dirty hack that works without no
### sensible explanation. For some reason, for a readonly
### database, secondary index returns a primary table key
### corresponding to the data, not the data.
if self.readonly:
payload = self.primary.get(data[1], txn=self.txn)
else:
payload = pickle.loads(data[1])
yield (payload[0], payload)
to_do.append(payload[0])
data = _n()
class DbBsddbRead(DbReadBase, Callback):
"""
Read class for the Gramps databases. Implements methods necessary to read
Read class for the GRAMPS databases. Implements methods necessary to read
the various object classes. Currently, there are nine (9) classes:
:py:class:`.Person`, :py:class:`.Family`, :py:class:`.Event`,
:py:class:`.Place`, :py:class:`.Source`,
:py:class:`Citation <.lib.citation.Citation>`, :py:class:`.MediaObject`,
:py:class:`.Repository` and :py:class:`.Note`
Person, Family, Event, Place, Source, Citation, MediaObject,
Repository and Note
For each object class, there are methods to retrieve data in various ways.
In the methods described below, <object> can be one of person, family,
@@ -302,86 +257,88 @@ class DbBsddbRead(DbReadBase, Callback):
"""
DbReadBase.__init__(self)
Callback.__init__(self)
self._tables['Person'].update(
{
self._tables = {
'Person':
{
"handle_func": self.get_person_from_handle,
"gramps_id_func": self.get_person_from_gramps_id,
"class_func": Person,
"cursor_func": self.get_person_cursor,
"handles_func": self.get_person_handles,
})
self._tables['Family'].update(
{
},
'Family':
{
"handle_func": self.get_family_from_handle,
"gramps_id_func": self.get_family_from_gramps_id,
"class_func": Family,
"cursor_func": self.get_family_cursor,
"handles_func": self.get_family_handles,
})
self._tables['Source'].update(
{
},
'Source':
{
"handle_func": self.get_source_from_handle,
"gramps_id_func": self.get_source_from_gramps_id,
"class_func": Source,
"cursor_func": self.get_source_cursor,
"handles_func": self.get_source_handles,
})
self._tables['Citation'].update(
{
},
'Citation':
{
"handle_func": self.get_citation_from_handle,
"gramps_id_func": self.get_citation_from_gramps_id,
"class_func": Citation,
"cursor_func": self.get_citation_cursor,
"handles_func": self.get_citation_handles,
})
self._tables['Event'].update(
{
},
'Event':
{
"handle_func": self.get_event_from_handle,
"gramps_id_func": self.get_event_from_gramps_id,
"class_func": Event,
"cursor_func": self.get_event_cursor,
"handles_func": self.get_event_handles,
})
self._tables['Media'].update(
{
},
'Media':
{
"handle_func": self.get_object_from_handle,
"gramps_id_func": self.get_object_from_gramps_id,
"class_func": MediaObject,
"cursor_func": self.get_media_cursor,
"handles_func": self.get_media_object_handles,
})
self._tables['Place'].update(
{
},
'Place':
{
"handle_func": self.get_place_from_handle,
"gramps_id_func": self.get_place_from_gramps_id,
"class_func": Place,
"cursor_func": self.get_place_cursor,
"handles_func": self.get_place_handles,
})
self._tables['Repository'].update(
{
},
'Repository':
{
"handle_func": self.get_repository_from_handle,
"gramps_id_func": self.get_repository_from_gramps_id,
"class_func": Repository,
"cursor_func": self.get_repository_cursor,
"handles_func": self.get_repository_handles,
})
self._tables['Note'].update(
{
},
'Note':
{
"handle_func": self.get_note_from_handle,
"gramps_id_func": self.get_note_from_gramps_id,
"class_func": Note,
"cursor_func": self.get_note_cursor,
"handles_func": self.get_note_handles,
})
self._tables['Tag'].update(
{
},
'Tag':
{
"handle_func": self.get_tag_from_handle,
"gramps_id_func": None,
"class_func": Tag,
"cursor_func": self.get_tag_cursor,
"handles_func": self.get_tag_handles,
})
},
}
self.set_person_id_prefix('I%04d')
self.set_object_id_prefix('O%04d')
@@ -406,10 +363,10 @@ class DbBsddbRead(DbReadBase, Callback):
self.nmap_index = 0
self.db_is_open = False
self.event_names = set()
self.family_event_names = set()
self.individual_event_names = set()
self.individual_attributes = set()
self.family_attributes = set()
self.source_attributes = set()
self.child_ref_types = set()
self.family_rel_types = set()
self.event_role_names = set()
@@ -420,7 +377,6 @@ class DbBsddbRead(DbReadBase, Callback):
self.source_media_types = set()
self.url_types = set()
self.media_attributes = set()
self.place_types = set()
self.open = 0
self.genderStats = GenderStats()
@@ -522,10 +478,6 @@ class DbBsddbRead(DbReadBase, Callback):
def get_place_cursor(self, *args, **kwargs):
return self.get_cursor(self.place_map, *args, **kwargs)
def get_place_tree_cursor(self, *args, **kwargs):
return DbBsddbTreeCursor(self.parents, self.place_map, self.readonly,
self.txn)
def get_source_cursor(self, *args, **kwargs):
return self.get_cursor(self.source_map, *args, **kwargs)
@@ -609,7 +561,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_person_gramps_id(self):
"""
Return the next available Gramps ID for a Person object based off the
Return the next available GRAMPS' ID for a Person object based off the
person ID prefix.
"""
self.pmap_index, gid = self.__find_next_gramps_id(self.person_prefix,
@@ -618,7 +570,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_place_gramps_id(self):
"""
Return the next available Gramps ID for a Place object based off the
Return the next available GRAMPS' ID for a Place object based off the
place ID prefix.
"""
self.lmap_index, gid = self.__find_next_gramps_id(self.place_prefix,
@@ -627,7 +579,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_event_gramps_id(self):
"""
Return the next available Gramps ID for a Event object based off the
Return the next available GRAMPS' ID for a Event object based off the
event ID prefix.
"""
self.emap_index, gid = self.__find_next_gramps_id(self.event_prefix,
@@ -636,7 +588,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_object_gramps_id(self):
"""
Return the next available Gramps ID for a MediaObject object based
Return the next available GRAMPS' ID for a MediaObject object based
off the media object ID prefix.
"""
self.omap_index, gid = self.__find_next_gramps_id(self.mediaobject_prefix,
@@ -645,7 +597,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_source_gramps_id(self):
"""
Return the next available Gramps ID for a Source object based off the
Return the next available GRAMPS' ID for a Source object based off the
source ID prefix.
"""
self.smap_index, gid = self.__find_next_gramps_id(self.source_prefix,
@@ -654,7 +606,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_citation_gramps_id(self):
"""
Return the next available Gramps ID for a Source object based off the
Return the next available GRAMPS' ID for a Source object based off the
source ID prefix.
"""
self.cmap_index, gid = self.__find_next_gramps_id(self.citation_prefix,
@@ -663,7 +615,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_family_gramps_id(self):
"""
Return the next available Gramps ID for a Family object based off the
Return the next available GRAMPS' ID for a Family object based off the
family ID prefix.
"""
self.fmap_index, gid = self.__find_next_gramps_id(self.family_prefix,
@@ -672,7 +624,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_repository_gramps_id(self):
"""
Return the next available Gramps ID for a Respository object based
Return the next available GRAMPS' ID for a Respository object based
off the repository ID prefix.
"""
self.rmap_index, gid = self.__find_next_gramps_id(self.repository_prefix,
@@ -681,7 +633,7 @@ class DbBsddbRead(DbReadBase, Callback):
def find_next_note_gramps_id(self):
"""
Return the next available Gramps ID for a Note object based off the
Return the next available GRAMPS' ID for a Note object based off the
note ID prefix.
"""
self.nmap_index, gid = self.__find_next_gramps_id(self.note_prefix,
@@ -715,7 +667,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_from_name_and_gramps_id(self, table_name, gramps_id):
"""
Returns a gen.lib object (or None) given table_name and
Gramps ID.
gramps ID.
Examples:
@@ -834,7 +786,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_person_from_gramps_id(self, val):
"""
Find a Person in the database from the passed Gramps ID.
Find a Person in the database from the passed gramps' ID.
If no such Person exists, None is returned.
"""
@@ -843,7 +795,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_family_from_gramps_id(self, val):
"""
Find a Family in the database from the passed Gramps ID.
Find a Family in the database from the passed gramps' ID.
If no such Family exists, None is return.
"""
@@ -852,7 +804,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_event_from_gramps_id(self, val):
"""
Find an Event in the database from the passed Gramps ID.
Find an Event in the database from the passed gramps' ID.
If no such Family exists, None is returned.
"""
@@ -861,7 +813,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_place_from_gramps_id(self, val):
"""
Find a Place in the database from the passed Gramps ID.
Find a Place in the database from the passed gramps' ID.
If no such Place exists, None is returned.
"""
@@ -870,7 +822,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_source_from_gramps_id(self, val):
"""
Find a Source in the database from the passed Gramps ID.
Find a Source in the database from the passed gramps' ID.
If no such Source exists, None is returned.
"""
@@ -879,7 +831,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_citation_from_gramps_id(self, val):
"""
Find a Citation in the database from the passed Gramps ID.
Find a Citation in the database from the passed gramps' ID.
If no such Citation exists, None is returned.
"""
@@ -888,7 +840,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_object_from_gramps_id(self, val):
"""
Find a MediaObject in the database from the passed Gramps ID.
Find a MediaObject in the database from the passed gramps' ID.
If no such MediaObject exists, None is returned.
"""
@@ -897,7 +849,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_repository_from_gramps_id(self, val):
"""
Find a Repository in the database from the passed Gramps ID.
Find a Repository in the database from the passed gramps' ID.
If no such Repository exists, None is returned.
"""
@@ -906,7 +858,7 @@ class DbBsddbRead(DbReadBase, Callback):
def get_note_from_gramps_id(self, val):
"""
Find a Note in the database from the passed Gramps ID.
Find a Note in the database from the passed gramps' ID.
If no such Note exists, None is returned.
"""
@@ -1029,10 +981,9 @@ class DbBsddbRead(DbReadBase, Callback):
def all_handles(self, table):
""" return all the keys of a database table
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
return table.keys(txn=self.txn)
@@ -1043,9 +994,9 @@ class DbBsddbRead(DbReadBase, Callback):
If sort_handles is True, the list is sorted by surnames.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
handle_list = self.all_handles(self.person_map)
@@ -1061,9 +1012,9 @@ class DbBsddbRead(DbReadBase, Callback):
If sort_handles is True, the list is sorted by Place title.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
@@ -1080,9 +1031,9 @@ class DbBsddbRead(DbReadBase, Callback):
If sort_handles is True, the list is sorted by Source title.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
handle_list = self.all_handles(self.source_map)
@@ -1098,9 +1049,9 @@ class DbBsddbRead(DbReadBase, Callback):
If sort_handles is True, the list is sorted by Citation Volume/Page.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
handle_list = self.all_handles(self.citation_map)
@@ -1116,9 +1067,9 @@ class DbBsddbRead(DbReadBase, Callback):
If sort_handles is True, the list is sorted by title.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
handle_list = self.all_handles(self.media_map)
@@ -1132,9 +1083,9 @@ class DbBsddbRead(DbReadBase, Callback):
Return a list of database handles, one handle for each Event in the
database.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
return self.all_handles(self.event_map)
@@ -1145,9 +1096,9 @@ class DbBsddbRead(DbReadBase, Callback):
Return a list of database handles, one handle for each Family in
the database.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
return self.all_handles(self.family_map)
@@ -1158,9 +1109,9 @@ class DbBsddbRead(DbReadBase, Callback):
Return a list of database handles, one handle for each Repository in
the database.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
return self.all_handles(self.repository_map)
@@ -1171,9 +1122,9 @@ class DbBsddbRead(DbReadBase, Callback):
Return a list of database handles, one handle for each Note in the
database.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
return self.all_handles(self.note_map)
@@ -1186,9 +1137,9 @@ class DbBsddbRead(DbReadBase, Callback):
If sort_handles is True, the list is sorted by Tag name.
.. warning:: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
CAREFUL: For speed the keys are directly returned, so on python3
bytestrings are returned! Use constfunc.py handle2internal
on this result!
"""
if self.db_is_open:
handle_list = self.all_handles(self.tag_map)
@@ -1339,7 +1290,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_person_id_prefix(self, val):
"""
Set the naming template for Gramps Person ID values.
Set the naming template for GRAMPS Person ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1350,7 +1301,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_source_id_prefix(self, val):
"""
Set the naming template for Gramps Source ID values.
Set the naming template for GRAMPS Source ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1361,7 +1312,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_citation_id_prefix(self, val):
"""
Set the naming template for Gramps Citation ID values.
Set the naming template for GRAMPS Citation ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1372,7 +1323,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_object_id_prefix(self, val):
"""
Set the naming template for Gramps MediaObject ID values.
Set the naming template for GRAMPS MediaObject ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1383,7 +1334,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_place_id_prefix(self, val):
"""
Set the naming template for Gramps Place ID values.
Set the naming template for GRAMPS Place ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1394,7 +1345,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_family_id_prefix(self, val):
"""
Set the naming template for Gramps Family ID values. The string is
Set the naming template for GRAMPS Family ID values. The string is
expected to be in the form of a simple text string, or in a format
that contains a C/Python style format string using %d, such as F%d
or F%04d.
@@ -1404,7 +1355,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_event_id_prefix(self, val):
"""
Set the naming template for Gramps Event ID values.
Set the naming template for GRAMPS Event ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1415,7 +1366,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_repository_id_prefix(self, val):
"""
Set the naming template for Gramps Repository ID values.
Set the naming template for GRAMPS Repository ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1426,7 +1377,7 @@ class DbBsddbRead(DbReadBase, Callback):
def set_note_id_prefix(self, val):
"""
Set the naming template for Gramps Note ID values.
Set the naming template for GRAMPS Note ID values.
The string is expected to be in the form of a simple text string, or
in a format that contains a C/Python style format string using %d,
@@ -1531,24 +1482,12 @@ class DbBsddbRead(DbReadBase, Callback):
"""Set the save path for the database."""
self.path = path
def get_event_attribute_types(self):
"""
Return a list of all Attribute types assocated with Event instances
in the database.
"""
return list(self.event_attributes)
def get_event_types(self):
"""
Return a list of all event types in the database.
"""
return list(self.event_names)
def get_person_event_types(self):
"""
Deprecated: Use get_event_types
Return a list of all Event types assocated with Person instances in
the database.
"""
return list(self.event_names)
return list(self.individual_event_names)
def get_person_attribute_types(self):
"""
@@ -1566,9 +1505,10 @@ class DbBsddbRead(DbReadBase, Callback):
def get_family_event_types(self):
"""
Deprecated: Use get_event_types
Return a list of all Event types assocated with Family instances in
the database.
"""
return list(self.event_names)
return list(self.family_event_names)
def get_media_attribute_types(self):
"""
@@ -1626,13 +1566,6 @@ class DbBsddbRead(DbReadBase, Callback):
"""
return list(self.note_types)
def get_source_attribute_types(self):
"""
Return a list of all Attribute types assocated with Source/Citation
instances in the database.
"""
return list(self.source_attributes)
def get_source_media_types(self):
"""
Return a list of all custom source media types assocated with Source
@@ -1647,13 +1580,6 @@ class DbBsddbRead(DbReadBase, Callback):
"""
return list(self.url_types)
def get_place_types(self):
"""
Return a list of all custom place types assocated with Place instances
in the database.
"""
return list(self.place_types)
def __log_error(self):
pass
@@ -1667,6 +1593,10 @@ class DbBsddbRead(DbReadBase, Callback):
handle = handle.encode('utf-8')
try:
return table.get(handle, txn=self.txn)
except UnicodeDecodeError:
#we need to assume we opened data in python3 saved in python2
raw = table.db.get(handle, txn=self.txn)
return pickle.loads(raw, encoding='utf-8')
except DBERRS as msg:
self.__log_error()
raise DbError(msg)
+3 -52
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
import unittest
import os
import sys
@@ -31,8 +33,6 @@ if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
else:
from bsddb import dbshelve, db
from ..read import DbBsddbTreeCursor
class Data(object):
def __init__(self, handle,surname, name):
@@ -78,7 +78,6 @@ class CursorTest(unittest.TestCase):
os.mkdir(env_name)
self.env.open(env_name,env_flags)
(self.person_map,self.surnames) = self._open_tables()
(self.place_map, self.placerefs) = self._open_treetables()
def _open_tables(self):
dbmap = dbshelve.DBShelf(self.env)
@@ -103,36 +102,10 @@ class CursorTest(unittest.TestCase):
person_map.associate(surnames, find_surname, table_flags)
return (person_map,surnames)
def _open_treetables(self):
dbmap = dbshelve.DBShelf(self.env)
dbmap.db.set_pagesize(16384)
dbmap.open(self.full_name, 'places', db.DB_HASH,
db.DB_CREATE|db.DB_AUTO_COMMIT, 0o666)
place_map = dbmap
table_flags = db.DB_CREATE|db.DB_AUTO_COMMIT
placerefs = db.DB(self.env)
placerefs.set_flags(db.DB_DUP|db.DB_DUPSORT)
placerefs.open(self.full_name, "placerefs", db.DB_BTREE,
flags=table_flags)
def find_placeref(key,data):
val = data[2]
if isinstance(val, UNITYPE):
val = val.encode('utf-8')
return val
place_map.associate(placerefs, find_placeref, table_flags)
return (place_map, placerefs)
def tearDown(self):
self.person_map.close()
self.surnames.close()
self.place_map.close()
self.placerefs.close()
self.env.close()
shutil.rmtree(self._tmpdir)
@@ -212,29 +185,7 @@ class CursorTest(unittest.TestCase):
self.assertEqual(v.handle, data.handle)
def test_treecursor(self):
#fill with data
the_txn = self.env.txn_begin()
data = [(b'1', 'countryA', '' ),
(b'2', 'localityA', '1' ),
(b'3', 'localityB', '1' ),
(b'4', 'countryB', '' ),
(b'5', 'streetA', '2' ),
(b'6', 'countryB', '' )]
for d in data:
self.place_map.put(d[0], d, txn=the_txn)
the_txn.commit()
cursor_txn = self.env.txn_begin()
cursor = DbBsddbTreeCursor(self.placerefs, self.place_map, False,
cursor_txn)
placenames = set([d[1] for handle, d in cursor])
cursor.close()
cursor_txn.commit()
pldata = set([d[1] for d in data])
self.assertEqual(placenames, pldata)
def testSuite():
suite = unittest.makeSuite(CursorTest, 'test')
return suite
+8 -2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
import unittest
from .. import DbReadBase, DbWriteBase, DbBsddbRead, DbBsddb
@@ -43,17 +45,16 @@ class DbTest(unittest.TestCase):
"get_child_reference_types",
"get_default_handle",
"get_default_person",
"get_event_attribute_types",
"get_event_bookmarks",
"get_event_cursor",
"get_event_from_gramps_id",
"get_event_from_handle",
"get_event_handles",
"get_event_roles",
"get_event_types",
"get_family_attribute_types",
"get_family_bookmarks",
"get_family_cursor",
"get_family_event_types",
"get_family_from_gramps_id",
"get_family_from_handle",
"get_family_handles",
@@ -87,6 +88,7 @@ class DbTest(unittest.TestCase):
"get_object_from_handle",
"get_person_attribute_types",
"get_person_cursor",
"get_person_event_types",
"get_person_from_gramps_id",
"get_person_from_handle",
"get_person_handles",
@@ -183,9 +185,11 @@ class DbTest(unittest.TestCase):
WRITE_METHODS = [
"add_event",
"add_family",
"add_family_event",
"add_note",
"add_object",
"add_person",
"add_person_event",
"add_place",
"add_repository",
"add_source",
@@ -195,9 +199,11 @@ class DbTest(unittest.TestCase):
"commit_base",
"commit_event",
"commit_family",
"commit_family_event",
"commit_media_object",
"commit_note",
"commit_person",
"commit_personal_event",
"commit_place",
"commit_repository",
"commit_source",
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
from __future__ import print_function
import unittest
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
import unittest
import logging
import time
+2
View File
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
"""
Exports the DbTxn class for managing Gramps transactions and the undo
database.

Some files were not shown because too many files have changed in this diff Show More