Compare commits

..

403 Commits

Author SHA1 Message Date
Stéphane Charette e035fe57e6 update for 3.2.4 release
svn: r15963
2010-10-10 22:55:05 +00:00
Stéphane Charette 985e42abe2 updated gramps.pot
svn: r15960
2010-10-10 14:05:43 +00:00
Peter Landgren 8bd6a16cf0 Some conversions are not needed for gramps on win with non latin username.
svn: r15958
2010-10-08 13:53:49 +00:00
Peter Landgren 16f468654a Minor update of Swedish translation, took trunk, should be bransch.
svn: r15956
2010-10-06 14:16:54 +00:00
Peter Landgren 6aef60a421 Updates to allow for Family Tree names, with non latin characters in Windows, in -l/-L commands.
svn: r15942
2010-09-30 14:25:25 +00:00
Peter Landgren ec50af2785 Final fix of 4164, problems with cairo: out of memory for mult pages in Grapviz output.
svn: r15940
2010-09-30 13:04:32 +00:00
Peter Landgren c0f2ed96b2 Updates to allow for user names with non latin characters in Windows.
svn: r15939
2010-09-30 10:02:41 +00:00
Jérôme Rapinat 8b7e7aed4e minor clean-up
svn: r15936
2010-09-29 14:43:51 +00:00
Jérôme Rapinat c5e1ee690d bugs 2488 and 4251: spacing on families
svn: r15935
2010-09-28 16:54:07 +00:00
Peter Landgren f08d4825e7 Minor update of Swedish translation.
svn: r15933
2010-09-27 18:03:56 +00:00
Peter Landgren c414e34ceb Consistent use of OS detection and host added to Win users.
svn: r15931
2010-09-27 17:53:57 +00:00
Doug Blank 3fb1e0fd4a Two more fixes for protecting None.property when using Do Not Include Unlinked records
svn: r15929
2010-09-25 11:00:25 +00:00
Jérôme Rapinat ae8ba555eb 4241: ignore Residence events on Addresse page for non-english locales
svn: r15925
2010-09-24 14:37:07 +00:00
Benny Malengier 479e70f835 3969: [NarWeb] Narrated Web Site: Newlines and white space are not preserved in note text
Patch of Tim Lyons and  Benny Malengier


svn: r15922
2010-09-23 21:03:02 +00:00
Jérôme Rapinat c796db53c5 #4242: NarWeb ignores Calendar for sorting Dates on Event groups
svn: r15919
2010-09-21 14:32:10 +00:00
Nick Hall 84898abaaf 4250: Bookmark menu does not redraw when bookmarks are re-ordered
svn: r15916
2010-09-20 23:47:06 +00:00
Espen Berg 2f983fade2 Revised Norwegian bokmål and nynorsk (Sigmund Lorentzen) translations
svn: r15915
2010-09-19 17:59:36 +00:00
Jérôme Rapinat f6a8fd888a typo
svn: r15908
2010-09-16 18:06:42 +00:00
Peter Landgren 1c1da5a8ea Issue 4235.
svn: r15906
2010-09-16 12:36:59 +00:00
Peter Landgren 4679718cc2 Fixed indent errors.
svn: r15904
2010-09-16 12:30:14 +00:00
Peter Landgren a52072d79e Issue 4212, Win problems with media path/file name with non latin.
svn: r15903
2010-09-16 12:23:16 +00:00
Doug Blank c8a48b4b0e 4203: [NarWeb] 'Exclude living' option can lead to error
svn: r15898
2010-09-13 23:57:05 +00:00
Rob G. Healey f479381bfd NarrativeWeb: bug#4079 -- siblings, pedigree, and children are all sorted if birthorder option is chosen.
svn: r15897
2010-09-13 22:14:02 +00:00
Benny Malengier 33de80e6fd 3519: Wrong 'Group as' value (Given instead of Surname) is used for custom display name
svn: r15895
2010-09-13 19:55:13 +00:00
Benny Malengier 46c9eb079c 4192: [NarWeb] media is out of order in Places
svn: r15894
2010-09-13 19:22:54 +00:00
Benny Malengier 1df64c2609 4192: [NarWeb] media is out of order in Places
svn: r15892
2010-09-13 18:55:20 +00:00
Benny Malengier 9aa00be403 3875: [NarWeb] no more caption text for images in Source gallery
svn: r15891
2010-09-13 18:11:21 +00:00
Julio Sánchez 3096db842c Minor translation update
svn: r15889
2010-09-13 11:15:06 +00:00
Benny Malengier 86474a1cf6 3870: [NarWeb] Reference name to Source incorrectly displayed as "unknown"
svn: r15887
2010-09-13 09:34:49 +00:00
Julio Sánchez fa246bc681 Minor translation update
svn: r15886
2010-09-13 06:03:19 +00:00
Erik De Richter 546e39d530 updated nl translation
svn: r15880
2010-09-12 09:31:29 +00:00
Jérôme Rapinat 3b24bfc971 update Slovak translation (by Lubo Vasko)
svn: r15879
2010-09-12 08:48:36 +00:00
Benny Malengier 3e6fa30d60 3944: [NarWeb] Alternate Locations on places site in web report vers. 3.2.2
svn: r15875
2010-09-11 15:17:04 +00:00
Benny Malengier c1137c79e5 3894: [NarWeb] Narrated Website does not show Gramps-ID for sources and events
svn: r15874
2010-09-11 11:35:38 +00:00
Doug Blank e7749890f7 Typo, but only when self._LOG_ALL flag is set, which I don't know how to set
svn: r15873
2010-09-11 06:53:57 +00:00
Rob G. Healey 8a03b75b27 Stylesheet: Fixed text color on WebCal. Could not see non hyperlinked text.
svn: r15872
2010-09-11 03:12:42 +00:00
Arturas Sleinius bf9a7efe37 Updated Lithuanian translation
svn: r15871
2010-09-10 09:00:23 +00:00
Boril Gourinov 4e4a95926a Update of Bulgarian translation
svn: r15870
2010-09-09 20:08:45 +00:00
Mirko Leonhäuser 09069234d4 updated german translation
svn: r15869
2010-09-09 19:12:17 +00:00
Jérôme Rapinat 2cba6ed51c update french translation
svn: r15867
2010-09-09 17:26:29 +00:00
Peter Landgren ab0ed284f1 Swedish translation update.
svn: r15863
2010-09-09 14:17:56 +00:00
Peter Landgren 8b24f681cb Two strings made translatable.
svn: r15862
2010-09-09 14:16:42 +00:00
Benny Malengier 1ac68fb63d 0004131: [NarWeb] No clickable link in referenced region in the photo, if person has no name
svn: r15861
2010-09-09 11:15:33 +00:00
Peter Landgren 531f089f10 Issue 3960, warn button disappears too soon on long GEDCOM import with errors.
svn: r15858
2010-09-06 15:18:28 +00:00
Benny Malengier aff081d139 4196: Error by using special filter in person view
svn: r15856
2010-09-03 22:56:33 +00:00
Rob G. Healey 4f821bc75c Style Sheets: There has been so many problems with the Ancestors Tree, I have removed the elements from the individual sheets, and create one sheet instead.
svn: r15854
2010-09-03 00:44:18 +00:00
Rob G. Healey 6eb47e400c Nebraska: fixed a footer background color issue.
svn: r15853
2010-09-03 00:05:45 +00:00
Rob G. Healey 80a748109a Stylesheets: I hope that these style sheet corrections will correct the layout and style problems that have been plaquing NarrativeWeb. If you have any problems, please let me know.
svn: r15852
2010-09-02 23:55:27 +00:00
Benny Malengier 140ce8077d 2953: wrong handling of gramps id's on individual report. I44 and I440 I441 etc are all included when only I44 should be
svn: r15850
2010-09-02 21:03:53 +00:00
Rob G. Healey 81aaf690f3 NarWeb: Fixed siblings not displaying in birth year order; Bug#4079. Thanks kulath for the patch file.
svn: r15847
2010-09-01 21:12:23 +00:00
Peter Landgren 65ac980dae Date part of issue 4160. Use of option Use full dates instead of full year works again.
svn: r15846
2010-09-01 16:18:06 +00:00
Peter Landgren 6bb686ec2d Date part of issue 4160. Use of option Use full dates instead of full year works again.
svn: r15845
2010-09-01 16:17:36 +00:00
Rob G. Healey 0894288476 Stylesheet: Fixed the overrun of colors.
svn: r15842
2010-08-31 16:50:09 +00:00
Benny Malengier 8cf2831c51 bug #2402 : Line spacing for text not correct in CairoDoc
svn: r15838
2010-08-31 07:45:44 +00:00
Gerald Britton e52db3c15d Bug 0003785: Unhandled exception - Undo History - ValueError: invalid tree path
svn: r15833
2010-08-30 16:37:20 +00:00
Rob G. Healey 8edf5690a4 NarrativeWeb: Bug fix for #4203.
svn: r15827
2010-08-29 03:39:43 +00:00
Luigi Toscano 37697f48a0 Translation updates.
svn: r15826
2010-08-28 18:42:09 +00:00
Erik De Richter 9c15d167b4 updated nl translation
svn: r15823
2010-08-27 07:00:23 +00:00
Rob G. Healey bf4295b5b3 Web_Mainz.css: Fixed problem with the backgrounds not showing as they were intended. Thanks Jason Simanek.
svn: r15822
2010-08-26 23:08:26 +00:00
Doug Blank 1eb50ff295 Removed yields while cursor is open
svn: r15814
2010-08-25 04:25:08 +00:00
Jérôme Rapinat 0698a42f8e Update french translation
svn: r15809
2010-08-23 16:09:17 +00:00
Doug Blank b3929af419 Fixes to allow log cleanup
svn: r15803
2010-08-22 16:12:05 +00:00
Doug Blank 32f9ff1863 4190: Gedcom import: All my internet addresses are missing...
svn: r15797
2010-08-22 13:38:31 +00:00
Doug Blank 777c929f88 4180: Error occurred while attempting to EXPORT a GEDCOM file
svn: r15792
2010-08-22 02:08:29 +00:00
Doug Blank e39dedb453 4187: Error on GEDCOM file import
svn: r15791
2010-08-22 01:50:58 +00:00
Benny Malengier fc3ed649f1 better fix for #4166, #3955
svn: r15770
2010-08-18 21:15:49 +00:00
Jérôme Rapinat dce76ae6fe update Slovenian translation (by Bernard Banko) - What about date and rel handlers (rev15752)?
svn: r15753
2010-08-16 12:27:54 +00:00
Benny Malengier 285c5e429c 4166: Export Assistant crashes when closing or cancelling using the mouse
svn: r15739
2010-08-15 12:00:46 +00:00
Peter Landgren 724e09dfc9 Issue 4164, correction.
svn: r15722
2010-08-13 11:21:10 +00:00
Peter Landgren c09f8e4950 Issue 4164, Graphviz version=2.26.3
svn: r15716
2010-08-12 18:03:21 +00:00
Peter Landgren 4bbc5c08f3 Issue 4162, correction of box width.
svn: r15703
2010-08-11 07:02:14 +00:00
Peter Landgren a31d95bd28 Found some untranlated strings.
svn: r15695
2010-08-09 18:01:11 +00:00
Doug Blank 02dc2ce868 Name Format strings can have XML in them; now escaped- prevented valid XML from being written
svn: r15692
2010-08-09 13:17:38 +00:00
Nick Hall 3d19491f40 Sort by "surname" instead of "group as" in flat person view
svn: r15686
2010-08-08 18:33:21 +00:00
Espen Berg c7d490f469 Revised Norwegian bokmål
svn: r15676
2010-08-01 18:38:55 +00:00
Jérôme Rapinat 4690a03256 4089: 5 caracters for short months
svn: r15661
2010-07-29 08:50:10 +00:00
Jérôme Rapinat a35db4f70a 3526:Documentation for relationship module
svn: r15660
2010-07-29 08:24:05 +00:00
Jérôme Rapinat 42f5c62154 4089: Month names for Finnish (validated by Peter)
svn: r15640
2010-07-20 12:40:38 +00:00
Rob G. Healey 7e456e996c NarrativeWeb: Fix for bug #4098. Place name not retrurning proper answer.
svn: r15628
2010-07-08 22:56:11 +00:00
Nick Hall e0b02e80af Fix marker colours in Family and Note views
svn: r15614
2010-07-03 18:20:38 +00:00
Peter Landgren 51a9075613 Some unnecessary unicode conversion cleanup after fix of issue 4078.
svn: r15609
2010-06-30 07:37:55 +00:00
Peter Landgren 51abf16ddb Some unnecessary unicode conversion cleanup after fix of issue 4078.
svn: r15608
2010-06-30 07:37:09 +00:00
Peter Landgren 945f6e5b9f Some unnecessary unicode conversion cleanup after fix of issue 4078.
svn: r15607
2010-06-30 07:36:11 +00:00
Peter Landgren e7edfbdc0a Fix of issue 4078, note.get() unicode now.
svn: r15596
2010-06-28 07:28:16 +00:00
Peter Landgren 3e81d9dd88 Fix of issue 4078, note.get() unicode now.
svn: r15595
2010-06-28 07:27:24 +00:00
Peter Landgren cfbb494612 Issue 4078, notes not in utf-8.
svn: r15592
2010-06-24 07:49:14 +00:00
Nick Hall 52d5fbd042 Change sort order from D.D8 to ISO-DMS
svn: r15582
2010-06-19 23:43:59 +00:00
Nick Hall f0e156a112 4076: Fix sort order when different latitude/longitude formats are used
svn: r15580
2010-06-19 17:39:56 +00:00
Espen Berg 839b2ee4de Revised Norwegian bokmål translation
svn: r15573
2010-06-15 21:02:02 +00:00
Espen Berg 4beb29464a Revised Norwegian Nynorsk translation, by Sigmund Lorentsen
svn: r15572
2010-06-15 21:00:16 +00:00
Espen Berg c3ffffd943 Revised Norwegian bokmål translation
svn: r15571
2010-06-15 20:59:25 +00:00
Peter Landgren 15fc4fdf0f Fix of 4071 so that substitutioins variables /%N, /%s, /%S follow the spec in the manual.
svn: r15568
2010-06-15 06:32:41 +00:00
Mirko Leonhäuser 90c1f95ac5 Updated German translation
svn: r15564
2010-06-13 13:16:31 +00:00
Doug Blank 713344f2f8 Use Today for living filter date, and use basedb for determining living status
svn: r15556
2010-06-11 00:39:15 +00:00
Doug Blank 1f17db49c2 Removed some subtle checks in probably_alive to make more protective when restricting on alive status
svn: r15555
2010-06-11 00:36:49 +00:00
Peter Landgren 9e40603988 Fix of issue 4059, event type begins with non latin char.
svn: r15549
2010-06-09 20:59:16 +00:00
Peter Landgren 44f970baa8 Fix of issue 4058, list index out of range.
svn: r15548
2010-06-09 20:30:20 +00:00
Serge Noiraud dceb900362 Open Document : Issue 4018 and 4017 : random page break + top and bottom margin for paragraphs.
svn: r15543
2010-06-08 18:39:45 +00:00
Mirko Leonhäuser 1110c18ae1 Updated German translation
svn: r15537
2010-06-07 00:03:58 +00:00
Peter Landgren e3f9f97864 Fixed coding error when looking at issue 4034.
svn: r15534
2010-06-06 17:15:53 +00:00
Igal Shapira 10bd447ed5 Add 200 more hebrew translations.
svn: r15531
2010-06-05 09:28:40 +00:00
Jérôme Rapinat bc9cdd3896 #4044 #2855 #2762 fix on half relations (contribution by reinhard)
svn: r15529
2010-06-05 06:25:46 +00:00
Doug Blank a36690aa26 4036: svn15488 de.po from Branch crashes
svn: r15515
2010-05-30 14:43:08 +00:00
Peter Landgren 1db7cd2051 Final fix of issue 3935, coding problem in Windows.
svn: r15492
2010-05-28 13:18:48 +00:00
Mirko Leonhäuser 2ff12bdbcf Updated German translation
svn: r15488
2010-05-27 17:29:32 +00:00
Peter Landgren 904cb8cf16 Added info about DB version.
svn: r15486
2010-05-27 11:01:20 +00:00
Doug Blank d0d8fd4af1 4015: Addition of option of 'Page Break before Endnotes' on DDR and DAR reports
svn: r15483
2010-05-25 21:23:33 +00:00
Doug Blank 102189d77a 4012: Improvement for "What's next" report
svn: r15478
2010-05-25 13:20:33 +00:00
Doug Blank bbaec4b5ed 4012: Improvement for "What's next" report
svn: r15476
2010-05-25 10:08:51 +00:00
Rob G. Healey 2cfa9299d4 Adjusted the menus to have a little bigger font.
svn: r15474
2010-05-25 05:59:18 +00:00
Rob G. Healey 515b9525dd Bug#3932: Fixed events doubling up in class EventListPage.
svn: r15473
2010-05-25 05:57:18 +00:00
Doug Blank a393d793fc 4004, 3983, 3861, 3758: initialize_options missing argument
svn: r15468
2010-05-24 01:41:21 +00:00
Rob G. Healey aa8e6754c5 Bug#4005: Fixes the marriage/ divorce issue in anniversaries.
svn: r15450
2010-05-23 04:24:49 +00:00
Rob G. Healey bd937a1842 Bug#4001; Text in WebCal of birthday and anniversaries were being doubled up. Thanks Doug S. Blank for the patch.
svn: r15449
2010-05-23 04:06:16 +00:00
Serge Noiraud a40d4c4482 GeoView : bug #4002 console message: undefined @1: ReferenceError: Can't find variable: addcrosshair
svn: r15447
2010-05-22 07:39:22 +00:00
Rob G. Healey 7376843595 #3992: Fixed missing menus elements in stylesheet if using Web_Basic-Blue.css or Web_Visually.css. Menu elements were removed so that the user could choose between horizontal or Vertical menus.
svn: r15445
2010-05-21 23:51:51 +00:00
Rob G. Healey 8a40eeafe6 #3989: Fixed the problem of showing primary person twice in family events.
svn: r15444
2010-05-21 22:56:27 +00:00
Peter Landgren 42138f0c2e Added version info about the database.
svn: r15440
2010-05-21 14:16:13 +00:00
Igal Shapira bdfce6bf1b Updated he.po with 5 more percents - total 62.78% PO covarge
svn: r15437
2010-05-21 11:48:20 +00:00
Peter Landgren 8b463b8aae Fixed problem with non unicode path name.
svn: r15435
2010-05-21 06:23:53 +00:00
Serge Noiraud 2d8dab099b GeoView : bug #3973 ignore buttons_have_icons which avoid set_image() to change the image of a button.
gnome => 2.26 now set this to false


svn: r15432
2010-05-20 20:58:44 +00:00
Rob G. Healey 5cba134809 Fixed bug #3988; ColumnPerson on EventPages is blackened out.
svn: r15431
2010-05-20 20:56:44 +00:00
Stéphane Charette 1f41eddfea bump version number to 3.2.4
svn: r15423
2010-05-17 05:51:39 +00:00
Stéphane Charette 38c9e2800c update for 3.2.3 release
svn: r15419
2010-05-17 05:29:02 +00:00
Jérôme Rapinat eea4d3e0c9 update month names (by Łukasz Rymarczyk)
svn: r15417
2010-05-16 15:48:00 +00:00
Mirko Leonhäuser 4442a74690 Updated german translation
svn: r15415
2010-05-16 12:16:51 +00:00
Julio Sánchez 5688c351f1 Update
svn: r15414
2010-05-16 07:02:12 +00:00
Jérôme Rapinat cbc5b831b7 improvement on short sentences (narrative)
svn: r15413
2010-05-15 07:49:18 +00:00
Jérôme Rapinat c69eba2e4e typo (thanks to Bruno Coudoin)
svn: r15412
2010-05-15 07:36:16 +00:00
Nick Hall 9c6d5ea86b 3970: Append space to paragraph leader in ascii docgen
svn: r15408
2010-05-13 18:45:46 +00:00
Igal Shapira d323b5013f Adding he translations and also some previous typos fixes
svn: r15407
2010-05-13 18:17:04 +00:00
Jérôme Rapinat 953a0ac8b5 update Slovak translation (by Lubo Vasko)
svn: r15405
2010-05-13 17:46:37 +00:00
Doug Blank 1019617d0f 3958: Extremely slow gedcom import
svn: r15399
2010-05-13 11:07:38 +00:00
Jérôme Rapinat 6c1b155953 Removed some commented lines
svn: r15395
2010-05-12 17:16:32 +00:00
Erik De Richter 6a1d059e53 update nl translation
svn: r15394
2010-05-12 16:05:26 +00:00
Espen Berg 5f318a93b3 Removed some commented lines in Norwegian translation
svn: r15393
2010-05-12 08:22:58 +00:00
Stéphane Charette 03e1ef85fc update pot to get ready for 3.2.3
svn: r15387
2010-05-11 20:44:44 +00:00
Jérôme Rapinat b931b9aa9b update Polish translation (by Łukasz Rymarczyk)
svn: r15385
2010-05-11 17:33:41 +00:00
Doug Blank ff0cf470c5 svn ignore some gramps-connect files
svn: r15384
2010-05-10 00:22:25 +00:00
Doug Blank 18cebd92dd 3878: Private option and filter on Exporter
svn: r15382
2010-05-09 23:59:22 +00:00
Doug Blank 3430c34988 Protection from crashing on unknown (new) markup
svn: r15381
2010-05-09 23:51:29 +00:00
Espen Berg 380490c6a2 merged 15378 from trunk. issues 3915, 3950 and 3951 (and perhaps some more?) due to a change in pygtk appears to be fixed with this patch.
svn: r15379
2010-05-09 18:49:15 +00:00
Jérôme Rapinat 4a25ab7a25 minor improvement on unit test
svn: r15376
2010-05-09 16:44:13 +00:00
Doug Blank 8812e82f49 3943: Crashed whilst exporting to data.gramps using a person filter 'Public'; fixed many filter rules for people
svn: r15375
2010-05-09 15:19:07 +00:00
Doug Blank 96471a964b 3943: Crashed whilst exporting to data.gramps using a person filter 'Public'; fixed many filter rules for people
svn: r15373
2010-05-09 15:09:05 +00:00
Doug Blank 29ff7a386b 3640: Truncated FILE media path on Gedcom export; extended line for file to 255 characters
svn: r15371
2010-05-09 13:55:15 +00:00
Doug Blank 2c7e58e187 3943: Crashed whilst exporting to data.gramps using a person filter 'Public'; fixed many filter rules for people
svn: r15368
2010-05-09 13:42:33 +00:00
Doug Blank 1ff33d6377 3640: Truncated FILE media path on Gedcom export; extended line for file to 255 characters
svn: r15367
2010-05-09 12:57:33 +00:00
Peter Landgren 5ff5769845 Fix of issue 3935. Wrong encoding in Windows.
svn: r15359
2010-05-08 14:29:16 +00:00
Doug Blank 997cd04fe2 Fixing issues with get_privacy on non-existent objects which were probably filted out by a living proxy
svn: r15353
2010-05-07 23:45:28 +00:00
Jérôme Rapinat 45be6866ad #3936: months not localized (by maple)
svn: r15341
2010-05-06 18:39:01 +00:00
Boril Gourinov a5ac1da9fd Update of Bulgarian translation
svn: r15339
2010-05-06 15:38:27 +00:00
Peter Landgren d67271a2cf Fixed two minor spelling issues.
svn: r15335
2010-05-06 06:45:19 +00:00
Doug Blank 2fb7a5e048 3896: Narrated web fail: display_additional_images_as_gallery, not in list
svn: r15334
2010-05-06 04:46:28 +00:00
Doug Blank 5f69c64971 Ignore (and remove) style tags this version of gramps doesn't know about, rather than crash
svn: r15331
2010-05-05 23:15:22 +00:00
Jérôme Rapinat 602aa8c1bd #3918: months not localized (by jcreus)
svn: r15329
2010-05-05 16:51:29 +00:00
Doug Blank 0c270f4862 3911: Crash because of syntax error in name format; fixed having to escape double-quotes, and removed them if empty
svn: r15324
2010-05-05 03:56:18 +00:00
Peter Landgren 053efc5f75 Deleted test string.
svn: r15318
2010-05-04 11:57:12 +00:00
Peter Landgren ff705565a4 Issue 3915, error in error message.
svn: r15316
2010-05-04 11:53:48 +00:00
Peter Landgren b41598c645 Issue 3904, dirname and filename swapped.
svn: r15315
2010-05-04 11:51:59 +00:00
Jason Simanek b1d2ca5dc4 bug #0003908: fixed NarWeb footer height problem
svn: r15304
2010-05-03 12:17:47 +00:00
Doug Blank 4a8414e5c8 Protect views with no histories
svn: r15301
2010-05-02 13:48:49 +00:00
Doug Blank 6bfe45f079 3900: Export to Gedcom
svn: r15296
2010-05-01 18:38:13 +00:00
Doug Blank 38d8332970 Two fixes to address issues with living proxy and GEDCOM export
svn: r15295
2010-05-01 14:29:52 +00:00
Joan Creus 97eff89616 Updating Catalan translation
svn: r15291
2010-04-25 14:38:33 +00:00
Stéphane Charette 2ae3583c3a bump version to 3.2.3; remove libgconf as a build dependency
svn: r15288
2010-04-25 07:57:05 +00:00
Stéphane Charette 612b1889d8 update for 3.2.2 release
svn: r15284
2010-04-25 07:35:35 +00:00
Josip Pisoj 07e2fc2dd4 translation update
svn: r15282
2010-04-25 01:16:01 +00:00
Doug Blank 76ced42747 3877: 'alive' and incomplet date
svn: r15279
2010-04-24 18:58:56 +00:00
Luigi Toscano e06ba873f3 Translation updates.
svn: r15278
2010-04-24 11:04:09 +00:00
Gerald Britton db67f8de2a Bug 3873: Narrative web site crashes when both living and private filters are active
svn: r15276
2010-04-23 18:40:27 +00:00
Doug Blank 32d363fb7f bump next version string to 3.2.2
svn: r15275
2010-04-23 10:34:15 +00:00
Stéphane Charette 2465b88422 bump next version string to 3.2.2
svn: r15266
2010-04-22 08:09:39 +00:00
Benny Malengier 8cea9a51eb revert last change of Rob for Braille, breaks 3.2
svn: r15263
2010-04-22 07:30:53 +00:00
Stéphane Charette 4550baab10 update for 3.2.1 release
svn: r15260
2010-04-22 07:14:59 +00:00
Rob G. Healey 55f392869a Re-wrote the Vertical navigation menu.
svn: r15259
2010-04-22 01:33:50 +00:00
Rob G. Healey 00b0412fee Committed same changes for NarrativeWeb and WebCal for Screen Readers and Braille writers.
svn: r15258
2010-04-22 01:31:51 +00:00
Mirko Leonhäuser 13b5c5a524 Updated german translation
svn: r15252
2010-04-21 17:28:22 +00:00
Espen Berg e044b265d1 Revised Norwegian bokmål translation
svn: r15250
2010-04-21 10:41:50 +00:00
Peter Landgren 2e784b10dc Update of Swedish translation.
svn: r15249
2010-04-21 07:07:34 +00:00
Doug Blank 1a0eb9ce07 3848: NarWeb: a Family Attribute confuses following families
svn: r15248
2010-04-21 00:31:33 +00:00
Stephen George f7bdf34e52 Add the current windows install scripts to version control
svn: r15247
2010-04-20 22:17:51 +00:00
Erik De Richter d4c8769f77 update nl translation
svn: r15245
2010-04-20 14:26:57 +00:00
Jérôme Rapinat d771987d25 update hebrew translation (by Igal Shapira)
svn: r15244
2010-04-20 13:20:16 +00:00
Jérôme Rapinat 5576d5a29a update french translation
svn: r15243
2010-04-20 07:22:41 +00:00
Rob G. Healey 8383d19e2c Cleanup work on stylesheets before next release.
svn: r15242
2010-04-19 22:45:42 +00:00
Mirko Leonhäuser fe986d59e2 Updated german translation
svn: r15239
2010-04-19 20:19:03 +00:00
Doug Blank d473bc8704 3430: Add Gramps version to the output of reports
svn: r15237
2010-04-19 14:34:54 +00:00
Peter Landgren 4c1b073dac Fix of issue 3865.
svn: r15235
2010-04-19 13:49:49 +00:00
Doug Blank def3e1f1c1 3863: Narrative Web report : role not displayed when not primary
svn: r15233
2010-04-19 13:46:37 +00:00
Peter Landgren 33f27e5a9d Fix of 3838.
svn: r15231
2010-04-19 13:08:00 +00:00
Peter Landgren dd585eeb14 Swedish update.
svn: r15230
2010-04-19 13:00:31 +00:00
Jérôme Rapinat 3638758a6a update french translation
svn: r15227
2010-04-19 08:42:40 +00:00
Jérôme Rapinat a48189188f typo
svn: r15225
2010-04-19 08:21:20 +00:00
Doug Blank beec9a1e5b 3868: NarWeb Associations should be a link to the person's webpage
svn: r15224
2010-04-19 02:45:26 +00:00
Doug Blank 41c810d9ae Don't crash on new-style newyear date tuple (newyear date is from trunk)
svn: r15223
2010-04-19 02:44:13 +00:00
Mirko Leonhäuser cf6a378e0a Updated german translation
svn: r15222
2010-04-18 21:59:15 +00:00
Doug Blank 5aa5782130 3863: Narrative Web report : missing description column
svn: r15221
2010-04-18 16:58:04 +00:00
Doug Blank b7ca1ab432 3862: Narrative Web Report - Hyperlink on image regions no more clikable
svn: r15219
2010-04-18 16:14:31 +00:00
Doug Blank 62e4b4bc29 3805: Report 'Narrated Web Site...' - Contact page will be shown only if Publisher contact note OR image was set before
svn: r15217
2010-04-18 13:52:34 +00:00
Doug Blank 6ed480d1d9 Fixes for configuring gramplets
svn: r15216
2010-04-18 13:44:33 +00:00
Doug Blank 6806b68d9d Fixed error in losing options on config of this gramplet
svn: r15213
2010-04-18 12:59:04 +00:00
Mirko Leonhäuser 537c2cf71f Updated german translation
svn: r15211
2010-04-18 12:49:44 +00:00
Doug Blank 54b87d8fc6 Fixed error in losing options on config of this gramplet
svn: r15210
2010-04-18 12:25:51 +00:00
Doug Blank cc2a9b39fb 3863: Narrative Web report : role not displayed when not primary; moved associations above sources to include assoc sources
svn: r15208
2010-04-18 11:03:46 +00:00
Rob G. Healey 67866b3be6 Added my changes in trunk/NarrativeWeb to gramps32. Allowing the user to choose from either vertical/horizontal menus in either Web_Basic-Blue or Web_Visually stylesheets.
svn: r15205
2010-04-18 01:37:37 +00:00
Doug Blank 62bd563c9e All known CSS syntax errors fixed
svn: r15204
2010-04-18 00:43:05 +00:00
Doug Blank 4954b97248 Bump up gramps32 SVN from 3.2.0 to 3.2.1
svn: r15202
2010-04-17 23:21:08 +00:00
Doug Blank 75c9a2ef3b Revert: put this in the next commit
svn: r15200
2010-04-17 23:19:23 +00:00
Doug Blank 2a66d6b648 3798: tempfile wrongly used in Gramps: possible error 'Too many open files: ...'
svn: r15199
2010-04-17 23:16:36 +00:00
Doug Blank 92dd34a742 3544: Narrated web report does not get created
svn: r15198
2010-04-17 21:58:20 +00:00
Doug Blank d66ba3430a CSS fixes---need to do to all
svn: r15195
2010-04-17 21:44:21 +00:00
Doug Blank b38c9e5144 Refine dump_notes usage
svn: r15194
2010-04-17 20:09:45 +00:00
Doug Blank 4f648c3c7e 3851: NarWeb Associations don't show unless Include Private is checked
svn: r15193
2010-04-17 20:08:47 +00:00
Boril Gourinov 0754a00faf Update of Bulgarian translation
svn: r15191
2010-04-17 19:37:31 +00:00
Erik De Richter d60766d252 update nl translation
svn: r15190
2010-04-17 18:58:36 +00:00
Jérôme Rapinat be1deaa875 update template and french translation
svn: r15189
2010-04-17 18:43:05 +00:00
Doug Blank 00b02b19ed CSS fixes and rest of fix of 3837
svn: r15186
2010-04-17 18:19:13 +00:00
Doug Blank 8f38b63312 CSS fixes and partial fix to 3837
svn: r15184
2010-04-17 14:47:02 +00:00
Peter Landgren ab138911f5 Issue 3823, improved support for 2-byte unicode sequence.
svn: r15183
2010-04-17 14:01:58 +00:00
Doug Blank b88b68e3cf Changed a gettext string (home -> active); only show home link if person is selected
svn: r15180
2010-04-17 13:08:57 +00:00
Doug Blank 59f12247f5 Use cropped regions as images; show gallery in order of media_list, and include snapshot in gallery
svn: r15179
2010-04-17 12:42:42 +00:00
Doug Blank 690daa1783 Removed unnecessary return
svn: r15173
2010-04-17 00:48:24 +00:00
Doug Blank 8564556ddd 3848: Web Report Revision 15110, missing name
svn: r15170
2010-04-17 00:20:34 +00:00
Benny Malengier 99e8b2bb31 3815: Notes with html show verbatim in narrative web
svn: r15168
2010-04-16 20:58:51 +00:00
Erik De Richter 387e9537a5 update nl translation
svn: r15167
2010-04-16 16:06:32 +00:00
Doug Blank 290c7413ea 3798: Narrative Web Report error 'Too many open files: ...'
svn: r15166
2010-04-16 15:38:58 +00:00
Doug Blank 84b35dcbd0 Protection from scale error
svn: r15164
2010-04-16 15:37:46 +00:00
Doug Blank 361a781b44 Protect from unknown types---just mark as unknown
svn: r15161
2010-04-16 15:35:18 +00:00
Jérôme Rapinat 1b205c9d8d update Slovak translation (by Lubo Vasko)
svn: r15160
2010-04-16 13:09:32 +00:00
Doug Blank 3ca9122aa9 Resized Download page
svn: r15158
2010-04-16 00:17:39 +00:00
Doug Blank 62e612da4f Create Addressbook Page, even if no addresses if it is checked; center mainz addressbook pages
svn: r15156
2010-04-15 21:45:44 +00:00
Doug Blank 8f3d0564d7 Mainz subparts centered
svn: r15154
2010-04-15 21:27:17 +00:00
Doug Blank 3f9096cac1 Mainz centered
svn: r15152
2010-04-15 21:16:35 +00:00
Doug Blank 3eafa61ba7 Errors in CSS
svn: r15150
2010-04-15 21:04:38 +00:00
Espen Berg d2a7319945 Revised Norwegian bokmål translation
svn: r15147
2010-04-15 19:25:31 +00:00
Rob G. Healey 9de60a586a Added Navigation style sheets and Basic Blue to src/data directory in preparation to getting trunk NarrativeWeb up to speed with gramps32. NarrativeWeb has NOT been modified for these changes yet.
svn: r15145
2010-04-15 14:34:54 +00:00
Doug Blank d54e4dadbe 3829: Narrated Web Site: Type of source ref note is not output
svn: r15144
2010-04-15 12:40:36 +00:00
Doug Blank 9445741cd1 Long/lat showing as None
svn: r15142
2010-04-15 10:53:22 +00:00
Doug Blank dfdda43ed7 Repository name was double-escaped
svn: r15140
2010-04-15 10:48:09 +00:00
Rob G. Healey 6e04d0c427 Cleanup of class RepositoryPage.
svn: r15137
2010-04-15 07:29:08 +00:00
Rob G. Healey 98b68e0d2c Attempt to return Mainz to its original state. Only needs work on the div#footer. Sides, header, and body all working once again.
svn: r15136
2010-04-15 06:52:50 +00:00
Peter Landgren 6ccb9e2fb7 Fix of 3800, so that error msg are dispalyed.
svn: r15132
2010-04-15 06:41:10 +00:00
Doug Blank 8c429cdb4e 3845: In NarrativeWeb plugin, would like to remove the <sup> from the source annotations, by adamplumb
svn: r15131
2010-04-15 04:12:27 +00:00
Doug Blank abcc901da6 3828: Narrated Web Site: Association output is incorrect, by kulath
svn: r15127
2010-04-15 03:51:41 +00:00
Rob G. Healey 561f7fc040 Bug#3846: Fixed class SourcePage where information would not be created if 'Suppress Gramps IDs' was selected.
svn: r15123
2010-04-15 01:47:51 +00:00
Doug Blank 163382d835 Fixed typo on ewgions to match trunk
svn: r15122
2010-04-15 01:08:28 +00:00
Benny Malengier a3c6fa4e6f 1892: Name Editor Cancel marks Override
svn: r15120
2010-04-14 20:15:40 +00:00
Mirko Leonhäuser 02ba3841f3 Updated german translation
svn: r15119
2010-04-14 18:35:49 +00:00
Jérôme Rapinat 5a07dd88c6 new template
svn: r15118
2010-04-14 16:40:11 +00:00
Jérôme Rapinat 3fbecd2480 update Slovak DateHandler (by Lubo Vasko)
svn: r15116
2010-04-14 16:22:04 +00:00
Peter Landgren a32f2d8d51 Update of Swedish translation.
svn: r15115
2010-04-14 12:53:32 +00:00
Jérôme Rapinat 9c181346f0 Bug#3813: Removed ColumnPath and made ColumnDescription the hyperlink - quick manual edit : new translation string
svn: r15113
2010-04-14 08:39:07 +00:00
Jérôme Rapinat 3c7cbc9a49 update Hebrew and Slovak translations (by Igal Shapira and Lubo Vasko) and enable Hebrew (50%) for 3.2.1
svn: r15112
2010-04-14 08:30:27 +00:00
Rob G. Healey bee3835ab6 Bug#3819: Fixed the place detail missing because if place.main_loc in dump_places() was indented one too far.
svn: r15110
2010-04-14 05:48:14 +00:00
Rob G. Healey e231990b74 Bug#3813: Removed ColumnPath and made ColumnDescription the hyperlink. Removed ColumnPath Element from all stylesheets.
svn: r15107
2010-04-14 04:38:19 +00:00
Doug Blank 8667244185 3822: Narrated Web Site: citations for person sources are missing
svn: r15105
2010-04-14 00:23:55 +00:00
Peter Landgren 5297e676b0 Fix of issue 3840.
svn: r15102
2010-04-13 07:33:09 +00:00
Doug Blank a81f6956a5 3827: Narrated Web Site: Dates for Alternate names are not shown, by kulath
svn: r15101
2010-04-13 02:49:45 +00:00
Doug Blank aac19c3b31 3834: Death date on individuals an surnames pages in Narrative Web Report
svn: r15098
2010-04-13 02:37:08 +00:00
Doug Blank ea49e88bb5 3831: Childref notes are lost on merging of children
svn: r15097
2010-04-13 02:28:19 +00:00
Doug Blank 18dd8cac93 3676: NarrativeWeb report sometimes uses urls not availables (filter, proxy, living)
svn: r15094
2010-04-13 02:14:59 +00:00
Doug Blank 28306a0bf4 CSS Errors
svn: r15092
2010-04-12 23:44:54 +00:00
Jérôme Rapinat 3430645c48 3756: Cannot set new year value different than default (first January)
svn: r15091
2010-04-12 08:38:30 +00:00
Mirko Leonhäuser 869cd9f118 Updated german translation
svn: r15089
2010-04-11 20:27:40 +00:00
Peter Landgren e5dcf43212 All strings in unicode.
svn: r15087
2010-04-11 17:32:23 +00:00
Peter Landgren 7d1812fe7e Swedish update.
svn: r15086
2010-04-11 17:27:54 +00:00
Doug Blank 9773eb5a15 3826: Language detection in spelling does not work, by kulath
svn: r15085
2010-04-11 14:18:59 +00:00
Doug Blank 8777a0ee1e 3831: Childref notes are lost on merging of children, by MD Nauta
svn: r15082
2010-04-11 13:43:00 +00:00
Doug Blank f829b1bf91 3830: 'Merged GRAMPS ID' attribute overwritten on PeopleMerge by MD Nauta
svn: r15081
2010-04-11 13:15:58 +00:00
Rob G. Healey b0d01d4c2c Bug#3822: Added citation_links for person sources in NarrativeWeb.
svn: r15078
2010-04-11 05:05:41 +00:00
Rob G. Healey f1acb5e0d5 Re-added #alphabet, #navigation, #subnavigation back to Visually Impaired stylesheet.
svn: r15077
2010-04-11 04:59:44 +00:00
Rob G. Healey 9655233957 Bug#3814: Added Attributes style elements to stylesheets. Added family attributes back into IndividualPages.
svn: r15076
2010-04-11 04:07:08 +00:00
Jérôme Rapinat 1ea98777ca Do not break translations
svn: r15071
2010-04-10 07:50:36 +00:00
Erik De Richter b21d78ef8b update nl translation
svn: r15070
2010-04-10 06:48:03 +00:00
Rob G. Healey 4053357d17 Bug#3816: Fixed note issue in header_note and footer_note.
svn: r15068
2010-04-09 22:32:45 +00:00
Josip Pisoj c57394f6aa hr translation update
svn: r15067
2010-04-08 21:28:20 +00:00
Erik De Richter c47b012160 update nl translation
svn: r15065
2010-04-08 14:05:47 +00:00
Rob G. Healey a1d66d4e42 Fixed problems in RepositoryList and Sources of items not being a bottom dashed line to separate items.
svn: r15064
2010-04-08 12:24:22 +00:00
Rob G. Healey b9c55e9f41 Fixed the center person to be using the actual center person option in NarrativeWeb.
svn: r15062
2010-04-08 05:47:32 +00:00
Rob G. Healey d3b6d8c9f3 Fixed footer note to use straight HTML code instead of styled text.
svn: r15059
2010-04-08 02:26:10 +00:00
Rob G. Healey f52dc92ad0 Bug #3812: Fixed event notes being shown on individual pages.
svn: r15058
2010-04-08 00:33:30 +00:00
Rob G. Healey 6846dc43dd Bug #3816: Fixxed header note so that there is no formatting. Straight HTML.
svn: r15057
2010-04-07 23:57:22 +00:00
Rob G. Healey 78dca2345a Fixed page source layout for stylesheet links line up.
svn: r15056
2010-04-07 23:55:28 +00:00
Boril Gourinov aaa5f81719 Updating Bulgarian translation
svn: r15052
2010-04-07 06:26:32 +00:00
Benny Malengier d8268a5c5e fix short month dutch datehandler
svn: r15045
2010-04-06 19:22:18 +00:00
Mirko Leonhäuser 699b1415d3 Updated german translation
svn: r15044
2010-04-06 18:41:57 +00:00
Jérôme Rapinat 8fdebc3f79 Add bookmark icon was missing on Menu (same string as navigationview)
svn: r15043
2010-04-06 18:00:24 +00:00
Jérôme Rapinat 2b968797b5 Edit bookmark icon was missing on Menu
svn: r15040
2010-04-06 17:47:22 +00:00
Espen Berg c4f62cf446 Revised Norwegian translation
svn: r15039
2010-04-06 17:04:22 +00:00
Peter Landgren 3c4c8bae1c Swedish update.
svn: r15025
2010-04-04 11:42:43 +00:00
Raphael Ackermann d3494a9429 added checks so that missing LOCALEDIR won't prevent gramps from starting
svn: r15020
2010-04-04 09:24:15 +00:00
Rob G. Healey 318ffc4060 Replaced downloadnote with msg on DownloadPage.
svn: r15018
2010-04-04 05:41:42 +00:00
Rob G. Healey 1fcfbe0cb3 Fixed spacing and alighment in Nebraska stylesheet.
svn: r15017
2010-04-04 05:39:40 +00:00
Rob G. Healey b6be5cfbb5 Re-added missing #navigation, #subnavigation, #alphabet back into Visually Impaired stylesheet.
svn: r15016
2010-04-04 04:23:28 +00:00
Rob G. Healey 13e14ab179 Fixed navigation menu spacing and alignment.
svn: r15015
2010-04-04 03:45:33 +00:00
Rob G. Healey 193de7d191 Bug#2872: Fixed #streetaddress in ContactPage for Web_Nebraska.css stylesheet.
svn: r15012
2010-04-04 02:50:01 +00:00
Mirko Leonhäuser 49f4af524c Updated german translation
svn: r15008
2010-04-03 19:46:29 +00:00
Raphael Ackermann 9c514656a2 0003770: Transutils crashes if it cannot find /usr/local/share/locale
svn: r15007
2010-04-03 12:04:04 +00:00
Rob G. Healey fa97100070 Fixed bug#3775. Putting space between source references.
svn: r15004
2010-04-03 05:41:26 +00:00
Rob G. Healey 429494fb13 Fixed download page table being oversized. Removed download page note from download page. Bug#3795 should be resolved.
svn: r15003
2010-04-03 01:27:16 +00:00
Luigi Toscano d3012d9753 Translation updates.
svn: r15001
2010-04-02 21:12:08 +00:00
Peter Landgren 6d397343bd Swedish update.
svn: r15000
2010-04-02 09:17:59 +00:00
Peter Landgren 4083a4e95e Fix of issue 2740.
svn: r14999
2010-04-02 09:14:11 +00:00
Rob G. Healey 0ab9fb1041 Fixed a typo from eaxct_search to exact_search in line #235.
svn: r14996
2010-04-02 00:08:39 +00:00
Doug Blank 531a1670bd 3789: Web report crash
svn: r14993
2010-04-01 23:35:19 +00:00
Erik De Richter e114a33e8c update nl translation
svn: r14992
2010-04-01 18:52:30 +00:00
Mirko Leonhäuser 39a211e6b6 Updated german translation
svn: r14989
2010-04-01 15:41:44 +00:00
Jérôme Rapinat 07cf64904e update french transaltion, new template
svn: r14987
2010-04-01 14:51:55 +00:00
Doug Blank 1ea37388af 3780: 'Gender contains' filter does not work as I expect
svn: r14986
2010-04-01 13:24:48 +00:00
Doug Blank a7e06a91aa 3609: Can't open a gramps 3.1 database from trunk on Windows 7 64 bit from Gramps 3.2
svn: r14984
2010-04-01 01:20:40 +00:00
Doug Blank 9302411eb4 0003734: [Calendars] Only add persons whose birth date is year/01/01 on the first january
svn: r14982
2010-04-01 01:09:13 +00:00
Benny Malengier 4aca694f11 3757: key2string map still in memory after XML import
svn: r14980
2010-03-31 08:26:47 +00:00
Benny Malengier eb052c160e 3783: NewPerson Dialogue: "available surname list" shows each occurrence of a family name instead of one per family name
svn: r14976
2010-03-30 13:41:26 +00:00
Jérôme Rapinat 8b0851a5d9 update Polish translation (by Łukasz Rymarczyk)
svn: r14974
2010-03-30 09:04:27 +00:00
Nick Hall 1518db862b Fix bug introduced with adding column to place tree view
svn: r14971
2010-03-29 22:43:03 +00:00
Nick Hall 1832a4335c 3740: Fix problems with add, delete and update of views when filter applied
svn: r14969
2010-03-29 16:04:19 +00:00
Jérôme Rapinat 17945cd5d2 update Slovak translation (by Lubo Vasko)
svn: r14966
2010-03-29 10:16:16 +00:00
Jérôme Rapinat 994d8479ef update Slovak translation (by Lubo Vasko)
svn: r14965
2010-03-29 09:55:36 +00:00
Espen Berg a442eea8bb Revised Norwegian translation
svn: r14964
2010-03-28 20:01:48 +00:00
Rob G. Healey 94a9262faf Removed new code only meant for trunk. Thanks Stephane Charette for finding the error.
svn: r14963
2010-03-28 19:38:58 +00:00
Stéphane Charette 05af777974 new gramps.pot file generated
svn: r14962
2010-03-28 16:33:24 +00:00
Stéphane Charette 0decb74ba2 insert a line break between the date and the 'created for' name
svn: r14960
2010-03-28 15:42:28 +00:00
Peter Landgren 02295c4b37 Minor Swedish update.
svn: r14959
2010-03-28 15:17:39 +00:00
Stéphane Charette e0503bf667 only scale images down, not up
svn: r14956
2010-03-28 14:10:17 +00:00
Stéphane Charette 3f1d184f9b remove stray html on resized images
svn: r14955
2010-03-28 14:07:05 +00:00
Erik De Richter 096aeb789c update nl translation
svn: r14954
2010-03-28 08:41:15 +00:00
Nick Hall b014c9d39d 0407 and 1447: Save column widths in configuration file
svn: r14952
2010-03-28 00:54:33 +00:00
Nick Hall 097200d512 3731: Add place name column to place tree view
svn: r14950
2010-03-27 22:59:41 +00:00
Raphael Ackermann fb93619c6e 0002878: $n / $N commands don't make a difference when printing reports
svn: r14948
2010-03-27 19:25:08 +00:00
Boril Gourinov d286d6355a Updating Bulgarian translation
svn: r14947
2010-03-27 17:34:04 +00:00
Peter Landgren a897c63f31 Swedish update.
svn: r14946
2010-03-27 09:17:07 +00:00
Jérôme Rapinat 766ea73c52 3596: Web reports dialogs use too large length value
svn: r14945
2010-03-27 08:24:28 +00:00
Jérôme Rapinat ed19bd7c71 update french translation and template
svn: r14944
2010-03-27 07:58:02 +00:00
Rob G. Healey 06a2f38faa Created CSS elements for WebLinks sections in Individual Pages and AddressBook Pages. Fixed missing hyperlinks and description fields. Problem from Alain Aupeix. No bug tracker created.
svn: r14943
2010-03-27 07:15:24 +00:00
Mirko Leonhäuser 38be51fdc7 Updated german translation
svn: r14941
2010-03-27 01:09:51 +00:00
Rob G. Healey 636ef25a7a Fixed missing notes and sources in Event Section of Individual Pages. Reported by Alain Aupeix and Stephane Charette. No bug report generated. Thanks gentlemen.
svn: r14938
2010-03-26 23:52:57 +00:00
Nick Hall 4219566d11 Translate strings for hierarchy level headings
svn: r14934
2010-03-26 21:11:12 +00:00
Nick Hall 08920e3f8c 3752: Fix sort order of last-changed column
svn: r14932
2010-03-26 19:48:43 +00:00
Jérôme Rapinat f5c1e9efcf 3736: Bloc size and new line on NarrativeWeb: line 879
svn: r14931
2010-03-26 15:48:34 +00:00
Jérôme Rapinat 2d78513cfe convert localized short months to DateObject
svn: r14929
2010-03-26 15:43:26 +00:00
Peter Landgren e43b659d50 Swedish update.
svn: r14928
2010-03-26 08:24:39 +00:00
Josip Pisoj 97662e04e3 hr translations
svn: r14925
2010-03-25 19:12:37 +00:00
Benny Malengier 0d2eab4f07 3761: Error when editing family event
svn: r14923
2010-03-24 19:45:48 +00:00
Benny Malengier 66da4a7f96 Solving connected date bugs
3390: Date module that reads calendar on Gedcom file format, cannot read the @ 
3763: dates parsed wrong
3754: Active markup for invalid date on Event View
Some other bugs might be fixed by these changes


svn: r14921
2010-03-24 16:05:14 +00:00
Serge Noiraud 2f9a6cef54 ODFDoc : Issue 2576 : change run-through form background to foreground.
svn: r14919
2010-03-24 06:44:32 +00:00
Boril Gourinov 0563f93c97 Updating Bulgarian translation
svn: r14917
2010-03-23 20:08:22 +00:00
Benny Malengier d83b8d5675 3715: Plugin manager load/reload does not unload earlier versions of plugins
svn: r14915
2010-03-23 13:27:40 +00:00
Joan Creus 1f0214abda Translation update
svn: r14913
2010-03-22 22:53:55 +00:00
Luigi Toscano b68b0be609 Translation updates.
svn: r14911
2010-03-22 22:29:59 +00:00
Julio Sánchez 46abb12de5 Handle GEDCOM 5.5.1 formats for latitude and longitude (bug #3743)
svn: r14910
2010-03-22 22:21:05 +00:00
Mirko Leonhäuser 6fde03c4a0 Updated german translation
svn: r14909
2010-03-22 20:21:23 +00:00
Julio Sánchez e73736b83c Translation is now up-to-date except for online manual references
svn: r14908
2010-03-22 17:47:57 +00:00
Jérôme Rapinat 3db68542cd new template and updated french translation (3.2.1)
svn: r14907
2010-03-22 17:19:10 +00:00
Jérôme Rapinat 9d3352fd9f 3723: Some labels should be plural ?
svn: r14905
2010-03-22 17:15:00 +00:00
Jérôme Rapinat 573f342462 new template and updated french translation (3.2.1)
svn: r14904
2010-03-22 16:59:55 +00:00
Jérôme Rapinat df7afdf59f 3723: Some labels should be plural ?
svn: r14902
2010-03-22 13:09:25 +00:00
Erik De Richter fcf37f7e42 update nl translation
svn: r14900
2010-03-22 07:57:09 +00:00
Luigi Toscano 8ec4760b8f Translation updates.
svn: r14897
2010-03-21 18:47:04 +00:00
Serge Noiraud 7595be65f2 GeoView : Issue 3749 : syncronize the crosshair to the new position.
svn: r14895
2010-03-21 16:21:07 +00:00
Espen Berg f0e4a17c99 Updated Norwegian translation
svn: r14894
2010-03-21 16:11:17 +00:00
Serge Noiraud 643e6321c3 GeoView : Issue 3749: better way to place the icon at the same place as googlemap do.
svn: r14893
2010-03-21 15:59:20 +00:00
Serge Noiraud 90f27a4b06 GeoView : Issue 749 : Pin positions drift with zoom
svn: r14891
2010-03-21 15:26:47 +00:00
Benny Malengier 6a020331e4 3690: Do not need to use underscore on text for file formats (import/export)
svn: r14888
2010-03-21 10:32:36 +00:00
Benny Malengier 339b7c7d24 3655: last modified timestamp changes everytime a tree is accessed
svn: r14886
2010-03-21 09:36:51 +00:00
Jérôme Rapinat 0957aac8b0 updated french translation
svn: r14885
2010-03-20 16:46:43 +00:00
Doug Blank 999c8fb653 3742: Gramps 3.2 crashes on data entry
svn: r14884
2010-03-20 15:23:40 +00:00
Doug Blank 1bb7b75060 3475: Sort temple names on LDS Editor
svn: r14882
2010-03-20 14:31:44 +00:00
Doug Blank d4adeacaa4 3739: Find duplicate people (error in soundex unicode)
svn: r14879
2010-03-20 12:41:37 +00:00
Peter Landgren 07527ad229 Fix of issue 3737.
svn: r14876
2010-03-20 11:52:08 +00:00
Jérôme Rapinat 2974f5034b 3744: Cannot display name, description, uri for 'Web Home' web link generated by NarrativeWeb (need descr)
svn: r14874
2010-03-20 08:24:14 +00:00
Jérôme Rapinat 56d940ca03 updated Slovak translation (by Lubo Vasko)
svn: r14873
2010-03-20 04:27:24 +00:00
Jérôme Rapinat a521a5721a 3738: ftp url can lead to NarrativeWeb crash (typo)
svn: r14871
2010-03-20 04:18:09 +00:00
Raphael Ackermann 5f4700674e 0002857: Spacebar doesn't activate embedded edit buttons
svn: r14868
2010-03-19 14:42:42 +00:00
Doug Blank 10a8de8f1f 3728: Daterange with cformat doesn't XML-import
svn: r14865
2010-03-19 01:19:29 +00:00
Doug Blank 85cda5069b Changed variable name to avoid conflict with reload function
svn: r14864
2010-03-18 23:56:33 +00:00
Benny Malengier e009296c4e 3715: Plugin manager load/reload does not unload earlier versions of plugins
svn: r14862
2010-03-18 22:28:52 +00:00
Jérôme Rapinat 029d505706 3736: Bloc size and new line on NarrativeWeb: line 879
svn: r14860
2010-03-18 15:53:19 +00:00
Boril Gourinov b3e903f455 Updating Bulgarian translation
svn: r14859
2010-03-17 21:13:14 +00:00
Mirko Leonhäuser 1a11905b03 Updated german translation
svn: r14858
2010-03-17 18:47:18 +00:00
Jérôme Rapinat 60d4102d2b 3729: plugin names are description
svn: r14857
2010-03-17 15:18:47 +00:00
Jérôme Rapinat 648f0c17e1 3694: Use of the same translation string on View as the name set on group
svn: r14854
2010-03-17 15:04:43 +00:00
Mirko Leonhäuser 3311cb01a7 Updated german translation
svn: r14853
2010-03-16 20:02:22 +00:00
Julio Sánchez c3cf78513e Partial update
svn: r14852
2010-03-16 16:54:32 +00:00
Jérôme Rapinat 321461ffac 3708: Portuguese Date Handler updated (by lcc)
svn: r14851
2010-03-16 13:09:51 +00:00
Jérôme Rapinat ae92094ccf remove Esperanto reference
svn: r14850
2010-03-16 13:08:22 +00:00
Benny Malengier 21e99eb292 3706: GRAMPS plugins selecting a local path produces an error
svn: r14849
2010-03-16 08:54:38 +00:00
Peter Landgren 5ccfcd25d0 Update after last fix of typos and grammar.
svn: r14847
2010-03-16 07:46:22 +00:00
Julio Sánchez c6ace32787 Partial update
svn: r14846
2010-03-16 06:08:20 +00:00
Benny Malengier cc022dc858 3709: Typos and grammar mistakes
svn: r14844
2010-03-15 22:24:25 +00:00
Benny Malengier a0e510a210 3709: Typos and grammar mistakes
svn: r14842
2010-03-15 22:15:25 +00:00
Benny Malengier d47852bfbe 3709: Typos and grammar mistakes
svn: r14840
2010-03-15 22:10:58 +00:00
Benny Malengier ee1185428a 3721: RuntimeWarning on Event comparison tool
svn: r14838
2010-03-15 22:03:17 +00:00
Joan Creus 59457b5974 Translation update
svn: r14837
2010-03-15 21:20:37 +00:00
Mirko Leonhäuser c49071215a Updated german translation
svn: r14836
2010-03-15 19:40:40 +00:00
Julio Sánchez 1cf2b67ddd Partial update
svn: r14835
2010-03-15 18:02:46 +00:00
Jérôme Rapinat d84f35e449 wording
svn: r14834
2010-03-15 18:00:21 +00:00
Espen Berg a0082082f7 Updated Norwegian translation - too late, but only three fuzzies, so I don't bother
svn: r14832
2010-03-15 15:30:41 +00:00
Jérôme Rapinat f07071178d Some 16x16 images are missing, used by OS or desktop not able to scale SVG images
svn: r14830
2010-03-15 13:53:21 +00:00
Jérôme Rapinat bf83a938f6 Some 16x16 images are missing, used by OS or desktop not able to scale SVG images
svn: r14829
2010-03-15 13:51:37 +00:00
Jérôme Rapinat 3d56add348 3696: Typo on translation strings into NarrativeWeb
svn: r14827
2010-03-15 11:10:52 +00:00
Jérôme Rapinat 8ade441c5c missing image for old distribution or desktop (no SVG support)
svn: r14825
2010-03-15 11:01:34 +00:00
Stéphane Charette 4e2c568c75 up the version string for gramps32 branch to 3.2.1
svn: r14824
2010-03-15 08:00:22 +00:00
239 changed files with 61600 additions and 64877 deletions
+38 -1
View File
@@ -1,4 +1,41 @@
Version 3.2.0 (beta1) -- the "I am your father" release.
Version 3.2.4 -- the "Tententen" bug fix release.
* fix a crash on newer distro's after an export is finished
* styled notes cleanup and consistency improvement (nar web behaves like the pdf/html output of reports)
* newlines in styled notes are written as newlines so users can make simple lists
* many NarrativeWeb fixes
* gedcom output fixes
* non latin character fixes (mainly for windows)
* recursive filter fixes
* undo fixes
* many translation updates
Version 3.2.3 -- the "I used to eat there. Really good noodles." release.
* Bug fixes:
-> several GLADE fixes
-> several GEDCOM fixes (both export and import)
-> several crash fixes
-> encoding fix (Windows only)
-> privacy/living fixes
-> updates to NarrativeWeb and the css stylsheets
* Translation updates: bg, ca, de, es, fr, he, nb, nl, pl, sk, sv
Version 3.2.2 -- the "Mea navis aëricumbens anguillis abundat" release.
* This release is a quick fix to a problem introduced by NarrativeWeb in the previous release.
* Also includes a few small fixes and translation updates to hr and it.
* See the release notes from the 3.2.1 release for the full list of changes and translation updates.
Version 3.2.1 -- the "One of those men is my father" release.
* Many bug fixes:
-> fixed missing icons
-> load/reload plugins must unload old plugins
-> import/export fixes (date ranges, underscore, latitude/longitude)
-> narrative web crash fixes and many updates, html notes, css updates
-> geoview fixes and updates
-> unicode error in soundex
-> fixed crash on data entry
* Translation updates: bg, ca, de, es, fr, he, hr, it, nb, nl, sk, sv
Version 3.2.0 -- the "I am your father" release.
* New Plugin System:
-> In the Help Menu -> Menu Status, all available plugins are visible. All
plugins can be hidden, saving resources and hiding options you do not need.
+3 -3
View File
@@ -5,13 +5,13 @@ dnl May need to run automake && aclocal first
AC_PREREQ(2.57)
dnl NOTE: arg to macro below becomes the "VERSION"
AC_INIT(gramps, 3.2.0, [gramps-bugs@lists.sourceforge.net])
AC_INIT(gramps, 3.2.4, [gramps-bugs@lists.sourceforge.net])
AC_CONFIG_SRCDIR(configure.in)
AM_INIT_AUTOMAKE([1.6.3 foreign])
AC_CONFIG_MACRO_DIR([m4])
RELEASE=0beta.SVN$(svnversion -n .)
RELEASE=0.SVN$(svnversion -n .)
dnl RELEASE=0beta3
dnl RELEASE=0rc1
dnl RELEASE=1
@@ -33,7 +33,7 @@ AC_SUBST(RELEASE)
AC_SUBST(VERSIONSTRING)
dnl Add the languages which your application supports here.
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ru sv eo fi lt sk bg hr sl ca sq"
ALL_LINGUAS="hu zh_CN cs da de es fr it nb nl nn pl pt_BR ru sv fi lt sk bg hr sl ca sq he"
GETTEXT_PACKAGE=gramps
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define to the Gettext package name.])
+1 -1
View File
@@ -2,7 +2,7 @@ Source: gramps
Section: gnome
Priority: optional
Maintainer: Stéphane Charette <stephanecharette@gmail.com>
Build-Depends-Indep: libxml-parser-perl, python-gtk2, gettext, libgconf2-dev, python-central (>= 0.5.6), python, intltool
Build-Depends-Indep: libxml-parser-perl, python-gtk2, gettext, python-central (>= 0.5.6), python, intltool
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
Homepage: http://www.gramps-project.org/
+11
View File
@@ -0,0 +1,11 @@
#########################################
The :class:`RelationshipCalculator` Class
#########################################
Contents:
.. automodule:: Relationship
.. autoclass:: RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
+1950 -1793
View File
File diff suppressed because it is too large Load Diff
+1607 -1373
View File
File diff suppressed because it is too large Load Diff
+2256 -1916
View File
File diff suppressed because it is too large Load Diff
+5527 -9359
View File
File diff suppressed because it is too large Load Diff
+1808 -1685
View File
File diff suppressed because it is too large Load Diff
+1868 -1743
View File
File diff suppressed because it is too large Load Diff
+5534 -4792
View File
File diff suppressed because it is too large Load Diff
+1474 -1345
View File
File diff suppressed because it is too large Load Diff
+2225 -2056
View File
File diff suppressed because it is too large Load Diff
+2119 -2144
View File
File diff suppressed because it is too large Load Diff
+1705 -1572
View File
File diff suppressed because it is too large Load Diff
+1887 -1734
View File
File diff suppressed because it is too large Load Diff
+3210 -3487
View File
File diff suppressed because it is too large Load Diff
+3567 -5567
View File
File diff suppressed because it is too large Load Diff
+5862 -5585
View File
File diff suppressed because it is too large Load Diff
+8538 -10513
View File
File diff suppressed because it is too large Load Diff
+2234 -1903
View File
File diff suppressed because it is too large Load Diff
+6 -16
View File
@@ -22,28 +22,14 @@
""" Unittest for testing POTFILES.in and Makefile contents """
# PYTHONPATH=/../src python po_test.py
import unittest
import os
import glob
from test import test_util
test_util.path_append_parent()
excluded_files = ["src/DataViews/_MapView.py",
"src/plugins/PHPGedViewConnector.py",
"src/plugins/phpgedview.glade",
"src/plugins/Ancestors.py",
"src/plugins/DesGraph.py",
"src/plugins/FtmStyleAncestors.py",
"src/plugins/FtmStyleDescendants.py",
"src/plugins/IndivSummary.py",
"src/date_test.py",
"src/plugins/CmdRef.py",
"src/plugins/DumpGenderStats.py",
"src/plugins/Eval.py",
"src/plugins/Leak.py",
"src/plugins/TestcaseGenerator.py"
]
def get_potfile(filename):
fp = open(filename, "r")
retvals = []
@@ -53,6 +39,10 @@ def get_potfile(filename):
fp.close()
return retvals
# POTFILES.skip
excluded_files = get_potfile("../POTFILES.skip")
class TestPOT(unittest.TestCase):
potfiles = get_potfile("../POTFILES.in")
count = 1
+1 -1
View File
@@ -17648,7 +17648,7 @@ msgstr "由 <a href = \"%(homepage)s\">Gramps</a> 生成, %(date)s"
#: ../src/plugins/webreport/NarrativeWeb.py:880
#, python-format
msgid " Created for <a href = \"%s\">%s</a>"
msgstr "为 <a href = \"%s\">%s</a> 创建 "
msgstr " 为 <a href = \"%s\">%s</a> 创建 "
#: ../src/plugins/webreport/NarrativeWeb.py:1001
msgid "Html|Home"
+1
View File
@@ -126,6 +126,7 @@ class Bookmarks :
self.uistate.uimanager.remove_ui(self.active)
self.uistate.uimanager.remove_action_group(self.action_group)
self.action_group = gtk.ActionGroup('Bookmarks')
self.uistate.uimanager.ensure_update()
self.active = DISABLED
def redraw_and_report_change(self):
+6 -1
View File
@@ -139,7 +139,12 @@ class DateDisplay(object):
Formats the extra items (calendar, newyear) for a date.
"""
scal = self.calendar[cal]
snewyear = self.newyear[newyear]
if isinstance(newyear, int) and newyear <= len(self.newyear):
snewyear = self.newyear[newyear]
elif isinstance(newyear, (list, tuple)):
snewyear = "%s-%s" % (newyear[0], newyear[1])
else:
snewyear = "Err"
retval = ""
for item in [scal, snewyear]:
if item:
+38 -9
View File
@@ -154,11 +154,17 @@ class DateParser(object):
modifier_after_to_int = {}
hebrew_to_int = {
"tishri" : 1, "heshvan" : 2, "kislev" : 3,
"tevet" : 4, "shevat" : 5, "adari" : 6,
"adarii" : 7, "nisan" : 8, "iyyar" : 9,
"sivan" : 10, "tammuz" : 11, "av" : 12,
"elul" : 13,
u"tishri" : 1, u"heshvan" : 2, u"kislev" : 3,
u"tevet" : 4, u"shevat" : 5, u"adari" : 6,
u"adarii" : 7, u"nisan" : 8, u"iyyar" : 9,
u"sivan" : 10, u"tammuz" : 11, u"av" : 12,
u"elul" : 13,
#alternative spelling
u"cheshvan": 2, u"adar sheni": 7, u"iyar" : 9,
#GEDCOM months
u"tsh" : 1, u"csh": 5, u"ksl": 3, u"tvt": 4, u"shv": 5, u"adr": 6,
u"ads" : 7, u"nsn": 8, u"iyr": 9, u"svn":10, u"tmz":11, u"aav":12,
u"ell":13,
}
french_to_int = {
@@ -168,7 +174,15 @@ class DateParser(object):
u'germinal' : 7, u'floréal' : 8,
u'prairial' : 9, u'messidor' : 10,
u'thermidor' : 11, u'fructidor' : 12,
u'extra' : 13
u'extra' : 13,
#GEDCOM months
u'vend' : 1, u'brum' : 2,
u'frim' : 3, u'nivo' : 4,
u'pluv' : 5, u'vent' : 6,
u'germ' : 7, u'flor' : 8,
u'prai' : 9, u'mess' : 10,
u'ther' : 11, u'fruc' : 12,
u'comp' : 13,
}
islamic_to_int = {
@@ -430,7 +444,6 @@ class DateParser(object):
m = 0
else:
m = mmap[groups[1].lower()]
d = self._get_int(groups[0])
if groups[2] is None:
@@ -586,11 +599,15 @@ class DateParser(object):
text_parser = self.parser[cal]
(text1, bc1) = self.match_bce(match.group('start'))
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)
if stop == Date.EMPTY and text2 != "":
return 0
if bc2:
stop = self.invert_year(stop)
@@ -609,11 +626,15 @@ class DateParser(object):
text_parser = self.parser[cal]
(text1, bc1) = self.match_bce(match.group('start'))
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)
if stop == Date.EMPTY and text2 != "":
return 0
if bc2:
stop = self.invert_year(stop)
@@ -666,7 +687,10 @@ class DateParser(object):
start = self._parse_subdate(grps[0], self.parser[cal])
mod = self.modifier_after_to_int.get(grps[1].lower(),
Date.MOD_NONE)
if bc:
if start == Date.EMPTY:
date.set_modifier(Date.MOD_TEXTONLY)
date.set_text_value(text)
elif bc:
date.set(qual, mod, cal, self.invert_year(start), newyear=ny)
else:
date.set(qual, mod, cal, start, newyear=ny)
@@ -676,7 +700,10 @@ class DateParser(object):
grps = match.groups()
start = self._parse_subdate(grps[0])
mod = Date.MOD_ABOUT
if bc:
if start == Date.EMPTY:
date.set_modifier(Date.MOD_TEXTONLY)
date.set_text_value(text)
elif bc:
date.set(qual, mod, cal, self.invert_year(start), newyear=ny)
else:
date.set(qual, mod, cal, start, newyear=ny)
@@ -712,6 +739,8 @@ class DateParser(object):
if subdate == Date.EMPTY and text != "":
date.set_as_text(text)
return
#else:
# print 'valid subdate', text, subdate
except:
date.set_as_text(text)
return
+13 -9
View File
@@ -194,12 +194,12 @@ class DateDisplayBG(DateDisplay):
calendar = (
u"",
u" (юлиански)",
u" (еврейски)",
u" (републикански)",
u" (персийски)",
u" (ислямски)",
u" (шведски)"
u"юлиански",
u"еврейски",
u"републикански",
u"персийски",
u"ислямски",
u"шведски"
)
_mod_str = ("", "преди ", "след ", "около ", "", "", "")
@@ -282,6 +282,7 @@ class DateDisplayBG(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -292,14 +293,17 @@ class DateDisplayBG(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'от', d1, u'до', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'от', d1, u'до', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'между', d1, u'и', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'между', d1, u'и', d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
#-------------------------------------------------------------------------
#
+15 -12
View File
@@ -116,18 +116,17 @@ class DateDisplayCA(DateDisplay):
"""
Catalan language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = ( u"", u"Gener", u"Febrer", u"Març", u"Abril", u"Maig",
u"Juny", u"Juliol", u"Agost", u"Setembre", u"Octubre",
u"Novembre", u"Desembre" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = ( u"", u"Gen", u"Feb", u"Mar", u"Abr", u"Mai", u"Jun",
u"Jul", u"Ago", u"Set", u"Oct", u"Nov", u"Des" )
calendar = (
"", u" (Julià)", u" (Hebreu)",
u" (Revolucionari)", u" (Persa)", u" (Islàmic)",
u" (Swedish)"
"", u"Julià", u"Hebreu",
u"Revolucionari", u"Persa", u"Islàmic",
u"Suec"
)
_mod_str = ("", u"abans de ", u"després de ", u"cap a ", "", "", "")
@@ -164,6 +163,7 @@ class DateDisplayCA(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -174,14 +174,17 @@ class DateDisplayCA(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'des de', d1, u'fins a', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'des de', d1, u'fins a', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'i', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'i', d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
#-------------------------------------------------------------------------
#
+15 -12
View File
@@ -102,18 +102,17 @@ class DateDisplayCZ(DateDisplay):
"""
Czech language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = ( u"", u"Leden", u"Únor", u"Březen", u"Duben", u"Květen",
u"Červen", u"červenec", u"Srpen", u"Září", u"Říjen",
u"Listopad", u"Prosinec" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = ( u"", u"Led", u"Úno", u"Bře", u"Dub", u"Kvě", u"čer",
u"Čvc", u"Srp", u"Zář", u"Říj", u"Lis", u"Pro" )
calendar = (
"", u" (juliánský)", u" (hebrejský)",
u" (republikánský)", u" (perský)", u" (islámský)",
u" (swedish)"
"", u"juliánský", u"hebrejský",
u"republikánský", u"perský", u"islámský",
u"švédský"
)
_mod_str = ("", u"před ", u"po ", u"kolem ", "", "", "")
@@ -133,6 +132,7 @@ class DateDisplayCZ(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -143,17 +143,20 @@ class DateDisplayCZ(DateDisplay):
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%s" % (qual_str, u'od', d1,
u'do', d2, self.calendar[cal])
u'do', 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, u'mezi',
d1, u'a', d2, self.calendar[cal])
d1, u'a', 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, self.calendar[cal])
text, scal)
#-------------------------------------------------------------------------
#
+10 -6
View File
@@ -206,9 +206,9 @@ class DateDisplayDE(DateDisplay):
u"Jul", u"Aug", u"Sep", u"Okt", u"Nov", u"Dez" )
calendar = (
"", u" (julianisch)", u" (hebräisch)",
u" (französisch republikanisch)", u" (persisch)", u" (islamisch)",
u" (schwedisch)"
"", u"julianisch", u"hebräisch",
u"französisch republikanisch", u"persisch", u"islamisch",
u"schwedisch"
)
_mod_str = ("", u"vor ", u"nach ", u"etwa ", "", "", "")
@@ -289,6 +289,7 @@ class DateDisplayDE(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -299,14 +300,17 @@ class DateDisplayDE(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'von', d1, u'bis', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'von', d1, u'bis', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%szwischen %s und %s%s" % (qual_str, d1, d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%szwischen %s und %s%s" % (qual_str, d1, d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
#-------------------------------------------------------------------------
#
+10 -6
View File
@@ -127,9 +127,9 @@ class DateDisplayES(DateDisplay):
u"dic" )
calendar = (
"", u" (Juliano)", u" (Hebreo)",
u" (Revolucionario)", u" (Persa)", u" (Islámico)",
u" (Swedish)"
"", u"Juliano", u"Hebreo",
u"Revolucionario", u"Persa", u"Islámico",
u"Swedish"
)
_mod_str = ("", u"antes de ", u"después de ", u"hacia ", "", "", "")
@@ -149,6 +149,7 @@ class DateDisplayES(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -159,14 +160,17 @@ class DateDisplayES(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'y', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'y', d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
#-------------------------------------------------------------------------
#
+19 -16
View File
@@ -116,22 +116,22 @@ class DateDisplayFI(DateDisplay):
"""
Finnish language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = (u"", u"Tammikuu", u"Helmikuu", u"Maaliskuu", u"Huhtikuu",
u"Toukokuu", u"Kesäkuu", u"Heinäkuu", u"Elokuu",
u"Syyskuu", u"Lokakuu", u"Marraskuu", u"Joulukuu")
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = (u"", u"Tammi", u"Helmi", u"Maali", u"Huhti", u"Touko",
u"Kesäk", u"Heinä", u"Eloku", u"Syysk", u"Lokak", u"Marra",
u"Joulu")
calendar = ("",
u"(juliaaninen)",
u"(heprealainen)",
u"(ranskan v.)",
u"(persialainen)",
u"(islamilainen)",
u" (svensk)"
)
u"juliaaninen",
u"heprealainen",
u"ranskan v.",
u"persialainen",
u"islamilainen",
u"svensk"
)
_qual_str = (u"", u"arviolta", u"laskettuna")
@@ -139,7 +139,7 @@ class DateDisplayFI(DateDisplay):
formats = (
"VVVV-KK-PP (ISO)",
"PP.KK.VVVV"
"PP.KK.VVVV"
)
def display(self, date):
@@ -150,6 +150,7 @@ class DateDisplayFI(DateDisplay):
qual = date.get_quality()
cal = date.get_calendar()
start = date.get_start_date()
newyear = date.get_new_year()
if mod == Date.MOD_TEXTONLY:
return date.get_text()
@@ -185,9 +186,11 @@ class DateDisplayFI(DateDisplay):
if qual:
# prepend quality
text = u"%s %s" % (self._qual_str[qual], text)
if cal:
if cal or newyear:
# append calendar type
text = u"%s %s" % (text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
text = u"%s %s" % (text, scal)
return text
+23 -12
View File
@@ -58,6 +58,15 @@ class DateParserFR(DateParser):
month_to_int = DateParser.month_to_int
# Custom short months not the same as long months
month_to_int[u"janv"] = 1
month_to_int[u"févr"] = 2
month_to_int[u"juil"] = 7
month_to_int[u"sept"] = 9
month_to_int[u"oct"] = 10
month_to_int[u"déc"] = 12
# Add common value
month_to_int[u"bluviose"] = 5
@@ -230,7 +239,6 @@ class DateParserFR(DateParser):
self._stext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' %
self._smon_str, re.IGNORECASE)
#-------------------------------------------------------------------------
#
# French display
@@ -247,8 +255,8 @@ class DateDisplayFR(DateDisplay):
short_months = ( u"", u"janv", u"févr", u"mars", u"avril", u"mai", u"juin",
u"juil", u"août", u"sept", u"oct", u"nov", u"déc" )
calendar = ("", u" (Julien)", u" (Hébreu)", u" (Révolutionnaire)",
u" (Perse)", u" (Islamique)", u" (Suédois)")
calendar = ("", u"Julien", u"Hébreu", u"Révolutionnaire",
u"Perse", u"Islamique", u"Suédois")
_mod_str = ("", u"avant ", u"après ", u"vers ", "", "", "")
@@ -383,6 +391,7 @@ class DateDisplayFR(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = (self._qual_str)[qual]
@@ -391,20 +400,22 @@ class DateDisplayFR(DateDisplay):
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())
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, u'de', date1, u'à',
date2, (self.calendar)[cal])
date2, scal)
elif mod == Date.MOD_RANGE:
date1 = (self.display_cal)[cal](start)
date2 = (self.display_cal)[cal](date.get_stop_date())
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, u'entre', date1, u'et',
date2, (self.calendar)[cal])
date2, scal)
else:
text = (self.display_cal)[date.get_calendar()](start)
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,
(self.calendar)[cal])
scal)
#-------------------------------------------------------------------------
#
+10 -6
View File
@@ -227,9 +227,9 @@ class DateDisplayHR(DateDisplay):
)
calendar = (
"", u" (julijanski)", u" (hebrejski)",
u" (francuski republikanski)", u" (perzijski)", u" (islamski)",
u" (swedish)"
"", u"julijanski", u"hebrejski",
u"francuski republikanski", u"perzijski", u"islamski",
u"swedish"
)
_mod_str = ("", "prije ", "poslije ", "okolo ", "", "", "")
@@ -322,6 +322,7 @@ class DateDisplayHR(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -332,17 +333,20 @@ class DateDisplayHR(DateDisplay):
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, u'od', d_1, u'do', d_2,
self.calendar[cal])
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, u'između', d_1, u'i', d_2,
self.calendar[cal])
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,
self.calendar[cal])
scal)
#-------------------------------------------------------------------------
#
+10 -6
View File
@@ -120,9 +120,9 @@ class DateDisplayIT(DateDisplay):
u"lug", u"ago", u"set", u"ott", u"nov", u"dic" )
calendar = (
"", u" (Giuliano)", u" (Ebraico)",
u" (Rivoluzionario)", u" (Persiano)", u" (Islamico)",
u" (Svedese)"
"", u"Giuliano", u"Ebraico",
u"Rivoluzionario", u"Persiano", u"Islamico",
u"Svedese"
)
_mod_str = ("", u"prima del ", u"dopo del ", u"circa il ", "", "", "")
@@ -159,6 +159,7 @@ class DateDisplayIT(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -169,14 +170,17 @@ class DateDisplayIT(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'dal', d1, u'al', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'dal', d1, u'al', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'tra', d1, u'e', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'tra', d1, u'e', d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
#-------------------------------------------------------------------------
#
+19 -15
View File
@@ -101,21 +101,21 @@ class DateDisplayLT(DateDisplay):
"""
Lithuanian language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = ( u"", u"Sausis", u"Vasaris", u"Kovas", u"Balandis", u"Gegužė",
u"Birželis", u"Liepa", u"Rugpjūtis", u"Rugsejis", u"Spalis",
u"Lapkritis", u"Gruodis" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = ( u"", u"Sau", u"Vas", u"Kov", u"Bal", u"Geg", u"Bir",
u"Lie", u"Rgp", u"Rgs", u"Spa", u"Lap", u"Grd" )
calendar = (
u"", u" (julijaus)",
u" (hebrajų)",
u" (prancuzų respublikos)",
u" (persų)",
u" (islamo)",
u" (swedish)"
u"", u"julijaus",
u"hebrajų",
u"prancuzų respublikos",
u"persų",
u"islamo",
u"swedish"
)
_mod_str = (u"",
@@ -139,6 +139,7 @@ class DateDisplayLT(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -149,17 +150,20 @@ class DateDisplayLT(DateDisplay):
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%s" % (qual_str, u'nuo', d1, u'iki',
d2, self.calendar[cal])
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, u'tarp', d1, u'ir',
d2, self.calendar[cal])
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,
self.calendar[cal])
scal)
#-------------------------------------------------------------------------
#
+13 -9
View File
@@ -124,12 +124,12 @@ class DateDisplayNb(DateDisplay):
calendar = (
"",
" (juliansk)",
" (hebraisk)",
" (fransk republikansk)",
" (persisk)",
" (islamisk)",
" (svensk)"
"juliansk",
"hebraisk",
"fransk republikansk",
"persisk",
"islamisk",
"svensk"
)
_mod_str = ("", u"før ", u"etter ", u"ca ", "", "", "")
@@ -146,6 +146,7 @@ class DateDisplayNb(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -156,16 +157,19 @@ class DateDisplayNb(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return u"%sfra %s til %s%s" % (qual_str, d1, d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return u"%sfra %s til %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 u"%smellom %s og %s%s" % (qual_str, d1, d2,
self.calendar[cal])
scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return u"%s%s%s%s" % (qual_str, self._mod_str[mod],
text, self.calendar[cal])
text, scal)
#-------------------------------------------------------------------------
#
+14 -7
View File
@@ -65,6 +65,9 @@ class DateParserNL(DateParser):
month_to_int[u"feber"] = 2
month_to_int[u"februaris"] = 2
month_to_int[u"merz"] = 3
#make sure on all distro mrt and maa are accepted
month_to_int[u"maa"] = 3
month_to_int[u"mrt"] = 3
month_to_int[u"aprilis"] = 4
month_to_int[u"maius"] = 5
month_to_int[u"junius"] = 6
@@ -143,13 +146,13 @@ class DateDisplayNL(DateDisplay):
u"juni", u"juli", u"augustus", u"september", u"oktober",
u"november", u"december" )
short_months = ( u"", u"jan", u"feb", u"maa", u"apr", u"mei", u"jun",
short_months = ( u"", u"jan", u"feb", u"mrt", u"apr", u"mei", u"jun",
u"jul", u"aug", u"sep", u"okt", u"nov", u"dec" )
calendar = (
"", u" (juliaans)", u" (hebreeuws)",
u" (franse republiek)", u" (persisch)", u" (islamitisch)",
u" (zweeds)" )
"", u"juliaans", u"hebreeuws",
u"franse republiek", u"persisch", u"islamitisch",
u"zweeds" )
_mod_str = ("", u"voor ", u"na ", u"rond ", "", "", "")
@@ -231,6 +234,7 @@ class DateDisplayNL(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -241,17 +245,20 @@ class DateDisplayNL(DateDisplay):
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%s" % (qual_str, u'van', d1,
u'tot', d2, self.calendar[cal])
u'tot', 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 "%stussen %s en %s%s" % (qual_str, d1, d2,
self.calendar[cal])
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,
self.calendar[cal])
scal)
#-------------------------------------------------------------------------
#
+61 -23
View File
@@ -20,6 +20,7 @@
#
# Polish version 2007 by Piotr Czubaszek
# Updated in 2010 by Łukasz Rymarczyk
"""
Polish-specific classes for parsing and displaying dates.
@@ -85,7 +86,31 @@ class DateParserPL(DateParser):
month_to_int[u"grudzień"] = 12
month_to_int[u"gru"] = 12
month_to_int[u"XII"] = 12
# Alternative forms: declined nouns
month_to_int[u"stycznia"] = 1
month_to_int[u"lutego"] = 2
month_to_int[u"marca"] = 3
month_to_int[u"kwietnia"] = 4
month_to_int[u"maja"] = 5
month_to_int[u"czerwca"] = 6
month_to_int[u"lipca"] = 7
month_to_int[u"sierpnia"] = 8
month_to_int[u"września"] = 9
month_to_int[u"października"] = 10
month_to_int[u"listopada"] = 11
month_to_int[u"grudnia"] = 12
# Alternative forms: nouns without polish accent letters
# (misspellings sometimes used in emails)
month_to_int[u"styczen"] = 1
month_to_int[u"kwiecien"] = 4
month_to_int[u"sierpien"] = 8
month_to_int[u"wrzesien"] = 9
month_to_int[u"pazdziernik"] = 10
month_to_int[u"grudzien"] = 12
month_to_int[u"wrzesnia"] = 9
month_to_int[u"pazdziernika"] = 10
month_to_int[u"paz"] = 10
modifier_to_int = {
u'przed' : Date.MOD_BEFORE,
u'po' : Date.MOD_AFTER,
@@ -93,26 +118,34 @@ class DateParserPL(DateParser):
u'ok.' : Date.MOD_ABOUT,
u'circa' : Date.MOD_ABOUT,
u'ca.' : Date.MOD_ABOUT,
# Alternative forms: misspellings sometimes used in emails
u'okolo' : Date.MOD_ABOUT,
u'ok' : Date.MOD_ABOUT,
}
calendar_to_int = {
u'gregoriański' : Date.CAL_GREGORIAN,
u'gregoriański' : Date.CAL_GREGORIAN,
u'greg.' : Date.CAL_GREGORIAN,
u'juliański' : Date.CAL_JULIAN,
u'juliański' : Date.CAL_JULIAN,
u'jul.' : Date.CAL_JULIAN,
u'hebrajski' : Date.CAL_HEBREW,
u'hebr.' : Date.CAL_HEBREW,
u'islamski' : Date.CAL_ISLAMIC,
u'islamski' : Date.CAL_ISLAMIC,
u'isl.' : Date.CAL_ISLAMIC,
u'francuski republikański': Date.CAL_FRENCH,
u'franc.' : Date.CAL_FRENCH,
u'perski' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
u'perski' : Date.CAL_PERSIAN,
u'szwedzki' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
# Alternative forms: nouns without polish accent letters
# (misspellings sometimes used in emails)
u'gregorianski' : Date.CAL_GREGORIAN,
u'julianski' : Date.CAL_JULIAN,
u'francuski republikanski': Date.CAL_FRENCH,
}
quality_to_int = {
u'szacowany' : Date.QUAL_ESTIMATED,
u'szacowany' : Date.QUAL_ESTIMATED,
u'szac.' : Date.QUAL_ESTIMATED,
u'obliczony' : Date.QUAL_CALCULATED,
u'obl.' : Date.QUAL_CALCULATED,
@@ -123,11 +156,12 @@ class DateParserPL(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._span = re.compile("(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)",re.IGNORECASE)
self._range = re.compile(u"(między)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)", re.IGNORECASE)
self._span = re.compile("(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)", re.IGNORECASE)
# Also handle a common mistakes
self._range = re.compile(u"((?:po)?mi(?:ę|e)dzy)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)", re.IGNORECASE)
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
re.IGNORECASE)
self._jtext2= re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
re.IGNORECASE)
#-------------------------------------------------------------------------
@@ -139,18 +173,18 @@ class DateDisplayPL(DateDisplay):
"""
Polish language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = ( u"", u"Styczeń", u"Luty", u"Marzec", u"Kwiecień", u"Maj",
u"Czerwiec", u"Lipiec", u"Sierpień", u"Wrzesień", u"Październik",
u"Listopad", u"Grudzień" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = ( u"", u"Sty", u"Lut", u"Mar", u"Kwi", u"Maj", u"Cze",
u"Lip", u"Sie", u"Wrz", u"Paź", u"Lis", u"Gru" )
calendar = (
"", u" (juliański)", u" (hebrajski)",
u" (francuski republikański)", u" (perski)", u" (islamski)",
u" (swedish)"
"", u"juliański", u"hebrajski",
u"francuski republikański", u"perski", u"islamski",
u"swedish"
)
_mod_str = ("", u"przed ", u"po ", u"ok. ", "", "", "")
@@ -246,6 +280,7 @@ class DateDisplayPL(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -256,17 +291,20 @@ class DateDisplayPL(DateDisplay):
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%s" % (qual_str, u'od', d1, u'do', d2,
self.calendar[cal])
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, u'między', d1, u'a', d2,
self.calendar[cal])
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,
self.calendar[cal])
scal)
#-------------------------------------------------------------------------
#
+36 -27
View File
@@ -52,20 +52,26 @@ from _DateHandler import register_datehandler
class DateParserPT(DateParser):
modifier_to_int = {
u'antes de' : Date.MOD_BEFORE,
u'antes' : Date.MOD_BEFORE,
u'ant.' : Date.MOD_BEFORE,
u'ant' : Date.MOD_BEFORE,
u'após' : Date.MOD_AFTER,
u'aprox.' : Date.MOD_ABOUT,
u'aprox' : Date.MOD_ABOUT,
u'apr.' : Date.MOD_ABOUT,
u'apr' : Date.MOD_ABOUT,
u'cerca de' : Date.MOD_ABOUT,
u'ca.' : Date.MOD_ABOUT,
u'ca' : Date.MOD_ABOUT,
u'c.' : Date.MOD_ABOUT,
u'até' : Date.MOD_ABOUT,
u'antes de' : Date.MOD_BEFORE,
u'antes' : Date.MOD_BEFORE,
u'ant.' : Date.MOD_BEFORE,
u'ant' : Date.MOD_BEFORE,
u'a' : Date.MOD_BEFORE,
u'depois de' : Date.MOD_AFTER,
u'depois' : Date.MOD_AFTER,
u'dep.' : Date.MOD_AFTER,
u'dep' : Date.MOD_AFTER,
u'aprox.' : Date.MOD_ABOUT,
u'aprox' : Date.MOD_ABOUT,
u'apr.' : Date.MOD_ABOUT,
u'apr' : Date.MOD_ABOUT,
u'cerca de' : Date.MOD_ABOUT,
u'ca.' : Date.MOD_ABOUT,
u'ca' : Date.MOD_ABOUT,
u'c.' : Date.MOD_ABOUT,
u'por volta de' : Date.MOD_ABOUT,
u'por volta' : Date.MOD_ABOUT,
u'pvd.' : Date.MOD_ABOUT,
}
calendar_to_int = {
@@ -116,21 +122,20 @@ class DateDisplayPT(DateDisplay):
"""
Portuguese language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = ( u"", u"Janeiro", u"Fevereiro", u"Março", u"Abril", u"Maio",
u"Junho", u"Julho", u"Agosto", u"Setembro", u"Outubro",
u"Novembro", u"Dezembro" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = ( u"", u"Jan", u"Fev", u"Mar", u"Abr", u"Mai", u"Jun",
u"Jul", u"Ago", u"Set", u"Out", u"Nov", u"Dez" )
calendar = (
"", u" (Juliano)", u" (Hebreu)",
u" (Revolucionário)", u" (Persa)", u" (Islâmico)",
u" (Swedish)"
"", u"Juliano", u"Hebreu",
u"Revolucionário", u"Persa", u"Islâmico",
u"Sueco"
)
_mod_str = ("",u"antes de ",u"depois de ",u"até ","","","")
_mod_str = ("",u"antes de ",u"depois de ",u"por volta de ","","","")
_qual_str = ("","estimado ","calculado ")
@@ -147,6 +152,7 @@ class DateDisplayPT(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -157,14 +163,17 @@ class DateDisplayPT(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', d2,self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', d2, scal)
elif mod == Date.MOD_RANGE:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'e', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'e', d2, scal)
else:
text = self.display_cal[date.get_calendar()](start)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
#-------------------------------------------------------------------------
#
+13 -9
View File
@@ -197,12 +197,12 @@ class DateDisplayRU(DateDisplay):
calendar = (
u"",
u" (юлианский)",
u" (еврейский)",
u" (республиканский)",
u" (персидский)",
u" (исламский)",
u" (Swedish)"
u"юлианский",
u"еврейский",
u"республиканский",
u"персидский",
u"исламский",
u"Swedish"
)
_mod_str = (
@@ -291,6 +291,7 @@ class DateDisplayRU(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -301,17 +302,20 @@ class DateDisplayRU(DateDisplay):
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, u'по', d2,
self.calendar[cal])
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, u'между', d1, u'и',
d2, self.calendar[cal])
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, self.calendar[cal])
text, scal)
#-------------------------------------------------------------------------
#
+15 -12
View File
@@ -104,18 +104,17 @@ class DateDisplaySK(DateDisplay):
"""
Slovak language date display class.
"""
# TODO: Translate these month strings:
long_months = ( u"", u"January", u"February", u"March", u"April", u"May",
u"June", u"July", u"August", u"September", u"October",
u"November", u"December" )
long_months = ( u"", u"január", u"február", u"marec", u"apríl", u"máj",
u"jún", u"júl", u"august", u"september", u"október",
u"november", u"december" )
short_months = ( u"", u"Jan", u"Feb", u"Mar", u"Apr", u"May", u"Jun",
u"Jul", u"Aug", u"Sep", u"Oct", u"Nov", u"Dec" )
short_months = ( u"", u"jan", u"feb", u"mar", u"apr", u"máj", u"jún",
u"júl", u"aug", u"sep", u"okt", u"nov", u"dec" )
calendar = (
"", u" (juliánský)", u" (hebrejský)",
u" (republikánsky)", u" (perzský)", u" (islamský)",
u" (swedish)"
"", u"juliánský", u"hebrejský",
u"republikánsky", u"perzský", u"islamský",
u"swedish"
)
_mod_str = ("", u"pred ", u"po ", u"okolo ", "", "", "")
@@ -135,6 +134,7 @@ class DateDisplaySK(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -145,17 +145,20 @@ class DateDisplaySK(DateDisplay):
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%s" % (qual_str, u'od', d1,
u'do', d2, self.calendar[cal])
u'do', 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, u'medzi',
d1, u'a', d2, self.calendar[cal])
d1, u'a', 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, self.calendar[cal])
text, scal)
#-------------------------------------------------------------------------
#
+10 -6
View File
@@ -251,9 +251,9 @@ class DateDisplaySR_latin(DateDisplay):
)
calendar = (
"", u" (julijanski)", u" (hebrejski)",
u" (francuski republikanski)", u" (persijski)", u" (islamski)",
u" (švedski)"
"", u"julijanski", u"hebrejski",
u"francuski republikanski", u"persijski", u"islamski",
u"švedski"
)
_mod_str = ("", "pre ", "posle ", "oko ", "", "", "")
@@ -334,6 +334,7 @@ class DateDisplaySR_latin(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -344,17 +345,20 @@ class DateDisplaySR_latin(DateDisplay):
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, u'od', d_1, u'do', d_2,
self.calendar[cal])
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, u'između', d_1, u'i', d_2,
self.calendar[cal])
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,
self.calendar[cal])
scal)
#-------------------------------------------------------------------------
+18 -14
View File
@@ -64,7 +64,7 @@ class DateParserSv(DateParser):
u'c:a' : Date.MOD_ABOUT
}
bce = ["f Kr"]
bce = [u"f Kr"]
calendar_to_int = {
u'gregoriansk ' : Date.CAL_GREGORIAN,
@@ -128,20 +128,20 @@ class DateDisplaySv(DateDisplay):
)
calendar = (
"",
" (juliansk)",
" (hebreisk)",
" (fransk republikansk)",
" (persisk)",
" (islamisk)",
" (svensk)"
u"",
u"juliansk",
u"hebreisk",
u"fransk republikansk",
u"persisk",
u"islamisk",
u"svensk"
)
_mod_str = ("", u"före ", u"efter ", u"c:a ", "", "", "")
_mod_str = (u"", u"före ", u"efter ", u"c:a ", u"", u"", u"")
_qual_str = ("", u"uppskattat ", u"beräknat ")
_qual_str = (u"", u"uppskattat ", u"beräknat ")
_bce_str = "%s f Kr"
_bce_str = u"%s f Kr"
def display(self, date):
"""
@@ -151,6 +151,7 @@ class DateDisplaySv(DateDisplay):
cal = date.get_calendar()
qual = date.get_quality()
start = date.get_start_date()
newyear = date.get_new_year()
qual_str = self._qual_str[qual]
@@ -161,16 +162,19 @@ class DateDisplaySv(DateDisplay):
elif mod == Date.MOD_SPAN:
d1 = self.display_cal[cal](start)
d2 = self.display_cal[cal](date.get_stop_date())
return u"%sfrån %s till %s%s" % (qual_str, d1, d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return u"%sfrån %s till %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 u"%smellan %s och %s%s" % (qual_str, d1, d2,
self.calendar[cal])
scal)
else:
text = self.display_cal[date.get_calendar()](start)
scal = self.format_extras(cal, newyear)
return u"%s%s%s%s" % (qual_str, self._mod_str[mod],
text, self.calendar[cal])
text, scal)
#-------------------------------------------------------------------------
#
+18 -7
View File
@@ -307,19 +307,30 @@ class WarnHandler(RotateHandler):
self.button = button
button.on_clicked(self.display)
self.timer = None
self.last_line = '-1'
def emit(self, record):
if self.timer:
gobject.source_remove(self.timer)
gobject.timeout_add(180*1000, self._clear)
if self.timer is None:
#check every 3 minutes if warn button can disappear
self.timer = gobject.timeout_add(3*60*1000, self._check_clear)
RotateHandler.emit(self, record)
self.button.show()
def _check_clear(self):
new_last_line = self.get_buffer()[-1]
if self.last_line == new_last_line:
#buffer has not changed for 3 minutes, let's clear it:
self._clear()
return False
else:
self.last_line = new_last_line
return True
def _clear(self):
self.button.hide()
self.set_capacity(self._capacity)
self.last_line = '-1'
self.timer = None
return False
def display(self, obj):
obj.hide()
@@ -329,7 +340,6 @@ class WarnHandler(RotateHandler):
buf = msg.get_buffer()
for i in self.get_formatted_log():
buf.insert_at_cursor(i + '\n')
self.set_capacity(self._capacity)
top.run()
top.destroy()
@@ -413,7 +423,7 @@ class DisplayState(gen.utils.Callback):
navigation type and group.
"""
history = self.get_history(nav_type, nav_group)
return history.present()
return history.present() if history else None
def set_active(self, handle, nav_type, nav_group=0):
"""
@@ -421,7 +431,8 @@ class DisplayState(gen.utils.Callback):
the given handle.
"""
history = self.get_history(nav_type, nav_group)
history.push(handle)
if history:
history.push(handle)
def set_sensitive(self, state):
self.window.set_sensitive(state)
+26 -12
View File
@@ -3,6 +3,7 @@
#
# Copyright (C) 2004-2007 Donald N. Allingham
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Benny Malengier
# Contribution 2009 by Brad Crittenden <brad [AT] bradcrittenden.net>
#
# This program is free software; you can redistribute it and/or modify
@@ -92,6 +93,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
"""
#override predefined do_xxx signal handlers
__gsignals__ = {"apply": "override", "cancel": "override",
"close": "override", "prepare": "override"}
@@ -164,6 +166,22 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
if isinstance(arg, gtk.Button) and arg.get_label() == 'gtk-go-forward':
self.forward_button = arg
def get_cancel_button(self, arg):
if isinstance(arg, gtk.HBox):
arg.forall(self._cancel_btn)
def _cancel_btn(self, arg):
if isinstance(arg, gtk.Button) and arg.get_label() == 'gtk-cancel':
self.cancel_button = arg
def get_close_button(self, arg):
if isinstance(arg, gtk.HBox):
arg.forall(self._close_btn)
def _close_btn(self, arg):
if isinstance(arg, gtk.Button) and arg.get_label() == 'gtk-close':
self.close_button = arg
def build_menu_names(self, obj):
"""Override ManagedWindow method."""
return (self.top_title, None)
@@ -382,22 +400,18 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
self.set_page_complete(page, False)
self.set_page_type(page, gtk.ASSISTANT_PAGE_SUMMARY)
def do_apply(self):
pass
def do_cancel(self):
if self.writestarted :
return True
else :
self.close()
def do_close(self):
if self.writestarted :
return True
else :
pass
else :
self.close()
def do_cancel(self):
self.do_close()
def do_prepare(self, page):
"""
The "prepare" signal is emitted when a new page is set as the
@@ -462,7 +476,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
#Allow for exotic error: file is still not correct
self.check_fileselect(self.chooser, show=False)
if self.get_page_complete(self.chooser) :
filename = Utils.get_unicode_path(self.chooser.get_filename())
filename = Utils.get_unicode_path_from_file_chooser(self.chooser.get_filename())
name = os.path.split(filename)[1]
folder = os.path.split(filename)[0]
confirm_text = _(
@@ -536,7 +550,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
def close(self, *obj) :
#clean up ManagedWindow menu, then destroy window, bring forward parent
gtk.Assistant.destroy(self)
ManagedWindow.ManagedWindow.close(self,*obj)
def get_intro_text(self):
@@ -596,7 +610,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
hasattr(self.option_box_instance, "no_fileselect")):
filename = ""
else:
filename = Utils.get_unicode_path(self.chooser.get_filename())
filename = Utils.get_unicode_path_from_file_chooser(self.chooser.get_filename())
config.set('paths.recent-export-dir', os.path.split(filename)[0])
ix = self.get_selected_format_index()
config.set('behavior.recent-export-type', ix)
+2 -2
View File
@@ -40,5 +40,5 @@ from Filters.Rules._HasSourceBase import HasSourceBase
class HasSource(HasSourceBase):
"""Events with sources"""
name = _('Events with <count> source')
description = _("Matches events with a certain number of items in the source")
name = _('Events with <count> sources')
description = _("Matches events with a certain number of sources connected to it")
+2 -2
View File
@@ -43,5 +43,5 @@ from Filters.Rules._HasSourceBase import HasSourceBase
class HasSource(HasSourceBase):
"""Families with sources"""
name = _('Families with <count> source')
description = _("Matches families with a certain number of items in the source")
name = _('Families with <count> sources')
description = _("Matches families with a certain number of sources connected to it")
+1 -1
View File
@@ -57,7 +57,7 @@ class MatchesRegexpOf(Rule):
def apply(self, db, note):
""" Apply the filter """
text = unicode(note.get())
text = note.get()
if self.match.match(text) is not None:
return True
return False
@@ -49,7 +49,7 @@ class MatchesSubstringOf(Rule):
def apply(self, db, note):
""" Apply the filter """
text = unicode(note.get())
text = note.get()
if text.upper().find(self.list[0].upper()) != -1:
return True
return False
@@ -46,10 +46,10 @@ def filter_database(db, progress, filter_name):
"""Returns a list of person handles"""
filt = MatchesFilter([filter_name])
progress.set_header('Preparing sub-filter')
filt.prepare(db)
progress.set_header(_('Preparing sub-filter'))
filt.requestprepare(db)
progress.set_header('Retrieving all sub-filter matches')
progress.set_header(_('Retrieving all sub-filter matches'))
matches = []
for handle in db.iter_person_handles():
person = db.get_person_from_handle(handle)
@@ -57,7 +57,7 @@ def filter_database(db, progress, filter_name):
matches.append(handle)
progress.step()
filt.reset()
filt.requestreset()
return matches
@@ -75,7 +75,8 @@ def get_family_handle_people(db, exclude_handle, family_handle):
possibly_add_handle(family.get_mother_handle())
for child_ref in family.get_child_ref_list():
possibly_add_handle(child_ref.get_reference_handle())
if child_ref:
possibly_add_handle(child_ref.get_reference_handle())
return people
@@ -132,7 +133,7 @@ class DeepRelationshipPathBetween(Rule):
root_person = db.get_person_from_gramps_id(root_person_id)
progress = ProgressMeter(_('Finding relationship paths'))
progress.set_pass(header=_('Evaluating people'), mode=ProgressMeter.MODE_ACTIVITY)
progress.set_pass(header=_('Evaluating people'), mode=ProgressMeter.MODE_ACTIVITY)
filter_name = self.list[1]
target_people = filter_database(db, progress, filter_name)
@@ -48,11 +48,12 @@ class FamilyWithIncompleteEvent(Rule):
def apply(self,db,person):
for family_handle in person.get_family_handle_list():
family = db.get_family_from_handle(family_handle)
for event_ref in family.get_event_ref_list():
if event_ref:
event = db.get_event_from_handle(event_ref.ref)
if not event.get_place_handle():
return True
if not event.get_date_object():
return True
if family:
for event_ref in family.get_event_ref_list():
if event_ref:
event = db.get_event_from_handle(event_ref.ref)
if not event.get_place_handle():
return True
if not event.get_date_object():
return True
return False
+3 -1
View File
@@ -58,7 +58,9 @@ class HasBirth(Rule):
def apply(self,db,person):
for event_ref in person.get_event_ref_list():
if event_ref.role != EventRoleType.PRIMARY:
if not event_ref:
continue
elif event_ref.role != EventRoleType.PRIMARY:
# Only match primaries, no witnesses
continue
event = db.get_event_from_handle(event_ref.ref)
@@ -68,14 +68,15 @@ class HasCommonAncestorWith(Rule):
for fam_handle in person.get_parent_family_handle_list():
fam = db.get_family_from_handle(fam_handle)
for par_handle in (fam.get_father_handle(), fam.get_mother_handle()):
if par_handle:
par = db.get_person_from_handle(par_handle)
if par and par.handle not in self.ancestor_cache:
self.add_ancs(db, par)
if par:
self.ancestor_cache[person.handle].add(par)
self.ancestor_cache[person.handle] |= self.ancestor_cache[par.handle]
if fam:
for par_handle in (fam.get_father_handle(), fam.get_mother_handle()):
if par_handle:
par = db.get_person_from_handle(par_handle)
if par and par.handle not in self.ancestor_cache:
self.add_ancs(db, par)
if par:
self.ancestor_cache[person.handle].add(par)
self.ancestor_cache[person.handle] |= self.ancestor_cache[par.handle]
def reset(self):
self.ancestor_cache = {}
@@ -41,7 +41,7 @@ from _MatchesFilter import MatchesFilter
# HasCommonAncestorWithFilterMatch
#
#-------------------------------------------------------------------------
class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith,MatchesFilter):
class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith):
"""Rule that checks for a person that has a common ancestor with
someone matching a filter"""
@@ -64,7 +64,7 @@ class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith,MatchesFilter):
self.ancestor_cache = {}
self.with_people = []
filt = MatchesFilter(self.list)
filt.prepare(db)
filt.requestprepare(db)
for handle in db.iter_person_handles():
person = db.get_person_from_handle(handle)
if filt.apply (db, person):
@@ -73,4 +73,4 @@ class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith,MatchesFilter):
#fill list of ancestor of person if not present yet
if handle not in self.ancestor_cache:
self.add_ancs(db, person)
filt.reset()
filt.requestreset()
+3 -1
View File
@@ -58,7 +58,9 @@ class HasDeath(Rule):
def apply(self,db,person):
for event_ref in person.get_event_ref_list():
if event_ref.role != EventRoleType.PRIMARY:
if not event_ref:
continue
elif event_ref.role != EventRoleType.PRIMARY:
# Only match primaries, no witnesses
continue
event = db.get_event_from_handle(event_ref.ref)
@@ -53,10 +53,13 @@ class HasFamilyAttribute(Rule):
return False
for f_id in person.get_family_handle_list():
f = db.get_family_from_handle(f_id)
if not f:
continue
for attr in f.get_attribute_list():
name_match = self.list[0] == attr.get_type()
value_match = \
attr.get_value().upper().find(self.list[1].upper()) != -1
if name_match and value_match:
return True
if attr:
name_match = self.list[0] == attr.get_type()
value_match = \
attr.get_value().upper().find(self.list[1].upper()) != -1
if name_match and value_match:
return True
return False
@@ -64,6 +64,8 @@ class HasFamilyEvent(Rule):
def apply(self,db,person):
for f_id in person.get_family_handle_list():
f = db.get_family_from_handle(f_id)
if not f:
continue
for event_ref in f.get_event_ref_list():
if not event_ref:
continue
+4 -3
View File
@@ -61,9 +61,10 @@ class HasRelationship(Rule):
# count children and look for a relationship type match
for f_id in person.get_family_handle_list():
f = db.get_family_from_handle(f_id)
cnt = cnt + len(f.get_child_ref_list())
if self.list[1] and specified_type == f.get_relationship():
rel_type = 1
if f:
cnt = cnt + len(f.get_child_ref_list())
if self.list[1] and specified_type == f.get_relationship():
rel_type = 1
# if number of relations specified
if self.list[0]:
+2 -2
View File
@@ -43,5 +43,5 @@ from Filters.Rules._HasSourceBase import HasSourceBase
class HasSource(HasSourceBase):
"""People with sources"""
name = _('People with <count> source')
description = _("Matches people with a certain number of items in the source")
name = _('People with <count> sources')
description = _("Matches people with a certain number of sources connected to it")
@@ -171,7 +171,7 @@ class HasTextMatchingSubstringOf(Rule):
self.repo_map.update(
repo.handle for repo in self.db.iter_repositories()
if self.match_object(repo)
if repo and self.match_object(repo)
)
+6 -5
View File
@@ -48,9 +48,10 @@ class HaveAltFamilies(Rule):
def apply(self,db,person):
for fhandle in person.get_parent_family_handle_list():
family = db.get_family_from_handle(fhandle)
ref = [ ref for ref in family.get_child_ref_list() \
if ref.ref == person.handle]
if ref[0].get_father_relation() == ChildRefType.ADOPTED \
or ref[0].get_mother_relation() == ChildRefType.ADOPTED:
return True
if family:
ref = [ ref for ref in family.get_child_ref_list() \
if ref.ref == person.handle]
if ref[0].get_father_relation() == ChildRefType.ADOPTED \
or ref[0].get_mother_relation() == ChildRefType.ADOPTED:
return True
return False
+1 -1
View File
@@ -47,4 +47,4 @@ class HaveChildren(Rule):
def apply(self,db,person):
for family_handle in person.get_family_handle_list():
family = db.get_family_from_handle(family_handle)
return len(family.get_child_ref_list()) > 0
return (family is not None) and len(family.get_child_ref_list()) > 0
@@ -40,7 +40,7 @@ from _MatchesFilter import MatchesFilter
# IsAncestorOfFilterMatch
#
#-------------------------------------------------------------------------
class IsAncestorOfFilterMatch(IsAncestorOf,MatchesFilter):
class IsAncestorOfFilterMatch(IsAncestorOf):
"""Rule that checks for a person that is an ancestor of
someone matched by a filter"""
@@ -66,11 +66,11 @@ class IsAncestorOfFilterMatch(IsAncestorOf,MatchesFilter):
first = 1
filt = MatchesFilter(self.list[0:1])
filt.prepare(db)
filt.requestprepare(db)
for person in db.iter_people():
if filt.apply(db, person):
self.init_ancestor_list(db, person, first)
filt.reset()
filt.requestreset()
def reset(self):
self.map.clear()
@@ -32,6 +32,7 @@ from gen.ggettext import gettext as _
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules import Rule
from _MatchesFilter import MatchesFilter
#-------------------------------------------------------------------------
@@ -39,7 +40,7 @@ from _MatchesFilter import MatchesFilter
# IsChildOfFilterMatch
#
#-------------------------------------------------------------------------
class IsChildOfFilterMatch(MatchesFilter):
class IsChildOfFilterMatch(Rule):
"""Rule that checks for a person that is a child
of someone matched by a filter"""
@@ -52,11 +53,11 @@ class IsChildOfFilterMatch(MatchesFilter):
self.db = db
self.map = set()
filt = MatchesFilter(self.list)
filt.prepare(db)
filt.requestprepare(db)
for person in db.iter_people():
if filt.apply(db, person):
self.init_list(person)
filt.reset()
filt.requestreset()
def reset(self):
self.map.clear()
@@ -69,5 +70,6 @@ class IsChildOfFilterMatch(MatchesFilter):
return
for fam_id in person.get_family_handle_list():
fam = self.db.get_family_from_handle(fam_id)
self.map.update(child_ref.ref
for child_ref in fam.get_child_ref_list())
if fam:
self.map.update(child_ref.ref
for child_ref in fam.get_child_ref_list())
@@ -83,17 +83,18 @@ class IsDescendantFamilyOf(Rule):
for family_handle in person.get_family_handle_list():
family = self.db.get_family_from_handle(family_handle)
if family:
# Add every child recursively
for child_ref in family.get_child_ref_list():
if child_ref:
self.add_matches(self.db.get_person_from_handle(child_ref.ref))
# Add every child recursively
for child_ref in family.get_child_ref_list():
self.add_matches(self.db.get_person_from_handle(child_ref.ref))
# Add spouse
if person.handle == family.get_father_handle():
spouse_handle = family.get_mother_handle()
else:
spouse_handle = family.get_father_handle()
self.matches.add(spouse_handle)
# Add spouse
if person.handle == family.get_father_handle():
spouse_handle = family.get_mother_handle()
else:
spouse_handle = family.get_father_handle()
self.matches.add(spouse_handle)
def exclude(self):
# This removes root person and his/her spouses from the matches set
@@ -101,8 +102,9 @@ class IsDescendantFamilyOf(Rule):
self.matches.remove(self.root_person.handle)
for family_handle in self.root_person.get_family_handle_list():
family = self.db.get_family_from_handle(family_handle)
if self.root_person.handle == family.get_father_handle():
spouse_handle = family.get_mother_handle()
else:
spouse_handle = family.get_father_handle()
self.matches.remove(spouse_handle)
if family:
if self.root_person.handle == family.get_father_handle():
spouse_handle = family.get_mother_handle()
else:
spouse_handle = family.get_father_handle()
self.matches.remove(spouse_handle)
@@ -40,7 +40,7 @@ from _MatchesFilter import MatchesFilter
# IsDescendantOfFilterMatch
#
#-------------------------------------------------------------------------
class IsDescendantOfFilterMatch(IsDescendantOf,MatchesFilter):
class IsDescendantOfFilterMatch(IsDescendantOf):
"""Rule that checks for a person that is a descendant
of someone matched by a filter"""
@@ -66,11 +66,11 @@ class IsDescendantOfFilterMatch(IsDescendantOf,MatchesFilter):
first = 1
filt = MatchesFilter(self.list[0:1])
filt.prepare(db)
filt.requestprepare(db)
for person in db.iter_people():
if filt.apply(db, person):
self.init_list(person, first)
filt.reset()
filt.requestreset()
def reset(self):
self.map.clear()
@@ -75,6 +75,7 @@ class IsLessThanNthGenerationDescendantOf(Rule):
for fam_id in person.get_family_handle_list():
fam = self.db.get_family_from_handle(fam_id)
for child_ref in fam.get_child_ref_list():
self.init_list(
self.db.get_person_from_handle(child_ref.ref), gen+1)
if fam:
for child_ref in fam.get_child_ref_list():
self.init_list(
self.db.get_person_from_handle(child_ref.ref), gen+1)
@@ -73,6 +73,7 @@ class IsMoreThanNthGenerationDescendantOf(Rule):
for fam_id in person.get_family_handle_list():
fam = self.db.get_family_from_handle(fam_id)
for child_ref in fam.get_child_ref_list():
self.init_list(
self.db.get_person_from_handle(child_ref.ref), gen+1)
if fam:
for child_ref in fam.get_child_ref_list():
self.init_list(
self.db.get_person_from_handle(child_ref.ref), gen+1)
@@ -32,6 +32,7 @@ from gen.ggettext import gettext as _
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules import Rule
from _MatchesFilter import MatchesFilter
#-------------------------------------------------------------------------
@@ -39,7 +40,7 @@ from _MatchesFilter import MatchesFilter
# IsParentOfFilterMatch
#
#-------------------------------------------------------------------------
class IsParentOfFilterMatch(MatchesFilter):
class IsParentOfFilterMatch(Rule):
"""Rule that checks for a person that is a parent
of someone matched by a filter"""
@@ -52,11 +53,11 @@ class IsParentOfFilterMatch(MatchesFilter):
self.db = db
self.map = set()
filt = MatchesFilter(self.list)
filt.prepare(db)
filt.requestprepare(db)
for person in db.iter_people():
if filt.apply(db, person):
self.init_list(person)
filt.reset()
filt.requestreset()
def reset(self):
self.map.clear()
@@ -67,6 +68,9 @@ class IsParentOfFilterMatch(MatchesFilter):
def init_list(self,person):
for fam_id in person.get_parent_family_handle_list():
fam = self.db.get_family_from_handle(fam_id)
self.map.update(parent_id
for parent_id in [fam.get_father_handle(), fam.get_mother_handle()]
if parent_id)
if fam:
self.map.update(parent_id
for parent_id in [fam.get_father_handle(),
fam.get_mother_handle()]
if parent_id)
@@ -32,6 +32,7 @@ from gen.ggettext import gettext as _
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules import Rule
from _MatchesFilter import MatchesFilter
#-------------------------------------------------------------------------
@@ -39,7 +40,7 @@ from _MatchesFilter import MatchesFilter
# IsSiblingOfFilterMatch
#
#-------------------------------------------------------------------------
class IsSiblingOfFilterMatch(MatchesFilter):
class IsSiblingOfFilterMatch(Rule):
"""Rule that checks for siblings of someone matched by a filter"""
labels = [ _('Filter name:') ]
@@ -51,11 +52,11 @@ class IsSiblingOfFilterMatch(MatchesFilter):
self.db = db
self.map = set()
filt = MatchesFilter(self.list)
filt.prepare(db)
filt.requestprepare(db)
for person in db.iter_people():
if filt.apply (db, person):
self.init_list (person)
filt.reset()
filt.requestreset()
def reset(self):
self.map.clear()
@@ -71,4 +72,4 @@ class IsSiblingOfFilterMatch(MatchesFilter):
if fam:
self.map.update(child_ref.ref
for child_ref in fam.get_child_ref_list()
if child_ref.ref != person.handle)
if child_ref and child_ref.ref != person.handle)
@@ -32,6 +32,7 @@ from gen.ggettext import gettext as _
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules import Rule
from _MatchesFilter import MatchesFilter
#-------------------------------------------------------------------------
@@ -39,7 +40,7 @@ from _MatchesFilter import MatchesFilter
# IsSpouseOfFilterMatch
#
#-------------------------------------------------------------------------
class IsSpouseOfFilterMatch(MatchesFilter):
class IsSpouseOfFilterMatch(Rule):
"""Rule that checks for a person married to someone matching
a filter"""
@@ -50,16 +51,21 @@ class IsSpouseOfFilterMatch(MatchesFilter):
def prepare(self,db):
self.filt = MatchesFilter (self.list)
self.filt.prepare(db)
self.filt.requestprepare(db)
def apply(self,db,person):
for family_handle in person.get_family_handle_list ():
family = db.get_family_from_handle(family_handle)
for spouse_id in [family.get_father_handle (), family.get_mother_handle ()]:
if not spouse_id:
continue
if spouse_id == person.handle:
continue
if self.filt.apply (db, db.get_person_from_handle( spouse_id)):
return True
if family:
for spouse_id in [family.get_father_handle(),
family.get_mother_handle()]:
if not spouse_id:
continue
if spouse_id == person.handle:
continue
if self.filt.apply (db, db.get_person_from_handle( spouse_id)):
return True
return False
def reset(self):
self.filt.requestreset()
+1 -1
View File
@@ -48,7 +48,7 @@ class IsWitness(Rule):
def apply(self,db,person):
for event_ref in person.event_ref_list:
if event_ref.role == EventRoleType.WITNESS:
if event_ref and event_ref.role == EventRoleType.WITNESS:
# This is the witness.
# If event type was given, then check it.
if self.list[0]:
+7 -6
View File
@@ -53,10 +53,11 @@ class MissingParent(Rule):
return True
for family_handle in person.get_parent_family_handle_list():
family = db.get_family_from_handle(family_handle)
father_handle = family.get_father_handle()
mother_handle = family.get_mother_handle()
if not father_handle:
return True
if not mother_handle:
return True
if family:
father_handle = family.get_father_handle()
mother_handle = family.get_mother_handle()
if not father_handle:
return True
if not mother_handle:
return True
return False
+1 -1
View File
@@ -43,7 +43,7 @@ class HasRepository(Rule):
labels = [ _('Number of instances:'), _('Number must be:')]
name = _('Sources with <count> Repository references')
description = _("Matches sources with certain number repository references")
description = _("Matches sources with a certain number of repository references")
category = _('General filters')
def prepare(self, db):
+7 -2
View File
@@ -2,6 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2010 Raphael Ackermann
#
# 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
@@ -40,7 +41,7 @@ from Filters.Rules import Rule
#
#-------------------------------------------------------------------------
class HasGrampsId(Rule):
"""Rule that checks for a person with a specific GRAMPS ID."""
"""Rule that checks for an object with a specific GRAMPS ID."""
labels = [ _('ID:') ]
name = _('Object with <Id>')
@@ -48,4 +49,8 @@ class HasGrampsId(Rule):
category = _('General filters')
def apply(self, db, obj):
return obj.gramps_id.find(self.list[0]) !=-1
"""
apply the rule on the obj.
return true if the rule passes, false otherwise.
"""
return obj.gramps_id == self.list[0]
+1 -1
View File
@@ -59,7 +59,7 @@ class HasNoteRegexBase(Rule):
notelist = person.get_note_list()
for notehandle in notelist:
note = db.get_note_from_handle(notehandle)
n = unicode(note.get())
n = note.get()
if self.match.match(n) is not None:
return True
return False
+1 -1
View File
@@ -50,7 +50,7 @@ class HasNoteSubstrBase(Rule):
notelist = person.get_note_list()
for notehandle in notelist:
note = db.get_note_from_handle(notehandle)
n = unicode(note.get())
n = note.get()
if n.upper().find(self.list[0].upper()) != -1:
return True
return False
+1 -1
View File
@@ -43,7 +43,7 @@ class HasSourceBase(Rule):
labels = [ _('Number of instances:'), _('Number must be:')]
name = _('Objects with <count> sources')
description = _("Matches objects that have a certain number of sources")
description = _("Matches objects that have a certain number of sources connected to it")
category = _('General filters')
def prepare(self, db):
+4 -20
View File
@@ -55,34 +55,22 @@ class MatchesFilterBase(Rule):
category = _('General filters')
def prepare(self, db):
#if Filters.SystemFilters:
#for filt in Filters.SystemFilters.get_filters(self.namespace):
#if filt.get_name() == self.list[0]:
#for rule in filt.flist:
#rule.prepare(db)
if Filters.CustomFilters:
for filt in Filters.CustomFilters.get_filters(self.namespace):
if filt.get_name() == self.list[0]:
for rule in filt.flist:
rule.prepare(db)
rule.requestprepare(db)
break
def reset(self):
#if Filters.SystemFilters:
#for filt in Filters.SystemFilters.get_filters(self.namespace):
#if filt.get_name() == self.list[0]:
#for rule in filt.flist:
#rule.reset()
if Filters.CustomFilters:
for filt in Filters.CustomFilters.get_filters(self.namespace):
if filt.get_name() == self.list[0]:
for rule in filt.flist:
rule.reset()
rule.requestreset()
break
def apply(self, db, obj):
#if Filters.SystemFilters:
#for filt in Filters.SystemFilters.get_filters(self.namespace):
#if filt.get_name() == self.list[0]:
#return filt.check(db, obj.handle)
if Filters.CustomFilters:
for filt in Filters.CustomFilters.get_filters(self.namespace):
if filt.get_name() == self.list[0]:
@@ -93,10 +81,6 @@ class MatchesFilterBase(Rule):
"""
Return the selected filter or None.
"""
#if Filters.SystemFilters:
#for filt in Filters.SystemFilters.get_filters(self.namespace):
#if filt.get_name() == self.list[0]:
#return filt
if Filters.CustomFilters:
for filt in Filters.CustomFilters.get_filters(self.namespace):
if filt.get_name() == self.list[0]:
+33
View File
@@ -43,14 +43,47 @@ class Rule(object):
def __init__(self, arg):
self.set_list(arg)
self.nrprepare = 0
def is_empty(self):
return False
def requestprepare(self, db):
"""
Request that the prepare method of the rule is executed if needed
Special: Custom Filters have fixed values, so only one instance needs to
exists during a search. It is stored in a FilterStore, and initialized
once.
As filters are can be grouped in a group
filter, we request a prepare. Only the first time prepare will be
called
"""
if self.nrprepare == 0:
self.prepare(db)
self.nrprepare += 1
def prepare(self, db):
"""prepare so the rule can be executed efficiently"""
pass
def requestreset(self):
"""
Request that the reset method of the rule is executed if possible
Special: Custom Filters have fixed values, so only one instance needs to
exists during a search. It is stored in a FilterStore, and initialized
once.
As filters are can be grouped in a group
filter, we request a reset. Only the last time reset will be
called
"""
self.nrprepare -= 1
if self.nrprepare == 0:
self.reset()
def reset(self):
"""remove no longer needed memory"""
pass
def set_list(self, arg):
+2 -2
View File
@@ -27,6 +27,7 @@
#-------------------------------------------------------------------------
from xml.sax import make_parser, SAXParseException
import os
import sys
#-------------------------------------------------------------------------
#
@@ -84,8 +85,7 @@ class FilterList(object):
return l.replace('"', '&quot;')
def save(self):
f = open(self.file.encode('utf-8'), 'w')
f = open(self.file.encode(sys.getfilesystemencoding()), 'w')
f.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
f.write('<filters>\n')
for namespace in self.filter_namespaces:
+2 -2
View File
@@ -227,10 +227,10 @@ class GenericFilter(object):
"""
m = self.get_check_func()
for rule in self.flist:
rule.prepare(db)
rule.requestprepare(db)
res = m(db, id_list, progress, tupleind)
for rule in self.flist:
rule.reset()
rule.requestreset()
return res
class GenericFamilyFilter(GenericFilter):
+6 -2
View File
@@ -30,6 +30,7 @@ Package providing filtering framework for GRAMPS.
#
#-------------------------------------------------------------------------
from Filters._GenericFilter import GenericFilter
from Errors import FilterError
#-------------------------------------------------------------------------
#
@@ -58,8 +59,11 @@ class ParamFilter(GenericFilter):
new_list[ix] = self.param_list[ix]
rule.set_list(new_list)
for rule in self.flist:
rule.prepare(db)
if rule.nrprepare > 0:
raise FilterError, 'Custom filters can not twice be used' \
' in a parameter filter'
rule.requestprepare(db)
result = GenericFilter.apply(self, db, id_list)
for rule in self.flist:
rule.reset()
rule.requestreset()
return result
+13 -3
View File
@@ -79,6 +79,10 @@ class SearchBar(object):
return self.filterbar
def setup_filter( self, column_data ):
"""
column_data is a list of tuples:
[(trans_col_name, index, use_exact), ...]
"""
self.filter_model.clear()
old_value = self.filter_list.get_active()
@@ -88,11 +92,17 @@ class SearchBar(object):
self.filter_list.add_attribute(cell, 'text', 0)
maxval = 0
for col, index in column_data:
rule = _("%s contains") % col
for col, index, exact in column_data:
if exact:
rule = _("%s is") % col
else:
rule = _("%s contains") % col
self.filter_model.append(row=[rule, index, False])
maxval += 1
rule = _("%s does not contain") % col
if exact:
rule = _("%s is not") % col
else:
rule = _("%s does not contain") % col
self.filter_model.append(row=[rule, index, True])
maxval += 1
+1 -1
View File
@@ -124,7 +124,7 @@ class GrampsAboutDialog(gtk.AboutDialog):
"Distribution: %s")
% (elipses(str(const.VERSION)),
elipses(str(sys.version).replace('\n','')),
elipses(str(bsddb.__version__)),
elipses(str(bsddb.__version__) + " " + str(bsddb.db.version())),
elipses(os.environ.get('LANG','')),
elipses(operatingsystem),
elipses(distribution)))
+1 -1
View File
@@ -119,7 +119,7 @@ class ErrorReportAssistant(object):
"gobject version: %s\n"\
"cairo version : %s"\
% (str(sys.version).replace('\n',''),
str(bsddb.__version__),
str(bsddb.__version__) + " " + str(bsddb.db.version()),
str(const.VERSION),
os.environ.get('LANG',''),
operatingsystem,
+9
View File
@@ -38,6 +38,13 @@ import tempfile
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
#
# Gramps modules
#
#-------------------------------------------------------------------------
import Utils
#-------------------------------------------------------------------------
#
# resize_to_jpeg
@@ -110,6 +117,8 @@ def resize_to_jpeg_buffer(source, width, height):
filed, dest = tempfile.mkstemp()
img = gtk.gdk.pixbuf_new_from_file(source)
scaled = img.scale_simple(int(width), int(height), gtk.gdk.INTERP_BILINEAR)
os.close(filed)
dest = Utils.get_unicode_path_from_env_var(dest)
scaled.save(dest, 'jpeg')
ofile = open(dest, mode='rb')
data = ofile.read()
+3 -1
View File
@@ -91,7 +91,9 @@ class LdsTemples(object):
"""
returns a list of temple codes, temple name tuples
"""
return [(code, name) for name, code in self.__temple_codes.iteritems()]
return sorted([(code, name) for name, code
in self.__temple_codes.iteritems()],
key=lambda v: v[1])
def __start_element(self, tag, attrs):
"""
+2 -2
View File
@@ -437,8 +437,8 @@ class ManagedWindow(object):
if object is not None:
return object
raise ValueError, (
'ManagedWindow.get_widget: "%s" widget not found in "%s"' %
(name, self._gladeobj.get_name())
'ManagedWindow.get_widget: "%s" widget not found in "%s/%s"' %
(name, self._gladeobj.dirname, self._gladeobj.filename)
)
return object
+104 -19
View File
@@ -2,6 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2010 Michiel D. Nauta
#
# 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
@@ -433,8 +434,9 @@ class MergePeople(object):
self.db.set_birth_death_index(new)
# copy attributes
new.set_attribute_list(self.p1.get_attribute_list() +
# add other attributes to new, which may already have
# some attributes from the merger
map(new.add_attribute, self.p1.get_attribute_list() +
self.p2.get_attribute_list())
# copy addresses
@@ -594,32 +596,69 @@ class MergePeople(object):
self.old_handle, trans)
new.add_parent_family_handle(family_handle)
def merge_childref(self, ref_one, ref_two):
"""
Add the content of two child-references together where ref_one is the
preferred.
Data typically lost is: mrel/frel of ref_two.
"""
self.copy_note(ref_one, ref_two)
self.copy_sources(ref_one, ref_two)
ref_one.set_privacy(ref_one.get_privacy() or ref_two.get_privacy())
one_frel = ref_one.get_father_relation()
one_mrel = ref_one.get_mother_relation()
two_frel = ref_two.get_father_relation()
two_mrel = ref_two.get_mother_relation()
if (one_mrel != two_mrel) or (one_frel != two_frel):
if one_mrel == gen.lib.ChildRefType.UNKNOWN:
ref_one.set_mother_relation(two_mrel)
if one_frel == gen.lib.ChildRefType.UNKNOWN:
ref_one.set_father_relation(two_frel)
def convert_child_ids(self, fhandle, new_handle, old_handle, trans):
"""
Search the family associated with fhandle, and replace
old handle with the new handle in all child references.
There are three situations: The child references list contains
a reference to new_handle, but not old_handle, vice versa and
references to both new AND old_handle. In the first case nothing needs
to be done, in the second case the old_handle needs replacement by
new_handle and in the latter case the references must be merged.
:param fhandle: Handle of the family to process.
:type fhandle: database handle
:param new_handle: Handle that should replace any old_handle.
:type new_handle: database handle
:param old_handle: Handle of obsolete person.
:type old_handle: database handle
:param trans: database transaction
:type trans: I don't know, probably string
"""
family = self.db.get_family_from_handle(fhandle)
orig_ref_list = family.get_child_ref_list()
new_ref_list = []
# loop through original child list. If a handle matches the
# old handle, replace it with the new handle if the new handle
# is not already in the list
old_ref = [x for x in orig_ref_list if x.ref == old_handle]
if old_ref:
old_ref = old_ref[0]
new_ref = [x for x in orig_ref_list if x.ref == new_handle]
if new_ref:
new_ref = new_ref[0]
for child_ref in orig_ref_list:
if child_ref.ref == old_handle:
if new_handle not in [ref.ref for ref in new_ref_list]:
new_ref = gen.lib.ChildRef()
new_ref.ref = new_handle
new_ref_list.append(new_ref)
elif child_ref.ref not in [ref.ref for ref in new_ref_list]:
if old_ref:
for child_ref in orig_ref_list:
if child_ref.ref == old_handle:
if new_ref:
continue # go on to child_ref.ref == new_handle
else:
child_ref.ref = new_handle
elif child_ref.ref == new_handle:
self.merge_childref(child_ref, old_ref)
new_ref_list.append(child_ref)
# compare the new list with the original list. If this list
# is different, we need to save the changes to the database.
if [ref.ref for ref in new_ref_list] \
!= [ref.ref for ref in orig_ref_list]:
# save changes to database
family.set_child_ref_list(new_ref_list)
self.db.commit_family(family, trans)
@@ -769,6 +808,27 @@ class MergePeople(object):
return myfamily
def merge_existing_family(self, new, src_family, tgt_family, trans):
"""
Removes the family object that becomes superfluous because of the
merger of a person.
If a person is merged with another, there can be a situation that two
families that are in the database also need to merge; that is one
family stays on and receives extra data, the other family is removed.
Removal of a family involves removal of parentin attributes in a person,
removal of childof attributes from children and actual removal of the
family from the db. The merging of data from both families is performed
in its own method.
:param new: The person that is merging.
:type new: :class:`~gen.lib.person.Person`
:param src_family: Family `new` is a parent in and that will be removed.
:type src_family: :class:`~gen.lib.family.Family`
:param tgt_family: Family `new` is and will stay a parent in.
:type src_family: :class:`~gen.lib.family.Family`
:param trans: db-transaction
:type trans: I do not know, string probably
"""
src_family_handle = src_family.get_handle()
@@ -813,13 +873,38 @@ class MergePeople(object):
new.add_family_handle(tgt_family.get_handle())
def merge_family_pair(self, tgt_family, src_family, trans):
"""
Add data from src_family to tgt_family.
This is typically called when src_family is about to be removed because
it became superfluous by a person merger. The data transfered from
source to target family is everything except id, father and mother.
Data typically lost is: marker and rel of the src-family.
Missing: lds_ord, Merged Gramps ID attribute and privacy; make own patch
:param tgt_family: Family receiving data from src_family.
:type src_family: :class:`~gen.lib.family.Family`
:param src_family: Family adding data to tgt_family.
:type src_family: :class:`~gen.lib.family.Family`
:param trans: db-transaction
:type trans: I do not know, string probably
"""
childrefs_in_both = {}
tgtlist = tgt_family.get_child_ref_list()
for child_ref in src_family.get_child_ref_list():
for tgt_child_ref in tgtlist:
if tgt_child_ref.ref == child_ref.ref:
childrefs_in_both[child_ref.ref] = tgt_child_ref
break
tgt_family_child_handles = \
[ref.ref for ref in tgt_family.get_child_ref_list()]
# copy children from source to target
for child_ref in src_family.get_child_ref_list():
child_handle = child_ref.ref
if child_handle not in tgt_family_child_handles:
if child_handle in childrefs_in_both:
tgt_child_ref = childrefs_in_both[child_handle]
self.merge_childref(tgt_child_ref, child_ref)
else:
child = self.db.get_person_from_handle(child_handle)
parents = child.get_parent_family_handle_list()
tgt_family.add_child_ref(child_ref)
+60
View File
@@ -241,6 +241,38 @@ def __convert_using_classic_repr(stringValue, typedeg):
return __convert_structure_to_float(sign, degs, mins, secs)
def __convert_using_modgedcom_repr(val, typedeg):
""" helper function that tries to convert the string using the
modified GEDCOM representation where direction [NSEW] is appended
instead of prepended. This particular representation is the result
of value normalization done on values passed to this function
"""
if typedeg == 'lat':
pos = val.find('N')
if pos >= 0:
stringValue = val[:pos]
else:
pos = val.find('S')
if pos >= 0:
stringValue = '-' + val[:pos]
else:
return None
else:
pos = val.find('E')
if pos >= 0:
stringValue = val[:pos]
else:
pos = val.find('W')
if pos >= 0:
stringValue = '-' + val[:pos]
else:
return None
try :
v = float(stringValue)
return v
except ValueError :
return None;
def __convert_float_val(val, typedeg = "lat"):
# function converting input to float, recognizing decimal input, or
# degree notation input. Only english input
@@ -270,6 +302,11 @@ def __convert_float_val(val, typedeg = "lat"):
v = __convert_using_classic_repr(val, typedeg)
if v is not None :
return v
# format XX.YYYY[NSWE]
v = __convert_using_modgedcom_repr(val, typedeg)
if v is not None :
return v
# no format succeeded
return None
@@ -364,6 +401,24 @@ def conv_lat_lon(latitude, longitude, format="D.D4"):
else:
return ("%.8f" % lat_float , str_lon)
if format == "GEDCOM":
# The 5.5.1 spec is inconsistent. Length is supposedly 5 to 8 chars,
# but the sample values are longer, using up to 6 fraction digits.
# As a compromise, we will produce up to 6 fraction digits, but only
# if necessary
# correct possible roundoff error
if lon_float >= 0:
str_lon = "%.6f" % (lon_float)
if str_lon == "180.000000":
str_lon ="W180.000000"
else:
str_lon = "E" + str_lon
else:
str_lon = "W" + "%.6f" % (-lon_float)
str_lon = str_lon[:-5] + str_lon[-5:].rstrip("0")
str_lat = ("%s%.6f" % (("N", lat_float) if lat_float >= 0 else ("S", -lat_float)))
str_lat = str_lat[:-5] + str_lat[-5:].rstrip("0")
return (str_lat, str_lon)
deg_lat = int(lat_float)
deg_lon = int(lon_float)
@@ -624,6 +679,7 @@ if __name__ == '__main__':
format5 = "ISO-DM"
format6 = "ISO-DMS"
format7 = "RT90"
format8 = "GEDCOM"
print "Testing conv_lat_lon function, "+text+':'
res1, res2 = conv_lat_lon(lat1,lon1,format0)
print lat1,lon1,"in format",format0, "is ",res1,res2
@@ -641,6 +697,8 @@ if __name__ == '__main__':
print lat1,lon1,"in format",format6, "is",res
res1, res2 = conv_lat_lon(lat1,lon1,format7)
print lat1,lon1,"in format",format7, "is",res1,res2,"\n"
res1, res2 = conv_lat_lon(lat1,lon1,format8)
print lat1,lon1,"in format",format8, "is",res1,res2,"\n"
def test_formats_fail(lat1,lon1,text=''):
print "This test should make conv_lat_lon function fail, "+text+":"
@@ -687,6 +745,8 @@ if __name__ == '__main__':
# test precision
lat, lon = u' 50°59.99"S', u' 2°59\'59.99"E'
test_formats_success(lat,lon)
lat, lon = 'N50.849888888888', 'E2.885897222222'
test_formats_success(lat,lon)
# to large value of lat
lat, lon = '90.849888888888', '2.885897222222'
test_formats_fail(lat,lon)
+2 -4
View File
@@ -700,9 +700,7 @@ class GuiNoteOption(gtk.HBox):
"""
if note:
note_id = note.get_gramps_id()
txt = " ".join(note.get().split())
#String must be unicode for truncation to work for non ascii characters
txt = unicode(txt)
txt = u" ".join(note.get().split())
if len(txt) > 35:
txt = txt[:35] + "..."
txt = "%s [%s]" % (txt, note_id)
@@ -1277,7 +1275,7 @@ class GuiDestinationOption(gtk.HBox):
status = fcd.run()
if status == gtk.RESPONSE_OK:
path = Utils.get_unicode_path(fcd.get_filename())
path = Utils.get_unicode_path_from_file_chooser(fcd.get_filename())
if path:
if not self.__option.get_directory_entry() and \
not path.endswith(self.__option.get_extension()):
+25 -9
View File
@@ -200,7 +200,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
gtk.DIALOG_DESTROY_WITH_PARENT,
(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)),
None, self.title)
self.window.set_size_request(600, 400)
self.window.set_size_request(750, 400)
self.window.connect('response', self.close)
notebook = gtk.Notebook()
@@ -218,15 +218,18 @@ class PluginStatus(ManagedWindow.ManagedWindow):
self.list_reg.connect('button-press-event', self.button_press_reg)
col0_reg = gtk.TreeViewColumn(_('Type'), gtk.CellRendererText(), text=0)
col0_reg.set_sort_column_id(0)
col0_reg.set_resizable(True)
self.list_reg.append_column(col0_reg)
col = gtk.TreeViewColumn(_('Status'), gtk.CellRendererText(), markup=1)
col.set_sort_column_id(1)
self.list_reg.append_column(col)
col2_reg = gtk.TreeViewColumn(_('Name'), gtk.CellRendererText(), text=2)
col2_reg.set_sort_column_id(2)
col2_reg.set_resizable(True)
self.list_reg.append_column(col2_reg)
col = gtk.TreeViewColumn(_('Description'), gtk.CellRendererText(), text=3)
col.set_sort_column_id(3)
col.set_resizable(True)
self.list_reg.append_column(col)
self.list_reg.set_search_column(2)
@@ -267,10 +270,12 @@ class PluginStatus(ManagedWindow.ManagedWindow):
col = gtk.TreeViewColumn(_('Loaded'), gtk.CellRendererText(),
markup=0)
col.set_sort_column_id(0)
col.set_resizable(True)
self.list.append_column(col)
col1 = gtk.TreeViewColumn(_('File'), gtk.CellRendererText(),
text=1)
col1.set_sort_column_id(1)
col1.set_resizable(True)
self.list.append_column(col1)
col = gtk.TreeViewColumn(_('Status'), gtk.CellRendererText(),
markup=5)
@@ -278,6 +283,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
self.list.append_column(col)
col2 = gtk.TreeViewColumn(_('Message'), gtk.CellRendererText(), text=2)
col2.set_sort_column_id(2)
col2.set_resizable(True)
self.list.append_column(col2)
self.list.set_search_column(1)
@@ -350,7 +356,10 @@ class PluginStatus(ManagedWindow.ManagedWindow):
scrolled_window.add(self.addon_list)
install_page.pack_start(scrolled_window)
install_page.pack_start(install_row, expand=True, fill=False)
#add some spce under the scrollbar
install_page.pack_start(gtk.Label(''), expand=False, fill=False)
#path to addon path line
install_page.pack_start(install_row, expand=False, fill=False)
hbutbox = gtk.HButtonBox()
hbutbox.set_layout(gtk.BUTTONBOX_SPREAD)
@@ -382,6 +391,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
self.window.show_all()
self.__populate_lists()
self.list_reg.columns_autosize()
def __refresh_addon_list(self, obj):
"""
@@ -571,7 +581,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
callback(" " + (_("'%s' is for this version of Gramps.") % gpr_file) + "\n")
else:
# If the plugin is for another version; inform and do nothing
callback(" " + (_("'%s' is for NOT this version of Gramps.") % gpr_file) + "\n")
callback(" " + (_("'%s' is NOT for this version of Gramps.") % gpr_file) + "\n")
callback(" " + (_("It is for version %d.%d" % vtup) + "\n"))
continue
else:
@@ -591,7 +601,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
# But don't use converted filenames
# in the call to self.__pmgr.reg_plugins
# as that will break in reg_plugins.
u_gpr_file = unicode(gpr_file, sys.getfilesystemencoding())
u_gpr_file = Utils.get_unicode_path_from_file_chooser(gpr_file)
callback(" " + (_("Registered '%s'") % u_gpr_file) + "\n")
self.__pmgr.reg_plugins(gpr_file)
@@ -606,14 +616,20 @@ class PluginStatus(ManagedWindow.ManagedWindow):
gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN,
gtk.RESPONSE_OK))
name = os.path.abspath(self.install_addon_path.get_text())
fcd.set_current_name(name)
name = self.install_addon_path.get_text()
dir = os.path.dirname(name)
if not os.path.isdir(dir):
dir = const.USER_HOME
name = ''
elif not os.path.isfile(name):
name = ''
fcd.set_current_folder(dir)
if name:
fcd.set_filename(name)
status = fcd.run()
if status == gtk.RESPONSE_OK:
path = Utils.get_unicode_path(fcd.get_filename())
path = Utils.get_unicode_path_from_file_chooser(fcd.get_filename())
if path:
self.install_addon_path.set_text(path)
fcd.destroy()
@@ -790,8 +806,8 @@ Location: %(fpath)s
model, node = selection.get_selected()
if not node:
return
id = model.get_value(node, id_col)
pdata = self.__preg.get_plugin(id)
idv = model.get_value(node, id_col)
pdata = self.__preg.get_plugin(idv)
self.__pmgr.load_plugin(pdata)
self.__rebuild_load_list()
+6 -3
View File
@@ -25,7 +25,7 @@
# Standard python modules
#
#-------------------------------------------------------------------------
from gen.ggettext import gettext as _
import sys
#-------------------------------------------------------------------------
#
@@ -43,6 +43,7 @@ from gtk.gdk import pixbuf_new_from_file
import const
import config
from glade import Glade
from gen.ggettext import gettext as _
try:
ICON = pixbuf_new_from_file(const.ICON)
@@ -186,6 +187,7 @@ class ErrorDialog(gtk.MessageDialog):
class RunDatabaseRepair(ErrorDialog):
def __init__(self, msg, parent=None):
msg = unicode(msg.decode(sys.getfilesystemencoding()))
ErrorDialog.__init__(
self,
_('Error detected in database'),
@@ -193,17 +195,18 @@ class RunDatabaseRepair(ErrorDialog):
'usually be resolved by running the "Check and Repair Database" '
'tool.\n\nIf this problem continues to exist after running this '
'tool, please file a bug report at '
'http://bugs.gramps-project.org\n\n') + str(msg), parent)
'http://bugs.gramps-project.org\n\n') + msg, parent)
class DBErrorDialog(ErrorDialog):
def __init__(self, msg, parent=None):
msg = unicode(msg.decode(sys.getfilesystemencoding()))
ErrorDialog.__init__(
self,
_("Low level database corruption detected"),
_("Gramps has detected a problem in the underlying "
"Berkeley database. This can be repaired by from "
"the Family Tree Manager. Select the database and "
'click on the Repair button') + '\n\n' + str(msg), parent)
'click on the Repair button') + '\n\n' + msg, parent)
class WarningDialog(gtk.MessageDialog):
def __init__(self, msg1, msg2="", parent=None):
+3 -2
View File
@@ -1330,6 +1330,7 @@ class RelationshipCalculator(object):
all_dist=True,
all_families=True, only_birth=False)
if not data[0][0] == -1:
data = self.collapse_relations(data)
for rel in data :
rel2 = rel[2]
rel4 = rel[4]
@@ -1360,13 +1361,13 @@ class RelationshipCalculator(object):
if not rel_str in relstrings:
relstrings.append(rel_str)
if rel1:
commons[rel_str] = [rel1]
commons[rel_str] = rel1
else:
#unknown parent eg
commons[rel_str] = []
else:
if rel1:
commons[rel_str].append(rel1)
commons[rel_str].extend(rel1)
#construct the return tupply, relstrings is ordered on rank automatic
common_list = []
for rel_str in relstrings:
+3 -1
View File
@@ -1,7 +1,8 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2006 Donald N. Allingham
# Copyright (C) 2001-2006 Donald N. Allingham
# Copyright (C) 2010 Rob G. Healey <robhealey1@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
@@ -62,6 +63,7 @@ book_categories = {
CSS_FILES = [
# First is used as default selection.
[_("Basic-Ash"), 'Web_Basic-Ash.css'],
[_("Basic-Blue"), 'Web_Basic-Blue.css'],
[_("Basic-Cypress"), 'Web_Basic-Cypress.css'],
[_("Basic-Lilac"), 'Web_Basic-Lilac.css'],
[_("Basic-Peach"), 'Web_Basic-Peach.css'],
+4 -1
View File
@@ -24,6 +24,7 @@
Provide utilities for printing endnotes in text reports.
"""
from gen.plug.docgen import FontStyle, ParagraphStyle, FONT_SANS_SERIF
from gen.lib import NoteType
from gen.ggettext import gettext as _
def add_endnote_styles(style_sheet):
@@ -147,7 +148,9 @@ def write_endnotes(bibliography, database, doc, printnotes=False):
'type': str(note.get_type())})
doc.end_paragraph()
doc.write_styled_note(note.get_styledtext(),
note.get_format(),'Endnotes-Notes')
note.get_format(),'Endnotes-Notes',
contains_html= note.get_type() \
== NoteType.HTML_CODE)
ind += 1
def _format_source_text(source):
+1 -1
View File
@@ -73,7 +73,7 @@ class FileEntry(gtk.HBox):
dialog.present()
status = dialog.run()
if status == gtk.RESPONSE_OK:
self.set_filename(Utils.get_unicode_path(dialog.get_filename()))
self.set_filename(Utils.get_unicode_path_from_file_chooser(dialog.get_filename()))
dialog.destroy()
def set_filename(self, path):
+42 -11
View File
@@ -34,6 +34,8 @@ import threading
import time
from types import ClassType, InstanceType
from gen.ggettext import gettext as _
from subprocess import Popen, PIPE
import sys
#-------------------------------------------------------------------------------
#
@@ -446,7 +448,16 @@ class GVPsDoc(GVDocBase):
# but the output is clipped, some margins have disappeared. I used 1 inch margins always.
# See bug tracker issue 2815
os.system( 'dot -Tps:cairo -o"%s" "%s"' % (self._filename, tmp_dot) )
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
command = 'dot -Tps:cairo -o"%s" "%s"' % (fname, tmp_dot)
dotversion = Popen(['dot', '-V'], stderr=PIPE).communicate(input=None)[1]
# Problem with dot 2.26.3 and multiple pages, which gives "cairo: out of memory"
# If the :cairo is skipped for these cases it gives acceptable result.
if dotversion.find('2.26.3') != -1 and (self.vpages * self.hpages) > 1:
command=command.replace(':cairo','')
os.system(command)
# Delete the temporary dot file
os.remove(tmp_dot)
@@ -489,9 +500,11 @@ class GVSvgDoc(GVDocBase):
dotfile = os.fdopen(handle,"w")
dotfile.write(self._dot.getvalue())
dotfile.close()
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
# Generate the SVG file.
os.system( 'dot -Tsvg -o"%s" "%s"' % (self._filename, tmp_dot) )
os.system( 'dot -Tsvg -o"%s" "%s"' % (fname, tmp_dot) )
# Delete the temporary dot file
os.remove(tmp_dot)
@@ -535,9 +548,11 @@ class GVSvgzDoc(GVDocBase):
dotfile = os.fdopen(handle,"w")
dotfile.write(self._dot.getvalue())
dotfile.close()
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
# Generate the SVGZ file.
os.system( 'dot -Tsvgz -o"%s" "%s"' % (self._filename, tmp_dot) )
os.system( 'dot -Tsvgz -o"%s" "%s"' % (fname, tmp_dot) )
# Delete the temporary dot file
os.remove(tmp_dot)
@@ -581,9 +596,11 @@ class GVPngDoc(GVDocBase):
dotfile = os.fdopen(handle,"w")
dotfile.write(self._dot.getvalue())
dotfile.close()
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
# Generate the PNG file.
os.system( 'dot -Tpng -o"%s" "%s"' % (self._filename, tmp_dot) )
os.system( 'dot -Tpng -o"%s" "%s"' % (fname, tmp_dot) )
# Delete the temporary dot file
os.remove(tmp_dot)
@@ -627,9 +644,11 @@ class GVJpegDoc(GVDocBase):
dotfile = os.fdopen(handle,"w")
dotfile.write(self._dot.getvalue())
dotfile.close()
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
# Generate the JPEG file.
os.system( 'dot -Tjpg -o"%s" "%s"' % (self._filename, tmp_dot) )
os.system( 'dot -Tjpg -o"%s" "%s"' % (fname, tmp_dot) )
# Delete the temporary dot file
os.remove(tmp_dot)
@@ -673,9 +692,11 @@ class GVGifDoc(GVDocBase):
dotfile = os.fdopen(handle,"w")
dotfile.write(self._dot.getvalue())
dotfile.close()
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
# Generate the GIF file.
os.system( 'dot -Tgif -o"%s" "%s"' % (self._filename, tmp_dot) )
os.system( 'dot -Tgif -o"%s" "%s"' % (fname, tmp_dot) )
# Delete the temporary dot file
os.remove(tmp_dot)
@@ -722,13 +743,16 @@ class GVPdfGvDoc(GVDocBase):
dotfile = os.fdopen(handle,"w")
dotfile.write(self._dot.getvalue())
dotfile.close()
# Covert filename to str using file system encoding.
fname = self._filename.encode(sys.getfilesystemencoding())
# Generate the PDF file.
os.system( 'dot -Tpdf -o"%s" "%s"' % (self._filename, tmp_dot) )
command = 'dot -Tpdf -o"%s" "%s"' % (fname, tmp_dot)
os.system( command )
# Delete the temporary dot file
os.remove(tmp_dot)
if self.open_req:
open_file_with_default_application(self._filename)
@@ -775,6 +799,11 @@ class GVPdfGsDoc(GVDocBase):
# Reason for using -Tps:cairo. Needed for Non Latin-1 letters
# See bug tracker issue 2815
command = 'dot -Tps:cairo -o"%s" "%s"' % ( tmp_ps, tmp_dot )
dotversion = Popen(['dot', '-V'], stderr=PIPE).communicate(input=None)[1]
# Problem with dot 2.26.3 and multiple pages, which gives "cairo: out of memory"
# If the :cairo is skipped for these cases it gives acceptable result.
if dotversion.find('2.26.3') != -1 and (self.vpages * self.hpages) > 1:
command=command.replace(':cairo','')
os.system(command)
# Add .5 to remove rounding errors.
@@ -783,9 +812,11 @@ class GVPdfGsDoc(GVDocBase):
height_pt = int( (paper_size.get_height_inches() * 72) + 0.5 )
# Convert to PDF using ghostscript
fname = self._filename.encode(sys.getfilesystemencoding())
command = '%s -q -sDEVICE=pdfwrite -dNOPAUSE -dDEVICEWIDTHPOINTS=%d' \
' -dDEVICEHEIGHTPOINTS=%d -sOutputFile="%s" "%s" -c quit' \
% ( _GS_CMD, width_pt, height_pt, self._filename, tmp_ps )
% ( _GS_CMD, width_pt, height_pt, fname, tmp_ps )
os.system(command)
os.remove(tmp_ps)

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