Compare commits
850 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04a0c578db | |||
| 405572cbdc | |||
| cf943afcd5 | |||
| d7178e96d7 | |||
| ee91b33a43 | |||
| 920535e3f6 | |||
| a3556d839b | |||
| 460497f489 | |||
| 4d89c9da3b | |||
| 7400976c96 | |||
| 7b66d246b8 | |||
| ac5693c97f | |||
| 3cfbd2482d | |||
| ada8c30955 | |||
| 4e595d0cf3 | |||
| 90379b7b42 | |||
| b3d8e3c857 | |||
| 5013162ded | |||
| 371205ec70 | |||
| 0ca48dd811 | |||
| 043d35a354 | |||
| e9599d762d | |||
| f111dcbad9 | |||
| bb248fadce | |||
| 84edfee57b | |||
| 6011cb3ec9 | |||
| fa41e63f5a | |||
| 86ed7108d2 | |||
| 846e472e09 | |||
| 7956bf8b39 | |||
| 01afd075a7 | |||
| 9f9af706a4 | |||
| 4eec493f66 | |||
| 38e87b074e | |||
| 3da3a57960 | |||
| 91856cfb1f | |||
| 0e928d6b81 | |||
| e9388c3ff7 | |||
| 19950c616d | |||
| fa6014f4c0 | |||
| 5d4246b0a7 | |||
| e24b184508 | |||
| c2dc10471c | |||
| fe311affb2 | |||
| a1ec3e54b8 | |||
| 3fed4b1951 | |||
| a151bafaff | |||
| 5c30db0739 | |||
| bf8146b9d1 | |||
| 5d3480997b | |||
| 35df75718f | |||
| 2a114aa6c0 | |||
| b28e9950a0 | |||
| b0b620df9c | |||
| 3c151885ee | |||
| 5b975f93cc | |||
| 1d5bcbf423 | |||
| 5ed53f5e9c | |||
| 7c110d15b8 | |||
| 69b845c388 | |||
| 1f9eee3d92 | |||
| 47e3d110d5 | |||
| ea90894193 | |||
| b11e4558b8 | |||
| bdd07988c6 | |||
| ecef5c1d26 | |||
| b72617c5aa | |||
| 19765f80e7 | |||
| ee75d5ca5f | |||
| 638ac9c281 | |||
| 5646fecffc | |||
| 5583ab113e | |||
| ac7210d0ba | |||
| acf10439e0 | |||
| 1a6da114fc | |||
| 7151e07d3a | |||
| c14fbafd25 | |||
| c3c1fb6bb6 | |||
| 00f738f953 | |||
| b62c42d85e | |||
| 8e3aad341b | |||
| db6f649969 | |||
| fcef732f93 | |||
| 1b884b129d | |||
| 01e354f18d | |||
| bb46e8798b | |||
| cab9169019 | |||
| 1a2c3be090 | |||
| a3402ab728 | |||
| 9dfba96783 | |||
| 88667a7c5e | |||
| 63d5ea6cb6 | |||
| 5ad5cb17ae | |||
| 19e662fd97 | |||
| b253edb7dd | |||
| 7758caa4e3 | |||
| 88a4bbb926 | |||
| 0fa7b97cf9 | |||
| 72af4a2483 | |||
| b0bf67f436 | |||
| a74d5151f8 | |||
| e7d365a5d7 | |||
| c9f82192b1 | |||
| f3c5254bbe | |||
| f6f7e6c870 | |||
| 726da689c6 | |||
| 5ae9f75ded | |||
| 500c0d6bf1 | |||
| d86759b5a7 | |||
| 3154f970ac | |||
| d441154d3a | |||
| fa09584578 | |||
| 21651501ca | |||
| 2789f19366 | |||
| 94f0d17c8b | |||
| 6a26f7b873 | |||
| 14a5f9a1b8 | |||
| 41931ba9c0 | |||
| 918b052ebb | |||
| ddf488c8b0 | |||
| 838ba4cf05 | |||
| 280e904d80 | |||
| 6224028253 | |||
| 04d60b30ff | |||
| 9492b706b6 | |||
| 00aaa7197a | |||
| 5f7d9daaef | |||
| 02c68684d6 | |||
| ee9649f5b3 | |||
| bc6b0e6fdf | |||
| 4617fa8f50 | |||
| 7109925ffb | |||
| c4b472b9c5 | |||
| 5ea17d75bc | |||
| 64a532d38d | |||
| be131c368d | |||
| 5ad0aa48dc | |||
| 40820ea6ea | |||
| 3551fe851a | |||
| f3c614add6 | |||
| 6a781138fe | |||
| f3fb0b9d2e | |||
| e7c741a2a7 | |||
| 7c6cba4fae | |||
| f9af188191 | |||
| 506f9dc643 | |||
| 99101d2166 | |||
| 534fac7b93 | |||
| 418d7dd39f | |||
| 6b595c534e | |||
| f378a193e0 | |||
| b3e313d5ce | |||
| 2fc5096d23 | |||
| e9ad85a05c | |||
| 113b2a0214 | |||
| 264d6145be | |||
| 961c1e4ca9 | |||
| 5870e0a686 | |||
| b2886e3dad | |||
| 864c79e446 | |||
| 919f632993 | |||
| 0199cd7da5 | |||
| abd7b09450 | |||
| f55cd42926 | |||
| aca9b9cb5c | |||
| e3cd87484c | |||
| 981cda7c19 | |||
| 634453708f | |||
| 315d7621c1 | |||
| 77fa72cc35 | |||
| b0060b7542 | |||
| 791ab064f8 | |||
| c0944d5df0 | |||
| 0fb8ef6da4 | |||
| 8455278a83 | |||
| c15fdb15c4 | |||
| 691a52295f | |||
| b64439c263 | |||
| db09dcc6bf | |||
| 27ab4c5484 | |||
| e0df78182c | |||
| d548494f9a | |||
| 4a2cd6aeac | |||
| 2bece278c0 | |||
| 12e174b7f3 | |||
| dc0d9511a3 | |||
| 7ea1f71083 | |||
| 59dca4e3ea | |||
| e4bb905303 | |||
| 9ddb7990f5 | |||
| e1f34d3ebe | |||
| 0c6b7405c2 | |||
| 6175654510 | |||
| 77e5629012 | |||
| 2cabdbf0a3 | |||
| bedb543d4c | |||
| 548533d472 | |||
| 3dcc94dcdb | |||
| ca5c080b03 | |||
| fc4240dcfe | |||
| aa5cefd789 | |||
| d791f1654b | |||
| 9bc3a5d603 | |||
| 0f310e78a4 | |||
| 621869d911 | |||
| a5d38c55d6 | |||
| e020d6a443 | |||
| 2cd2b3c84d | |||
| 52049dd9ca | |||
| 46ee43539f | |||
| fe1d68c475 | |||
| 3e28ee67ec | |||
| 59403835fe | |||
| ed3bd66d0d | |||
| 593f7de5e6 | |||
| 35875a30c6 | |||
| 9e4fda990f | |||
| 0fdd49ad87 | |||
| 3567664f4c | |||
| d2d5be6919 | |||
| e88ee37158 | |||
| a58d664660 | |||
| c9f6fbd0eb | |||
| afe4627783 | |||
| 0ea8c9dfef | |||
| 10d188df2f | |||
| 7a9e22083d | |||
| 3415a1918e | |||
| 2638f7641d | |||
| 0193bbb459 | |||
| c31bd0bfa5 | |||
| 897fbabaa5 | |||
| 6648bc9ed7 | |||
| 7f83fc7fcb | |||
| 16f95e157c | |||
| 0e06a98523 | |||
| 76d7588339 | |||
| fc219d57af | |||
| 7ef7715f1c | |||
| 24403802ac | |||
| 5ab9ca2e5a | |||
| adda80f8fe | |||
| 36d657b272 | |||
| d351fe147f | |||
| bb170241dd | |||
| 9127018ca9 | |||
| 7168001163 | |||
| 57006ccfbe | |||
| 71b6877928 | |||
| f32dbb3eaa | |||
| c0d86a8993 | |||
| 8900ce7f6d | |||
| 88c1389251 | |||
| e2d3fca8d8 | |||
| c9cf3a990f | |||
| 39fd0bc26d | |||
| 01d27b8694 | |||
| aad0f9d0f5 | |||
| 7fb39141c8 | |||
| b73286a598 | |||
| 59e9259d7a | |||
| 84fb222ca0 | |||
| 79e2d97698 | |||
| cba915b882 | |||
| 939ac5505e | |||
| 49a0830d29 | |||
| 1915b899b3 | |||
| 71ecdfdee8 | |||
| 1f9033cb44 | |||
| 24978e4ba6 | |||
| c5f30ccc3a | |||
| f5ef3abf53 | |||
| 82cb3ff0cc | |||
| d6fa234f9b | |||
| 205a1b703d | |||
| 368ebca243 | |||
| d325bc5428 | |||
| a5281ae067 | |||
| 42043e29ac | |||
| 3d2daa22f4 | |||
| 570cf9a5df | |||
| 27c21d0a09 | |||
| da1abaa31d | |||
| 36aadb5c60 | |||
| 7cddb5c236 | |||
| f509249c59 | |||
| 5cdccef384 | |||
| 85d3e6424f | |||
| ee99d280d8 | |||
| b6aa4a4d83 | |||
| 98473ea46b | |||
| 7afaffcb07 | |||
| b2a8800379 | |||
| d78c1d0f9c | |||
| 11c37cea2d | |||
| 3cd93ce9ba | |||
| 76e30c0071 | |||
| f3b2aaebc0 | |||
| 9e99065877 | |||
| 308d9e2142 | |||
| 69df521213 | |||
| 937c8368ac | |||
| b70e874315 | |||
| 2d2a9481bf | |||
| 7244e05a25 | |||
| 0901feda9e | |||
| 02316615d4 | |||
| 504b31e255 | |||
| fcf02507b5 | |||
| 4b57c7c3be | |||
| 629df385e0 | |||
| 3989ef284f | |||
| 8d2e6a82c4 | |||
| c5d11d3218 | |||
| 943cfd07e2 | |||
| 6d242d7d78 | |||
| 01ef2759d4 | |||
| 61905f3681 | |||
| ddfcf61f12 | |||
| 546272f1bb | |||
| 8110ef8eda | |||
| cbef7fe84c | |||
| ea7bf26054 | |||
| a6c702638f | |||
| 204c4e1d24 | |||
| 016d45b4a6 | |||
| 41a4ff748d | |||
| 27d27113ce | |||
| a9ac340110 | |||
| ba2d5d503d | |||
| 1b3e2aa09f | |||
| 34c7efe804 | |||
| 2a44a7dd77 | |||
| 44aafc8569 | |||
| a93f4e0a85 | |||
| 00cf69b744 | |||
| 41524b59a4 | |||
| bbf095ddb5 | |||
| 23b1178629 | |||
| 59ab92808d | |||
| 7d998edc95 | |||
| 4e929d3595 | |||
| 6cedab8349 | |||
| 8a25a77c9f | |||
| 8f9970839b | |||
| 72eadb0d71 | |||
| 2604ee39fa | |||
| 5e632304dc | |||
| 6c91585f43 | |||
| f72178b4df | |||
| 6c01a611d7 | |||
| 577071b666 | |||
| e9db3fd8c1 | |||
| 4c273594ba | |||
| a00b4bcb45 | |||
| 0a73ecc10e | |||
| a69337b6c6 | |||
| a3a12e87fe | |||
| 96c081bb6e | |||
| 67a82ed20c | |||
| ed3c144a79 | |||
| ed73f393ed | |||
| 7c4d945da6 | |||
| 0c10a6c7a5 | |||
| cdeb47ad3b | |||
| 4ac224430f | |||
| 80f5069a49 | |||
| 4ce41d4656 | |||
| 8ca80428a5 | |||
| 657e4dc784 | |||
| 1e3b765bd4 | |||
| 80c94857ed | |||
| bedbf0084f | |||
| 630596fca9 | |||
| c087de2913 | |||
| c92dde9549 | |||
| 9421b66984 | |||
| 3af2af9dd2 | |||
| 2a0ae02088 | |||
| 59acfc216d | |||
| 9a6a01fabb | |||
| df79811a4e | |||
| c6df5a7a0f | |||
| 6369bb0286 | |||
| cd8ded4b37 | |||
| 6da2ade5e3 | |||
| 8981551fcd | |||
| 88a571d9e3 | |||
| 516822a795 | |||
| bc7912d5ab | |||
| 6aeba0bb35 | |||
| b400c4ed79 | |||
| 6c03ca3ca3 | |||
| 3c6546c6dd | |||
| 75d8575909 | |||
| a1c96c8a93 | |||
| d2d983f10a | |||
| d134be8d2e | |||
| 7da7919b78 | |||
| 2df0322aef | |||
| 44a360c1bf | |||
| b3e5f17baf | |||
| 958a0fe898 | |||
| b3b100747e | |||
| 33bcc40293 | |||
| 9b73c0e80a | |||
| 3a0acefae7 | |||
| 81e1b117b2 | |||
| ed1cdfd58a | |||
| cda97348e8 | |||
| 0d588841d5 | |||
| 548a8ba315 | |||
| 47199e72cb | |||
| e7a50282b4 | |||
| 7044978e72 | |||
| 187e1d582f | |||
| 9fd5722f96 | |||
| 14f3d33da4 | |||
| 887f8ba9bd | |||
| eb2f4ee79d | |||
| b8d650d3c7 | |||
| a2c515f5da | |||
| 19089b6f51 | |||
| a19abb267f | |||
| 937af27eaf | |||
| c1ce7ace3f | |||
| 49fde849a4 | |||
| e13ed1433a | |||
| 2f603d2592 | |||
| a41de0ebb7 | |||
| fccc819e82 | |||
| 6db2110937 | |||
| a7d5470caa | |||
| 99c4671e3e | |||
| 6846befb21 | |||
| 9edf445574 | |||
| 51ec91e313 | |||
| 47cfc776ec | |||
| 6e650ebfcc | |||
| 2c795dec56 | |||
| 40b8c2d9a2 | |||
| ef002c54ad | |||
| 6a15175bc5 | |||
| aa3d7b4dc3 | |||
| 663240d7a7 | |||
| ecbde74066 | |||
| e067a9b010 | |||
| 6c08e80327 | |||
| e2e3065cfb | |||
| 788b731168 | |||
| be0b0a7530 | |||
| 118525b4b9 | |||
| e847354d8b | |||
| 98436e2e53 | |||
| f9eb65c4c6 | |||
| 67e5d8d6d2 | |||
| c7ca895545 | |||
| 8a80aeae96 | |||
| 22bbe691ae | |||
| 757a2a683d | |||
| 22377f265c | |||
| d838145fdb | |||
| decedf9c7d | |||
| 0eb5728320 | |||
| 0236eb15ab | |||
| ab8bdc2a19 | |||
| 289a947fa1 | |||
| 54c2465186 | |||
| 652a1f132b | |||
| 527db10555 | |||
| 12918718f9 | |||
| 39f4ac256f | |||
| ba10530ead | |||
| df32be43de | |||
| 356f23ac98 | |||
| 464ef0dbd8 | |||
| 5d2c4edad4 | |||
| 2096825f22 | |||
| 365e701faa | |||
| 720bb8899e | |||
| 845d5d0a33 | |||
| 72e19bb7a9 | |||
| 71575f91ea | |||
| 85523a2226 | |||
| bb17e00abd | |||
| 8cecd15dab | |||
| 5a7c72338f | |||
| 9aea3ae849 | |||
| ea23f135bd | |||
| f3a661920a | |||
| 4966059097 | |||
| 26ed0be397 | |||
| 61f262a339 | |||
| 1a11af68fa | |||
| 8fb4e6d924 | |||
| d88d0bfbeb | |||
| 8e1b25f41b | |||
| 2ea9f36ec9 | |||
| 309d8594bd | |||
| 147ed82195 | |||
| 4141973f90 | |||
| d8d47881ab | |||
| f32a092057 | |||
| 4d51c49508 | |||
| 441c7fb720 | |||
| c0fa9b4b37 | |||
| d71d5c67dc | |||
| aaaa05f4dd | |||
| bec07d4543 | |||
| 3afeecc8b2 | |||
| d5056554a0 | |||
| 1dd85ced01 | |||
| d42b3f870c | |||
| 385c4d0a6d | |||
| ef6040b61d | |||
| a558bd68c1 | |||
| 8bd8c868fc | |||
| 7e5e5db27f | |||
| fc298c806c | |||
| 08a23911c9 | |||
| 40f88a9e7d | |||
| 8d9ad55ae6 | |||
| 9a82394a6f | |||
| 87dd9aff24 | |||
| 487d099611 | |||
| ee4f0923aa | |||
| fbac7a716d | |||
| 2d23b3c174 | |||
| 0033084874 | |||
| f6a0b8f2f1 | |||
| dbb0c3bea2 | |||
| b2d31be01a | |||
| 8a16a9ac2f | |||
| 56c85f0255 | |||
| 9a8626a668 | |||
| 02d78e66ef | |||
| 3e7ae3aeb5 | |||
| 620cdb5510 | |||
| f84e3409b2 | |||
| 782ac444b0 | |||
| e9fb9c4277 | |||
| 807d9a96d3 | |||
| 0fd7cce3e2 | |||
| 1a5e78a76f | |||
| 7b8ddfb4a8 | |||
| 9aa81df81e | |||
| 82b7d8d168 | |||
| 20a3958294 | |||
| 72ebf72840 | |||
| 14767e285f | |||
| 68adc1639f | |||
| f9886854ee | |||
| 62fd3f8874 | |||
| bed9092bb9 | |||
| a85114fa66 | |||
| 3de2b43491 | |||
| e78e60609e | |||
| e2f6a57f74 | |||
| 38eff3382c | |||
| 255a9fc025 | |||
| fcc48548cd | |||
| 491f0d3180 | |||
| 26fa02bbf5 | |||
| 9281d1388c | |||
| 98e8a6aaf8 | |||
| d4711a4bcf | |||
| 2543cc32fe | |||
| 57d289fee9 | |||
| 42f948b606 | |||
| 9e505f3419 | |||
| 73ed8a51dc | |||
| 614ac18c5d | |||
| 0bb18c3df0 | |||
| 5d2934acd1 | |||
| ce4a809f7b | |||
| 76fbbcaab9 | |||
| ac4e25bffc | |||
| ad9f1c37b7 | |||
| a83c39eed5 | |||
| 6b3c125866 | |||
| d8f2a046b4 | |||
| c7294b600b | |||
| 8be9e00ff5 | |||
| afe298209f | |||
| 3f30d0493c | |||
| ca25394c46 | |||
| 734c907fcb | |||
| 003029f0bc | |||
| 98146a9b6c | |||
| 483d2dd7ff | |||
| 8e0381b64e | |||
| c3d200a96c | |||
| a62463597e | |||
| 3e7f5993e3 | |||
| 8bcb3127aa | |||
| 4268131523 | |||
| a46b607121 | |||
| f7ae672bb9 | |||
| 3ad0a469f3 | |||
| ffffb7047c | |||
| 844002e312 | |||
| d79961ff0b | |||
| 201848dd82 | |||
| 2842f8e8a5 | |||
| 35874b1145 | |||
| a5079f5031 | |||
| e371599df4 | |||
| 6ae2f1c81e | |||
| 5726d688ca | |||
| c551d6beb1 | |||
| e740d374a9 | |||
| cc843399a6 | |||
| 10206b34a0 | |||
| 08728c6bd4 | |||
| 40791a47bb | |||
| 751888dacc | |||
| 1106d15cdc | |||
| cded0bcf9e | |||
| 1bacb0bfee | |||
| 7047015603 | |||
| 0e330eb929 | |||
| 8769efd0da | |||
| 54172ab176 | |||
| a6dd3e861d | |||
| 8ba3e7fbe5 | |||
| 95bba1aab3 | |||
| 4994fb128b | |||
| 2f05c0f1b1 | |||
| 16e1cc5e3e | |||
| 59195c9303 | |||
| ec6ccdc58f | |||
| 3e345733eb | |||
| 77feae36e2 | |||
| 5c4b9e0241 | |||
| ed296c227d | |||
| 08331a522f | |||
| 433033f6b8 | |||
| 6b1c15db54 | |||
| 902b343897 | |||
| 110c45c7f0 | |||
| 993ac0db22 | |||
| 4ffef76fac | |||
| 4a807a55e1 | |||
| f88dce665b | |||
| 876f0ac1d3 | |||
| efaec2271c | |||
| f22febbea0 | |||
| e090d8d250 | |||
| 9d1bd83f5b | |||
| d50cfb29f1 | |||
| ab4e3955ee | |||
| f2123db6f9 | |||
| befcd007fa | |||
| dd5ba77a0a | |||
| edaec66f47 | |||
| 80a1b440b8 | |||
| e71d2d21c3 | |||
| 8d7784ab24 | |||
| ab64cf35a9 | |||
| 229cf5ccc0 | |||
| 910d34c330 | |||
| c58cbb8c08 | |||
| ac90dd4db5 | |||
| c17d595d70 | |||
| 69bfb1e6bf | |||
| b5274cb626 | |||
| 0a2b0b84bf | |||
| f255dc43cd | |||
| 9afb254c53 | |||
| d2355e3112 | |||
| 17e6af2afb | |||
| 7af6dd4490 | |||
| 4cc0356d8a | |||
| aad74b8bb8 | |||
| 739a0f0f43 | |||
| c1938a8dfb | |||
| 0b9baf268a | |||
| bbf2bfe654 | |||
| 552f09ce07 | |||
| e2bb5062d1 | |||
| 7d3cebada8 | |||
| 42b092b307 | |||
| 929f63ceea | |||
| cb2bdd9613 | |||
| a13a0e1fcd | |||
| b23abf392b | |||
| 306671f9af | |||
| 38ae88a4ee | |||
| 3521206d64 | |||
| fbf86b4c2f | |||
| fee41a2cde | |||
| 1a2cf9dbbc | |||
| 585e0fa85d | |||
| 86238994bb | |||
| cecfb0b1f2 | |||
| 326cc6405b | |||
| 84ab4206dc | |||
| 234f721877 | |||
| 31bfbc7fff | |||
| 2799929027 | |||
| 32b59f6244 | |||
| dccb1556f9 | |||
| d1ea3c8728 | |||
| 2255d27455 | |||
| c6703ae1df | |||
| ba5c34b559 | |||
| de44cd39f3 | |||
| 0cb50c9fc5 | |||
| 8b421dfc4c | |||
| e3061d1c74 | |||
| 057007a464 | |||
| 0f8219efba | |||
| f3ff5bd3c8 | |||
| e8fbf6279a | |||
| 21c6294599 | |||
| 8e6ee12497 | |||
| 5fdebe709c | |||
| 14ea5e8a75 | |||
| 48712fb619 | |||
| d9c5d83c33 | |||
| 6801063087 | |||
| 0089bc4a85 | |||
| 6bbbc809e9 | |||
| fc18243040 | |||
| 2263d01498 | |||
| 71a21b507e | |||
| 045d9542a7 | |||
| 34148aea8a | |||
| 8b0cc60344 | |||
| 5f133cd21b | |||
| 72afaa04bb | |||
| fc09649901 | |||
| 2665e28d76 | |||
| 623d5d43e5 | |||
| 4aca1a8a3f | |||
| ada5e33c08 | |||
| 28646e563f | |||
| f4889b5d0d | |||
| 9d4734403b | |||
| 6c2995cb72 | |||
| b53c8b6e9d | |||
| b216d06281 | |||
| bd56197fcd | |||
| eed3ff80e0 | |||
| 6d4838add9 | |||
| 345dacc135 | |||
| 157d27f262 | |||
| 8418c06ae0 | |||
| 3ae0224e1a | |||
| d1d83106ec | |||
| 4442a33f96 | |||
| 669db7237e | |||
| 6802502aeb | |||
| d34e83d9ba | |||
| 665e62edd1 | |||
| a3b52f5878 | |||
| 8efe5a27d6 | |||
| 9ab5decb47 | |||
| 98ebcb9697 | |||
| 5e01687b73 | |||
| 6d96bac2f1 | |||
| 953db778f2 | |||
| dcfb25abc4 | |||
| 696f051d13 | |||
| e4d1d29d34 | |||
| a033320589 | |||
| d3d8431c46 | |||
| deece71d56 | |||
| c6f071e43b | |||
| 4df36b23d3 | |||
| bf09340cb7 | |||
| f6ccd8484f | |||
| 757a7d038e | |||
| 104b029daa | |||
| d7e9b5a9da | |||
| a8206b52ac | |||
| d0803692e7 | |||
| b2b889e39c | |||
| 244b8621fc | |||
| 8636acda8e | |||
| 7ad1b8563f | |||
| 7e0cfce9f7 | |||
| 657fc3ba3c | |||
| 71b2e58776 | |||
| a8e3439e80 | |||
| 3cf500040c | |||
| ef1ae45133 | |||
| 3b1e7d5a36 | |||
| ec7a7c869e | |||
| 5f64246564 | |||
| acb8e6384a | |||
| b99bcd2a89 | |||
| d632f8a0c9 | |||
| 53a2dfe026 | |||
| 1698f8ddbf | |||
| 045a787ad1 | |||
| d594dcf247 | |||
| ef4ef445d1 | |||
| 8923efd27a | |||
| a6d8438b31 | |||
| 84afe03996 | |||
| d6e4126cea | |||
| 05bceeff35 | |||
| a2e54ea390 | |||
| 3e907c7e85 | |||
| b9a98eaa3e | |||
| 575a4bbd67 | |||
| 4105b54984 | |||
| 699d0d9eb8 | |||
| 2f8d6d0ce0 | |||
| f98d049f20 | |||
| 20105369fd | |||
| 2fdd3817f0 | |||
| 4f7a2d7593 | |||
| ccbe040c1f | |||
| 6d96f92a00 | |||
| e6627850d5 | |||
| fd867e93ba | |||
| 528ba93613 | |||
| 24bf1c6434 | |||
| 5314acd4fa | |||
| 80b41f402c | |||
| 88c481ce2b | |||
| 3fb9d1fcae | |||
| e5ee70c94b | |||
| 05edffadad | |||
| ea86578163 | |||
| f0b68e8d94 | |||
| 518b5681f2 | |||
| d3a1cae6ae | |||
| 5d2c817048 | |||
| bcedebba64 | |||
| 6593bcc66f | |||
| 36a91b6cb9 | |||
| b2cfa9c776 | |||
| d2a341f19e | |||
| 5868bd6c21 | |||
| 61805bc090 | |||
| a23786bb26 | |||
| a4bc9b6d2b | |||
| 61ae6d87ec | |||
| 284af59757 | |||
| 947dc67886 | |||
| a1a704f9e8 | |||
| 696b236777 | |||
| ba5f5ea7eb | |||
| 4a68664f47 | |||
| 2618b3adfd | |||
| 21d65684b3 | |||
| fbd7348ceb |
@@ -1,3 +1,54 @@
|
||||
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.
|
||||
* Faster:
|
||||
-> Many under the hood improvements have occurred that should improve
|
||||
performance enormously. New features are implemented as plugins that can
|
||||
be hidden.
|
||||
-> Performance improvement example: Insertion of a new person in a family
|
||||
tree with 30000 people previously took 4 seconds on a 1.4GHz PC running
|
||||
Gramps 3.1, but now takes milliseconds.
|
||||
* New Views:
|
||||
-> There are new views, and some existing views have been greatly improved
|
||||
-> People view can now be sorted on the columns
|
||||
-> A Place treeview is present, nicely grouping your places under country
|
||||
groups
|
||||
-> GeoView has left it's beta status behind and shows your data on an online
|
||||
map (OpenStreetMap or Google Maps, a fast internet connection is required)
|
||||
-> Help Menu -> Extra Reports/Tools open a webpage with downloadable views
|
||||
* Other Improvements:
|
||||
-> Styled Notes now in most output formats that support styles
|
||||
-> New languages
|
||||
-> Select language in which report should be created (not yet available in
|
||||
all reports)
|
||||
|
||||
Version 3.1.3 -- the "What name?" release.
|
||||
* contains translation updates, crash fixes, bug fixes, and minor updates.
|
||||
* fixes and updates to:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
# $Id$
|
||||
|
||||
|
||||
+8
-4
@@ -5,7 +5,7 @@ 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.3.0, [gramps-bugs@lists.sourceforge.net])
|
||||
AC_CONFIG_SRCDIR(configure.in)
|
||||
AM_INIT_AUTOMAKE([1.6.3 foreign])
|
||||
|
||||
@@ -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 ro ru sv eo fi lt sk tr bg hr sl ca mk sq he"
|
||||
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.])
|
||||
@@ -93,6 +93,7 @@ gramps.sh
|
||||
src/const.py
|
||||
src/Makefile
|
||||
src/cli/Makefile
|
||||
src/cli/plug/Makefile
|
||||
src/gen/Makefile
|
||||
src/gen/db/Makefile
|
||||
src/gen/display/Makefile
|
||||
@@ -102,11 +103,14 @@ src/gen/plug/Makefile
|
||||
src/gen/plug/docbackend/Makefile
|
||||
src/gen/plug/docgen/Makefile
|
||||
src/gen/plug/menu/Makefile
|
||||
src/gen/plug/report/Makefile
|
||||
src/gen/proxy/Makefile
|
||||
src/gen/utils/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/editors/Makefile
|
||||
src/gui/editors/displaytabs/Makefile
|
||||
src/gui/plug/Makefile
|
||||
src/gui/plug/report/Makefile
|
||||
src/gui/selectors/Makefile
|
||||
src/gui/views/Makefile
|
||||
src/gui/views/treemodels/Makefile
|
||||
@@ -127,8 +131,6 @@ src/Filters/Rules/Note/Makefile
|
||||
src/Filters/SideBar/Makefile
|
||||
src/Simple/Makefile
|
||||
src/GrampsLocale/Makefile
|
||||
src/PluginUtils/Makefile
|
||||
src/ReportBase/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/docgen/Makefile
|
||||
src/plugins/drawreport/Makefile
|
||||
@@ -140,10 +142,12 @@ src/plugins/lib/Makefile
|
||||
src/plugins/mapservices/Makefile
|
||||
src/plugins/quickview/Makefile
|
||||
src/plugins/rel/Makefile
|
||||
src/plugins/sidebar/Makefile
|
||||
src/plugins/textreport/Makefile
|
||||
src/plugins/tool/Makefile
|
||||
src/plugins/view/Makefile
|
||||
src/plugins/webreport/Makefile
|
||||
src/plugins/webstuff/Makefile
|
||||
src/DateHandler/Makefile
|
||||
src/data/Makefile
|
||||
src/glade/Makefile
|
||||
|
||||
+13
-10
@@ -55,7 +55,7 @@ DATABASE
|
||||
<!ELEMENT database (header, name-formats?, events?, people?, families?,
|
||||
sources?, places?, objects?, repositories?, notes?,
|
||||
bookmarks?,namemaps?)>
|
||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.3.0/">
|
||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.4.0/">
|
||||
|
||||
<!-- ************************************************************
|
||||
HEADER
|
||||
@@ -96,7 +96,7 @@ PEOPLE
|
||||
home IDREF #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT person (gender, name*, nick?, eventref*, lds_ord*,
|
||||
<!ELEMENT person (gender, name*, eventref*, lds_ord*,
|
||||
objref*, address*, attribute*, url*, childof*,
|
||||
parentin*, personref*, noteref*, sourceref*)>
|
||||
<!ATTLIST person
|
||||
@@ -112,7 +112,7 @@ GENDER has values of M, F, or U.
|
||||
-->
|
||||
<!ELEMENT gender (#PCDATA)>
|
||||
|
||||
<!ELEMENT name (first?,call?,last?,suffix?,patronymic?,title?,
|
||||
<!ELEMENT name (first?,call?,surname*,nick?,familynick?,suffix?,title?,group?
|
||||
(daterange|datespan|dateval|datestr)?,noteref*,sourceref*)>
|
||||
<!ATTLIST name
|
||||
alt (0|1) #IMPLIED
|
||||
@@ -124,16 +124,19 @@ GENDER has values of M, F, or U.
|
||||
|
||||
<!ELEMENT first (#PCDATA)>
|
||||
<!ELEMENT call (#PCDATA)>
|
||||
<!ELEMENT last (#PCDATA)>
|
||||
<!ATTLIST last
|
||||
prefix CDATA #IMPLIED
|
||||
group CDATA #IMPLIED
|
||||
>
|
||||
<!ELEMENT suffix (#PCDATA)>
|
||||
<!ELEMENT patronymic (#PCDATA)>
|
||||
<!ELEMENT title (#PCDATA)>
|
||||
<!ELEMENT nick (#PCDATA)>
|
||||
<!ELEMENT familynick (#PCDATA)>
|
||||
<!ELEMENT group (#PCDATA)>
|
||||
|
||||
<!ELEMENT nick (#PCDATA)>
|
||||
<!ELEMENT surname (#PCDATA)>
|
||||
<!ATTLIST surname
|
||||
prefix CDATA #IMPLIED
|
||||
primary (1|0) #IMPLIED
|
||||
derivation CDATA #IMPLIED
|
||||
connector CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT childof EMPTY>
|
||||
<!ATTLIST childof hlink IDREF #REQUIRED
|
||||
|
||||
+25
-8
@@ -31,7 +31,7 @@
|
||||
|
||||
<grammar
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
|
||||
ns="http://gramps-project.org/xml/1.3.0/"
|
||||
ns="http://gramps-project.org/xml/1.4.0/"
|
||||
xmlns="http://relaxng.org/ns/structure/1.0">
|
||||
|
||||
<start><element name="database">
|
||||
@@ -150,7 +150,6 @@
|
||||
<zeroOrMore><element name="name">
|
||||
<ref name="name-content"/>
|
||||
</element></zeroOrMore>
|
||||
<optional><element name="nick"><text/></element></optional>
|
||||
<zeroOrMore><element name="eventref">
|
||||
<ref name="eventref-content"/>
|
||||
</element></zeroOrMore>
|
||||
@@ -221,13 +220,13 @@
|
||||
<optional><attribute name="display"><text/></attribute></optional>
|
||||
<optional><element name="first"><text/></element></optional>
|
||||
<optional><element name="call"><text/></element></optional>
|
||||
<optional><element name="last">
|
||||
<text/>
|
||||
<optional><attribute name="prefix"><text/></attribute></optional>
|
||||
<optional><attribute name="group"><text/></attribute></optional>
|
||||
</element></optional>
|
||||
<optional><element name="nick"><text/></element></optional>
|
||||
<optional><element name="familynick"><text/></element></optional>
|
||||
<optional><element name="group"><text/></element></optional>
|
||||
<zeroOrMore><element name="surname">
|
||||
<ref name="surname-content"/>
|
||||
</element></zeroOrMore>
|
||||
<optional><element name="suffix"><text/></element></optional>
|
||||
<optional><element name="patronymic"><text/></element></optional>
|
||||
<optional><element name="title"><text/></element></optional>
|
||||
<optional><ref name="date-content"/></optional>
|
||||
<zeroOrMore><element name="noteref">
|
||||
@@ -238,6 +237,24 @@
|
||||
</element></zeroOrMore>
|
||||
</define>
|
||||
|
||||
<define name="surname-content">
|
||||
<element name="surname">
|
||||
<text/>
|
||||
<optional><attribute name="prefix"><text/></attribute></optional>
|
||||
<optional><attribute name="primary"><choice>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="derivation"><choice>
|
||||
<value>inherited</value>
|
||||
<value>patronymic</value>
|
||||
<value>matronymic</value>
|
||||
<value>other</value>
|
||||
</choice></attribute></optional>
|
||||
<optional><attribute name="connector"><text/></attribute></optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="address-content">
|
||||
<optional><attribute name="priv">
|
||||
<ref name="priv-content"/>
|
||||
|
||||
Vendored
+12
-5
@@ -3,9 +3,16 @@ gramps for Debian
|
||||
|
||||
This is the Debian package of GRAMPS.
|
||||
|
||||
If you do not install python-reportlab (gramps Recommends it be
|
||||
installed) then you will be able to create usable PDF files only if
|
||||
your database contains solely latin (iso-8859-1) characters. Reportlab
|
||||
will generate PDF files containing non-latin characters although they
|
||||
are quite large as the font must be included in the file.
|
||||
Regarding the extra dependencies:
|
||||
|
||||
Recommends: graphviz
|
||||
Enable creation of graphs
|
||||
Recommends: python-gtkmozembed
|
||||
Recommends: python-webkit
|
||||
Enable html rendering for Geographic view and Web view. If both
|
||||
are installed webkit will be used. python-gtkmozembed may be more
|
||||
stable.
|
||||
Suggests: ttf-freefont
|
||||
Allows more fonts in reports
|
||||
Suggests: python-gtkspell python-enchant
|
||||
allows spell checking in the notes. Both need to be installed.
|
||||
|
||||
Vendored
+251
-6
@@ -1,20 +1,265 @@
|
||||
gramps (3.0.0-1) gutsy; urgency=low
|
||||
gramps (3.2.0-0beta1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* works with gtk 2.19. Closes: #566958
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 05 Mar 2010 14:05:39 -0500
|
||||
|
||||
gramps (3.1.3-2) unstable; urgency=low
|
||||
|
||||
* Switch to dpkg-source 3.0 (quilt) format
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 05 Jan 2010 20:04:30 -0500
|
||||
|
||||
gramps (3.1.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Stephane Charette <stephanecharette@gmail.com> Mon, 31 Mar 2008 19:42:05 -0700
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 06 Dec 2009 13:46:48 -0500
|
||||
|
||||
gramps (2.90.0-0beta) unstable; urgency=low
|
||||
gramps (3.1.2-2) unstable; urgency=low
|
||||
|
||||
* allow python >= 2.5. Closes: #547150
|
||||
* fix Relationship Graph to use new format for URLs. Closes: #532559
|
||||
* Web report creation fixed. Closes: #537355
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 17 Nov 2009 11:38:43 -0500
|
||||
|
||||
gramps (3.1.2-1.1) unstable; urgency=low
|
||||
|
||||
* Non-maintainer upload.
|
||||
* debian/control: drop Recommends on python-gnome2-desktop: it is now
|
||||
gone and none of its modules are used anyhow (Closes: #541560)
|
||||
|
||||
-- Stefano Zacchiroli <zack@debian.org> Thu, 08 Oct 2009 13:52:35 +0200
|
||||
|
||||
gramps (3.1.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Replace Recommends on python-gnome2-extras with python-gtkspell
|
||||
* Do not create the directory /etc/gconf/schemas/. Closes: Bug#525683
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 07 Jun 2009 14:01:16 -0400
|
||||
|
||||
gramps (3.1.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 10 Mar 2009 09:26:52 -0400
|
||||
|
||||
gramps (3.1.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* link /usr/share/common-licenses/GPL-2 from /usr/share/gramps/COPYING
|
||||
so gramps can find the file.
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sat, 07 Mar 2009 22:03:09 -0500
|
||||
|
||||
gramps (3.0.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream version. Closes: #506621, #506818
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 07 Dec 2008 21:39:55 -0500
|
||||
|
||||
gramps (3.0.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 20 Oct 2008 20:43:35 -0400
|
||||
|
||||
gramps (3.0.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sat, 27 Sep 2008 17:25:09 -0400
|
||||
|
||||
gramps (3.0.1-2) unstable; urgency=low
|
||||
|
||||
* Remove dependency on gnome-doc-utils and scrollkeeper
|
||||
* Disable spell checking in src/Spell.py due to the spell checker
|
||||
crashing. Closes: #492212
|
||||
Spell checking will be reenabled once the offending package is
|
||||
identified and fixed.
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 29 Aug 2008 11:09:04 -0400
|
||||
|
||||
gramps (3.0.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 19 May 2008 09:38:28 -0400
|
||||
|
||||
gramps (3.0.0-6) unstable; urgency=low
|
||||
|
||||
* Fix typo in _EditChildRef.py which can cause gramps to crash. Closes: #476163
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 15 Apr 2008 23:37:04 -0400
|
||||
|
||||
gramps (3.0.0-5) unstable; urgency=low
|
||||
|
||||
* Remove gtkspell Recommends as it is now provided by python-gnome2-extras.
|
||||
Closes: Bug#474755
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 07 Apr 2008 17:25:18 -0400
|
||||
|
||||
gramps (3.0.0-4) unstable; urgency=low
|
||||
|
||||
* Fix the binary package python dependency properly. A recent python
|
||||
(>= 2.4.4-6) is needed to ensure python2.5 is supported properly.
|
||||
Closes: #474056
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Thu, 03 Apr 2008 09:46:28 -0400
|
||||
|
||||
gramps (3.0.0-3) unstable; urgency=low
|
||||
|
||||
* Build-Depends on Python2.5. Closes: Bug#473946, #474056
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 02 Apr 2008 08:28:27 -0400
|
||||
|
||||
gramps (3.0.0-2) unstable; urgency=low
|
||||
|
||||
* Explicitly require python version >= 2.5
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 26 Mar 2008 09:34:25 -0400
|
||||
|
||||
gramps (3.0.0-1) unstable; urgency=low
|
||||
|
||||
* New upstream release. Closes: #472681
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 25 Mar 2008 09:35:00 -0400
|
||||
|
||||
gramps (2.2.10-2) unstable; urgency=low
|
||||
|
||||
* Remove build dependency on python-xml. Closes: Bug#468625
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 29 Feb 2008 13:30:11 -0500
|
||||
|
||||
gramps (2.2.10-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
* Added dh_icons to debian/rules. Closes: #454761
|
||||
* Remove version from scrollkeeper dependency. Closes: #456600
|
||||
* Fixed typos in description. Closes: #433559
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 14 Jan 2008 09:57:25 -0500
|
||||
|
||||
gramps (2.2.9-2) unstable; urgency=low
|
||||
|
||||
* Move debhelper to Build-Depends. Closes: #447948
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 24 Oct 2007 20:03:36 -0400
|
||||
|
||||
gramps (2.2.9-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Stephane Charette <stephanecharette@gmail.com> Wed, 16 Jan 2008 21:45:00 -0800
|
||||
-- James A. Treacy <treacy@debian.org> Thu, 18 Oct 2007 13:14:30 -0400
|
||||
|
||||
gramps (2.1.6-1) unstable; urgency=low
|
||||
gramps (2.2.8-2) unstable; urgency=low
|
||||
|
||||
* Work around a bug in gnome-python-extras which caused a deallocation
|
||||
of the TextView in the check if a spell checker is present.
|
||||
Closes: #445864
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 09 Oct 2007 17:26:54 -0400
|
||||
|
||||
gramps (2.2.8-1) unstable; urgency=low
|
||||
|
||||
* New Upstream version
|
||||
* Misleading error message changed. Closes: #418033
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 28 May 2007 21:00:51 -0400
|
||||
|
||||
gramps (2.2.7-2) unstable; urgency=low
|
||||
|
||||
* Added dependency on librsvg2-common
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 23 Apr 2007 19:32:00 -0400
|
||||
|
||||
gramps (2.2.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sun, 22 Apr 2007 20:08:55 -0400
|
||||
|
||||
gramps (2.2.6-1) unstable; urgency=low
|
||||
|
||||
* New upstream version
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 29 Jan 2007 20:12:05 -0500
|
||||
|
||||
gramps (2.2.5-0rc1-1) unstable; urgency=low
|
||||
|
||||
* rc1 of 2.2.5
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Thu, 25 Jan 2007 23:04:24 -0500
|
||||
|
||||
gramps (2.2.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Alex Roitman <shura@gramps-project.org> Thu, 22 Jun 2006 13:28:14 -0700
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 27 Dec 2006 18:04:11 -0500
|
||||
|
||||
gramps (2.2.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 27 Nov 2006 00:27:23 -0500
|
||||
|
||||
gramps (2.2.2-2) unstable; urgency=low
|
||||
|
||||
* call dh_desktop in debian/rules so .desktop file is registered. Closes: Bug#398423
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 13 Nov 2006 20:26:00 -0500
|
||||
|
||||
gramps (2.2.2-1) unstable; urgency=low
|
||||
|
||||
* Bumped upstream version number. 2.2.1-3 and -4 should have been 2.2.2
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Sat, 4 Nov 2006 16:34:47 -0500
|
||||
|
||||
gramps (2.2.1-4) unstable; urgency=low
|
||||
|
||||
* add missing Build-Depends-Indep. Closes: #396874
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 3 Nov 2006 11:03:35 -0500
|
||||
|
||||
gramps (2.2.1-3) unstable; urgency=low
|
||||
|
||||
* New Upstream release
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Fri, 3 Nov 2006 08:07:38 -0500
|
||||
|
||||
gramps (2.2.1-2) unstable; urgency=low
|
||||
|
||||
* Upload to sid
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 1 Nov 2006 20:50:28 -0500
|
||||
|
||||
gramps (2.2.1-1) experimental; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Mon, 30 Oct 2006 10:32:43 -0500
|
||||
|
||||
gramps (2.1.95-1) experimental; urgency=low
|
||||
|
||||
* Beta release of version 2.2
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 29 Aug 2006 11:40:08 -0400
|
||||
|
||||
|
||||
gramps (2.1.90-1) experimental; urgency=low
|
||||
|
||||
* Beta release of version 2.2
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Tue, 25 Jul 2006 00:18:15 -0400
|
||||
|
||||
gramps (2.0.11-2) unstable; urgency=low
|
||||
|
||||
* Complies with new python policy
|
||||
|
||||
-- James A. Treacy <treacy@debian.org> Wed, 5 Jul 2006 14:47:56 -0400
|
||||
|
||||
gramps (2.0.11-1) unstable; urgency=low
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
4
|
||||
7
|
||||
|
||||
Vendored
+20
-16
@@ -1,23 +1,27 @@
|
||||
Source: gramps
|
||||
Section: gnome
|
||||
Priority: optional
|
||||
Maintainer: James A. Treacy <treacy@debian.org>
|
||||
Build-Depends-Indep: debhelper (>=5.0.37.2), python-xml, python-gnome2, python-glade2, scrollkeeper, libglib2.0-dev, build-essential, gnome-doc-utils, intltool, xsltproc, python-central (>= 0.4.17)
|
||||
Standards-Version: 3.6.2
|
||||
XS-Python-Version: current
|
||||
Maintainer: Stéphane Charette <stephanecharette@gmail.com>
|
||||
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/
|
||||
XS-Python-Version: >=2.5
|
||||
|
||||
Package: gramps
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, python-gnome2, python-glade2, ${misc:Depends}
|
||||
Replaces: gramps-manual, gramps-extending-doc, gramps-help
|
||||
Conflicts: gramps-manual, gramps-extending-doc, gramps-common
|
||||
Recommends: graphviz, ttf-freefont, python-reportlab, python-gnome2-extras
|
||||
Description: Genealogical Research and Analysis Management Program
|
||||
GRAMPS, the Genealogical Research and Analysis Management Programming
|
||||
System, is an Open Source genealogy program written in Python, using
|
||||
the GTK/GNOME interface.
|
||||
GRAMPS has the ability to import GEDCOM files that are used in such
|
||||
programs as FamilyTree Maker for Windows and can produce reports
|
||||
in various formats such as the popular ABIWord and OpenOffice.org
|
||||
formats as well as HTML and PDF.
|
||||
Depends: ${python:Depends}, librsvg2-common, python-gtk2, xdg-utils, ${misc:Depends}
|
||||
Replaces: gramps-manual, gramps-extending-doc
|
||||
Conflicts: gramps-manual, gramps-extending-doc, gramps-common, python-gtk-1.2
|
||||
Recommends: graphviz, python-webkit, python-gtkmozembed
|
||||
Suggests: ttf-freefont, python-enchant, python-gtkspell
|
||||
Description: Genealogical research program
|
||||
GRAMPS is an Open Source genealogy program written in Python, using
|
||||
the GTK/GNOME interface. It is an extremely flexible program fitting
|
||||
the needs for both the amateur genealogist and serious genealogical
|
||||
researcher.
|
||||
GRAMPS has the ability to import GEDCOM files exported from many
|
||||
proprietary genealogy programs and can produce a large number of
|
||||
reports in many popular formats.
|
||||
XB-Python-Version: ${python:Versions}
|
||||
|
||||
|
||||
Vendored
+1
@@ -1 +1,2 @@
|
||||
usr/share/pixmaps
|
||||
usr/share/mime/packages
|
||||
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
/usr/bin/
|
||||
/usr/share/
|
||||
/etc
|
||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
?package(gramps):needs="X11" section="Apps/Tools"\
|
||||
?package(gramps):needs="X11" section="Applications/Office"\
|
||||
title="gramps" command="/usr/bin/gramps"\
|
||||
icon="/usr/share/pixmaps/gramps.xpm"
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
2
|
||||
Vendored
+29
-32
@@ -4,71 +4,68 @@ build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
|
||||
./configure \
|
||||
--enable-packager-mode \
|
||||
--disable-scrollkeeper \
|
||||
--prefix=/usr \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--sysconfdir=/etc
|
||||
#./autogen.sh --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc
|
||||
./configure --enable-packager-mode --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc
|
||||
# ./configure --prefix=`pwd`/debian/tmp/usr --mandir=\$${prefix}/share/man
|
||||
$(MAKE)
|
||||
# $(MAKE) html
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
-rm -f build-stamp
|
||||
|
||||
-$(MAKE) clean
|
||||
-rm -f src/*.pyo src/*/*.pyo src/*/*/*.pyo src/*/*/*/*.pyo
|
||||
-rm -f config.status config.log
|
||||
# [ ! -f Makefile ] || $(MAKE) distclean
|
||||
# -rm -f src/*.pyo src/*/*.pyo
|
||||
# -rm -f config.status config.log
|
||||
|
||||
dh_auto_clean
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
|
||||
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
# Add here commands to install the package into debian/tmp.
|
||||
# GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
$(MAKE) install DESTDIR=`pwd`/debian/gramps
|
||||
# Remove help-related dirs, they will go into gramps-help package
|
||||
-rm -rf debian/gramps/usr/share/gnome
|
||||
-rm -rf debian/gramps/usr/share/omf
|
||||
|
||||
# Remove byte-compiled python files
|
||||
-rm -f debian/gramps/usr/share/gramps/COPYING
|
||||
ln -s /usr/share/common-licenses/GPL-2 debian/gramps/usr/share/gramps/COPYING
|
||||
-rm -rf debian/gramps/usr/var
|
||||
# cp src/data/gramps.xml debian/gramps/usr/share/mime/packages
|
||||
-find debian/gramps/usr/share/ -name "*.pyo" -exec rm -f '{}' ';'
|
||||
|
||||
# Copy icon file
|
||||
cp debian/gramps.xpm debian/gramps/usr/share/pixmaps/
|
||||
# cp src/gramps.xpm debian/tmp/usr/share/pixmaps/
|
||||
#cp src/data/gramps.svg debian/gramps/usr/share/pixmaps/
|
||||
#chmod 644 debian/gramps/usr/share/pixmaps/gramps.svg
|
||||
|
||||
# Instal gramps-help things
|
||||
#$(MAKE) -C help install DESTDIR=`pwd`/debian/gramps-help
|
||||
# cp src/images/gramps.svg debian/gramps/usr/share/pixmaps/
|
||||
# chmod 644 debian/gramps/usr/share/pixmaps/gramps.svg
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs
|
||||
dh_installmenu --package=gramps
|
||||
dh_installman --package=gramps
|
||||
dh_installdocs FAQ
|
||||
dh_installmenu
|
||||
# dh_installman
|
||||
dh_installmime -i
|
||||
dh_installchangelogs --package=gramps ChangeLog
|
||||
#dh_installchangelogs --package=gramps-help help/ChangeLog
|
||||
dh_gconf --package=gramps
|
||||
#dh_scrollkeeper --package=gramps-help
|
||||
# dh_installchangelogs ChangeLog
|
||||
dh_installchangelogs
|
||||
dh_icons
|
||||
# dh_movefiles -i
|
||||
# dh_gconf -i
|
||||
dh_link -i
|
||||
dh_compress -i
|
||||
dh_fixperms -i
|
||||
dh_python --package=gramps
|
||||
dh_installdeb -i
|
||||
dh_pycentral -i
|
||||
dh_installdeb -i
|
||||
dh_gencontrol -i
|
||||
dh_md5sums -i
|
||||
dh_builddeb -i
|
||||
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#########################################
|
||||
The :class:`RelationshipCalculator` Class
|
||||
#########################################
|
||||
|
||||
Contents:
|
||||
|
||||
.. automodule:: Relationship
|
||||
.. autoclass:: RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
+62
-38
@@ -46,6 +46,7 @@ src/cli/arghandler.py
|
||||
src/cli/argparser.py
|
||||
src/cli/clidbman.py
|
||||
src/cli/grampscli.py
|
||||
src/cli/plug/__init__.py
|
||||
|
||||
# gen API
|
||||
src/gen/__init__.py
|
||||
@@ -109,12 +110,15 @@ src/gen/lib/eventref.py
|
||||
src/gen/lib/privsrcnote.py
|
||||
src/gen/lib/placebase.py
|
||||
src/gen/lib/name.py
|
||||
src/gen/lib/nametype.py
|
||||
src/gen/lib/nameorigintype.py
|
||||
src/gen/lib/addressbase.py
|
||||
src/gen/lib/family.py
|
||||
src/gen/lib/event.py
|
||||
src/gen/lib/nametype.py
|
||||
src/gen/lib/secondaryobj.py
|
||||
src/gen/lib/srcbase.py
|
||||
src/gen/lib/surname.py
|
||||
src/gen/lib/surnamebase.py
|
||||
src/gen/lib/eventtype.py
|
||||
src/gen/lib/researcher.py
|
||||
src/gen/lib/familyreltype.py
|
||||
@@ -170,6 +174,12 @@ src/gen/plug/docbackend/__init__.py
|
||||
src/gen/plug/docbackend/cairobackend.py
|
||||
src/gen/plug/docbackend/docbackend.py
|
||||
|
||||
# plugin report base API (was ReportBase)
|
||||
src/gen/plug/report/_constants.py
|
||||
src/gen/plug/report/_paper.py
|
||||
src/gen/plug/report/endnotes.py
|
||||
src/gen/plug/report/utils.py
|
||||
|
||||
# gen proxy API
|
||||
src/gen/proxy/living.py
|
||||
src/gen/proxy/private.py
|
||||
@@ -191,6 +201,7 @@ src/gui/dbloader.py
|
||||
src/gui/dbman.py
|
||||
src/gui/filtereditor.py
|
||||
src/gui/grampsgui.py
|
||||
src/gui/makefilter.py
|
||||
src/gui/pluginmanager.py
|
||||
src/gui/utils.py
|
||||
src/gui/viewmanager.py
|
||||
@@ -206,6 +217,7 @@ src/gui/editors/editeventref.py
|
||||
src/gui/editors/editfamily.py
|
||||
src/gui/editors/editldsord.py
|
||||
src/gui/editors/editlocation.py
|
||||
src/gui/editors/editlink.py
|
||||
src/gui/editors/editmedia.py
|
||||
src/gui/editors/editmediaref.py
|
||||
src/gui/editors/editname.py
|
||||
@@ -261,10 +273,24 @@ src/gui/editors/displaytabs/reporefmodel.py
|
||||
src/gui/editors/displaytabs/sourcebackreflist.py
|
||||
src/gui/editors/displaytabs/sourceembedlist.py
|
||||
src/gui/editors/displaytabs/sourcerefmodel.py
|
||||
src/gui/editors/displaytabs/surnametab.py
|
||||
src/gui/editors/displaytabs/surnamemodel.py
|
||||
src/gui/editors/displaytabs/webembedlist.py
|
||||
src/gui/editors/displaytabs/webmodel.py
|
||||
src/gui/editors/displaytabs/__init__.py
|
||||
|
||||
# gui plugin API (was PluginUtils and ReportBase)
|
||||
src/gui/plug/_dialogs.py
|
||||
src/gui/plug/_guioptions.py
|
||||
src/gui/plug/_windows.py
|
||||
src/gui/plug/report/_docreportdialog.py
|
||||
src/gui/plug/report/_graphvizreportdialog.py
|
||||
src/gui/plug/report/_papermenu.py
|
||||
src/gui/plug/report/_reportdialog.py
|
||||
src/gui/plug/report/_stylecombobox.py
|
||||
src/gui/plug/report/_styleeditor.py
|
||||
src/gui/plug/tool.py
|
||||
|
||||
# gui/selectors - the GUI selectors package
|
||||
src/gui/selectors/baseselector.py
|
||||
src/gui/selectors/selectevent.py
|
||||
@@ -305,9 +331,13 @@ src/gui/widgets/labels.py
|
||||
src/gui/widgets/menutoolbuttonaction.py
|
||||
src/gui/widgets/progressdialog.py
|
||||
src/gui/widgets/styledtexteditor.py
|
||||
src/gui/widgets/undoablebuffer.py
|
||||
src/gui/widgets/undoableentry.py
|
||||
src/gui/widgets/undoablestyledbuffer.py
|
||||
src/gui/widgets/validatedmaskedentry.py
|
||||
|
||||
# Simple API
|
||||
src/Simple/_SimpleAccess.py
|
||||
src/Simple/_SimpleTable.py
|
||||
|
||||
# Config package
|
||||
@@ -315,11 +345,20 @@ src/config.py
|
||||
|
||||
# Merge package
|
||||
src/Merge/__init__.py
|
||||
src/Merge/_MergePerson.py
|
||||
src/Merge/_MergePlace.py
|
||||
src/Merge/_MergeSource.py
|
||||
src/Merge/mergeevent.py
|
||||
src/Merge/mergefamily.py
|
||||
src/Merge/mergemedia.py
|
||||
src/Merge/mergenote.py
|
||||
src/Merge/mergeperson.py
|
||||
src/Merge/mergeplace.py
|
||||
src/Merge/mergerepository.py
|
||||
src/Merge/mergesource.py
|
||||
#src/Merge/_MergePerson.py
|
||||
#src/Merge/_MergePlace.py
|
||||
#src/Merge/_MergeSource.py
|
||||
|
||||
# DateHandler package
|
||||
src/DateHandler/_Date_bg.py
|
||||
src/DateHandler/_Date_cs.py
|
||||
src/DateHandler/_Date_de.py
|
||||
src/DateHandler/_DateDisplay.py
|
||||
@@ -381,7 +420,6 @@ src/plugins/drawreport/TimeLine.py
|
||||
# plugins/export directory
|
||||
src/plugins/export/export.gpr.py
|
||||
src/plugins/export/ExportCsv.py
|
||||
src/plugins/export/ExportDjango.gpr.py
|
||||
src/plugins/export/ExportFtree.py
|
||||
src/plugins/export/ExportGedcom.py
|
||||
src/plugins/export/ExportGeneWeb.py
|
||||
@@ -420,8 +458,6 @@ src/plugins/graph/GVRelGraph.py
|
||||
# plugins/import directory
|
||||
src/plugins/import/import.gpr.py
|
||||
src/plugins/import/ImportCsv.py
|
||||
src/plugins/import/ImportDjango.gpr.py
|
||||
src/plugins/import/ImportDjango.py
|
||||
src/plugins/import/ImportGedcom.py
|
||||
src/plugins/import/ImportGeneWeb.py
|
||||
src/plugins/import/ImportGrdb.py
|
||||
@@ -447,6 +483,7 @@ src/plugins/lib/libpersonview.py
|
||||
src/plugins/lib/libplaceview.py
|
||||
src/plugins/lib/libplugins.gpr.py
|
||||
src/plugins/lib/libtranslate.py
|
||||
src/plugins/lib/holidays.xml.in
|
||||
|
||||
# plugins/mapservices directory
|
||||
src/plugins/mapservices/eniroswedenmap.py
|
||||
@@ -465,6 +502,7 @@ src/plugins/quickview/OnThisDay.py
|
||||
#src/plugins/quickview/Query.py
|
||||
src/plugins/quickview/quickview.gpr.py
|
||||
src/plugins/quickview/References.py
|
||||
src/plugins/quickview/LinkReferences.py
|
||||
src/plugins/quickview/Reporef.py
|
||||
src/plugins/quickview/SameSurnames.py
|
||||
src/plugins/quickview/siblings.py
|
||||
@@ -506,7 +544,6 @@ src/plugins/textreport/Summary.py
|
||||
src/plugins/textreport/textplugins.gpr.py
|
||||
|
||||
# plugins/tool directory
|
||||
src/plugins/tool/CalculateEstimatedDates.py
|
||||
src/plugins/tool/ChangeNames.py
|
||||
src/plugins/tool/ChangeTypes.py
|
||||
src/plugins/tool/Check.py
|
||||
@@ -534,8 +571,8 @@ src/plugins/tool/Verify.py
|
||||
#plugins/view directory
|
||||
src/plugins/view/eventview.py
|
||||
src/plugins/view/familyview.py
|
||||
src/plugins/view/fanchartview.gpr.py
|
||||
src/plugins/view/fanchartview.py
|
||||
src/plugins/view/fanchartview.gpr.py
|
||||
src/plugins/view/geoview.py
|
||||
src/plugins/view/geoview.gpr.py
|
||||
src/plugins/view/grampletview.py
|
||||
@@ -543,8 +580,6 @@ src/plugins/view/htmlrenderer.py
|
||||
src/plugins/view/mediaview.py
|
||||
src/plugins/view/noteview.py
|
||||
src/plugins/view/pedigreeview.py
|
||||
src/plugins/view/pedigreeviewext.py
|
||||
src/plugins/view/pedigreeviewext.gpr.py
|
||||
src/plugins/view/personlistview.py
|
||||
src/plugins/view/persontreeview.py
|
||||
src/plugins/view/placelistview.py
|
||||
@@ -560,30 +595,9 @@ src/plugins/webreport/NarrativeWeb.py
|
||||
src/plugins/webreport/WebCal.py
|
||||
src/plugins/webreport/webplugins.gpr.py
|
||||
|
||||
# PluginUtils package
|
||||
src/PluginUtils/_GuiOptions.py
|
||||
src/PluginUtils/_Options.py
|
||||
src/PluginUtils/_PluginDialogs.py
|
||||
src/PluginUtils/_PluginWindows.py
|
||||
src/PluginUtils/_Tool.py
|
||||
|
||||
# ReportBase package
|
||||
src/ReportBase/_CommandLineReport.py
|
||||
src/ReportBase/_Constants.py
|
||||
src/ReportBase/_DocReportDialog.py
|
||||
src/ReportBase/_DrawReportDialog.py
|
||||
src/ReportBase/_Endnotes.py
|
||||
src/ReportBase/_GraphvizReportDialog.py
|
||||
src/ReportBase/_FileEntry.py
|
||||
src/ReportBase/__init__.py
|
||||
src/ReportBase/_PaperMenu.py
|
||||
src/ReportBase/_ReportDialog.py
|
||||
src/ReportBase/_ReportOptions.py
|
||||
src/ReportBase/_Report.py
|
||||
src/ReportBase/_ReportUtils.py
|
||||
src/ReportBase/_StyleComboBox.py
|
||||
src/ReportBase/_StyleEditor.py
|
||||
src/ReportBase/_TextReportDialog.py
|
||||
# plugins/webstuff directory
|
||||
src/plugins/webstuff/webstuff.gpr.py
|
||||
src/plugins/webstuff/webstuff.py
|
||||
|
||||
# Filters package
|
||||
src/Filters/_FilterComboBox.py
|
||||
@@ -639,7 +653,6 @@ src/Filters/Rules/Person/_HasMarkerOf.py
|
||||
src/Filters/Rules/Person/_HasNameOf.py
|
||||
src/Filters/Rules/Person/_HasNote.py
|
||||
src/Filters/Rules/Person/_HasNoteMatchingSubstringOf.py
|
||||
src/Filters/Rules/Person/_HasNote.py
|
||||
src/Filters/Rules/Person/_HasNoteRegexp.py
|
||||
src/Filters/Rules/Person/_HasRelationship.py
|
||||
src/Filters/Rules/Person/_HasSource.py
|
||||
@@ -851,6 +864,7 @@ src/glade/editrepository.glade
|
||||
src/glade/editreporef.glade
|
||||
src/glade/editpersonref.glade
|
||||
src/glade/editlocation.glade
|
||||
src/glade/editlink.glade
|
||||
src/glade/editfamily.glade
|
||||
src/glade/editchildref.glade
|
||||
src/glade/editattribute.glade
|
||||
@@ -865,10 +879,19 @@ src/glade/editsourceref.glade
|
||||
src/glade/editname.glade
|
||||
src/glade/editevent.glade
|
||||
src/glade/mergedata.glade
|
||||
src/glade/mergeevent.glade
|
||||
src/glade/mergefamily.glade
|
||||
src/glade/mergemedia.glade
|
||||
src/glade/mergenote.glade
|
||||
src/glade/mergeperson.glade
|
||||
src/glade/mergeplace.glade
|
||||
src/glade/mergerepository.glade
|
||||
src/glade/mergesource.glade
|
||||
src/glade/plugins.glade
|
||||
src/glade/rule.glade
|
||||
src/glade/scratchpad.glade
|
||||
src/glade/papermenu.glade
|
||||
src/glade/updateaddons.glade
|
||||
src/plugins/tool/notrelated.glade
|
||||
src/plugins/bookreport.glade
|
||||
src/plugins/tool/changenames.glade
|
||||
@@ -892,11 +915,12 @@ src/plugins/export/exportgeneweb.glade
|
||||
src/plugins/export/exportvcalendar.glade
|
||||
src/plugins/export/exportvcard.glade
|
||||
src/plugins/tool/verify.glade
|
||||
|
||||
#
|
||||
# web
|
||||
#
|
||||
src/web/grampsdb/views.py
|
||||
src/web/utils.py
|
||||
#src/web/grampsdb/views.py
|
||||
#src/web/utils.py
|
||||
#
|
||||
# Files to extract from and then merge into
|
||||
#
|
||||
|
||||
@@ -16,6 +16,7 @@ src/plugins/gramplet/NoteGramplet.py
|
||||
src/plugins/gramplet/PluginManagerGramplet.py
|
||||
src/plugins/gramplet/PythonGramplet.py
|
||||
src/plugins/import/ImportSql.py
|
||||
src/plugins/tool/CalculateEstimatedDates.py
|
||||
src/plugins/tool/DateParserDisplayTest.py
|
||||
src/plugins/tool/DumpGenderStats.py
|
||||
src/plugins/tool/PHPGedViewConnector.py
|
||||
@@ -25,4 +26,8 @@ src/plugins/gramplet/FaqGramplet.py
|
||||
src/plugins/gramplet/HeadlineNewsGramplet.py
|
||||
src/plugins/quickview/AllNames.py
|
||||
src/plugins/quickview/Query.py
|
||||
src/plugins/sidebar/sidebar.gpr.py
|
||||
src/ReportBase/_DocReportDialog.py
|
||||
src/Simple/_SimpleDoc.py
|
||||
src/web/grampsdb/views.py
|
||||
src/web/utils.py
|
||||
|
||||
+6212
-5646
File diff suppressed because it is too large
Load Diff
+6
-16
@@ -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
|
||||
|
||||
+2
-3
@@ -186,7 +186,6 @@ class DateEditorDialog(ManagedWindow.ManagedWindow):
|
||||
"""
|
||||
Initiate and display the dialog.
|
||||
"""
|
||||
|
||||
ManagedWindow.ManagedWindow.__init__(self, uistate, track, self)
|
||||
|
||||
# Create self.date as a copy of the given Date object.
|
||||
@@ -240,7 +239,7 @@ class DateEditorDialog(ManagedWindow.ManagedWindow):
|
||||
|
||||
self.dual_dated = self.top.get_object('dualdated')
|
||||
self.new_year = self.top.get_object('newyear')
|
||||
self.new_year.set_active(self.date.get_new_year())
|
||||
self.new_year.set_text(self.date.newyear_to_str())
|
||||
|
||||
# Disable second date controls if not compound date
|
||||
if not self.date.is_compound():
|
||||
@@ -341,7 +340,7 @@ class DateEditorDialog(ManagedWindow.ManagedWindow):
|
||||
self.start_year.get_value_as_int(),
|
||||
self.dual_dated.get_active())
|
||||
calendar = self.calendar_box.get_active()
|
||||
newyear = self.new_year.get_active()
|
||||
newyear = Date.newyear_to_code(self.new_year.get_text())
|
||||
return (quality, modifier, calendar, value, text, newyear)
|
||||
|
||||
def switch_type(self, obj):
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/DateHandler
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
_Date_ca.py\
|
||||
_Date_bg.py\
|
||||
_Date_ca.py\
|
||||
_Date_cs.py\
|
||||
_Date_de.py\
|
||||
_Date_es.py\
|
||||
_Date_fi.py\
|
||||
_Date_fr.py\
|
||||
_Date_hr.py\
|
||||
_Date_hr.py\
|
||||
_Date_it.py\
|
||||
_Date_lt.py\
|
||||
_Date_nb.py\
|
||||
@@ -21,6 +22,7 @@ pkgdata_PYTHON = \
|
||||
_Date_pt.py\
|
||||
_Date_ru.py\
|
||||
_Date_sk.py\
|
||||
_Date_sl.py\
|
||||
_Date_sr.py\
|
||||
_Date_sv.py\
|
||||
_DateDisplay.py\
|
||||
|
||||
@@ -139,12 +139,17 @@ 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:
|
||||
if retval:
|
||||
retval += ","
|
||||
retval += ", "
|
||||
retval += item
|
||||
if retval:
|
||||
return " (%s)" % retval
|
||||
|
||||
@@ -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 = {
|
||||
@@ -303,20 +317,25 @@ class DateParser(object):
|
||||
self._imon_str = self.re_longest_first(self.islamic_to_int.keys())
|
||||
self._smon_str = self.re_longest_first(self.swedish_to_int.keys())
|
||||
self._cal_str = self.re_longest_first(self.calendar_to_int.keys())
|
||||
self._ny_str = self.re_longest_first(self.newyear_to_int.keys())
|
||||
self._ny_str = self.re_longest_first(self.newyear_to_int.keys())
|
||||
|
||||
# bce, calendar type and quality may be either at the end or at
|
||||
# the beginning of the given date string, therefore they will
|
||||
# be parsed from the middle and will be in match.group(2).
|
||||
self._bce_re = re.compile("(.*)\s+%s( ?.*)" % self._bce_str)
|
||||
self._bce_re = re.compile("(.*)\s+%s( ?.*)" % self._bce_str)
|
||||
|
||||
self._cal = re.compile("(.*)\s+\(%s\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
self._calny = re.compile("(.*)\s+\(%s,\s*%s\)( ?.*)" % (self._cal_str,
|
||||
self._ny_str),
|
||||
re.IGNORECASE)
|
||||
self._calny_iso = re.compile("(.*)\s+\(%s,\s*(\d{1,2}-\d{1,2})\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
|
||||
self._ny = re.compile("(.*)\s+\(%s\)( ?.*)" % self._ny_str,
|
||||
re.IGNORECASE)
|
||||
self._ny_iso = re.compile("(.*)\s+\((\d{1,2}-\d{1,2})\)( ?.*)")
|
||||
|
||||
self._cal = re.compile("(.*)\s+\(%s\)( ?.*)" % self._cal_str,
|
||||
re.IGNORECASE)
|
||||
self._calny = re.compile("(.*)\s+\(%s,%s\)( ?.*)" % (self._cal_str,
|
||||
self._ny_str),
|
||||
re.IGNORECASE)
|
||||
self._ny = re.compile("(.*)\s+\(%s\)( ?.*)" % self._ny_str,
|
||||
re.IGNORECASE)
|
||||
self._qual = re.compile("(.* ?)%s\s+(.+)" % self._qual_str,
|
||||
re.IGNORECASE)
|
||||
|
||||
@@ -355,6 +374,7 @@ class DateParser(object):
|
||||
re.IGNORECASE)
|
||||
self._numeric = re.compile("((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$")
|
||||
self._iso = re.compile("(\d+)(/(\d+))?-(\d+)-(\d+)\s*$")
|
||||
self._isotimestamp = re.compile("^\s*?(\d{4})([01]\d)([0123]\d)(?:(?:[012]\d[0-5]\d[0-5]\d)|(?:\s+[012]\d:[0-5]\d(?::[0-5]\d)?))?\s*?$")
|
||||
self._rfc = re.compile("(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+(\+|-)\d\d\d\d"
|
||||
% (self._rfc_day_str, self._rfc_mon_str))
|
||||
|
||||
@@ -430,7 +450,6 @@ class DateParser(object):
|
||||
m = 0
|
||||
else:
|
||||
m = mmap[groups[1].lower()]
|
||||
|
||||
d = self._get_int(groups[0])
|
||||
|
||||
if groups[2] is None:
|
||||
@@ -487,6 +506,19 @@ class DateParser(object):
|
||||
else:
|
||||
return (d, m, y, False)
|
||||
|
||||
# Database datetime format, used in ex. MSSQL
|
||||
# YYYYMMDD HH:MM:SS or YYYYMMDD or YYYYMMDDHHMMSS
|
||||
match = self._isotimestamp.match(text)
|
||||
if match:
|
||||
groups = match.groups()
|
||||
y = self._get_int(groups[0])
|
||||
m = self._get_int(groups[1])
|
||||
d = self._get_int(groups[2])
|
||||
value = (d, m, y, False)
|
||||
if not check((d, m, y)):
|
||||
value = Date.Empty
|
||||
return value
|
||||
|
||||
match = self._rfc.match(text)
|
||||
if match:
|
||||
groups = match.groups()
|
||||
@@ -549,6 +581,12 @@ class DateParser(object):
|
||||
cal = self.calendar_to_int[match.group(2).lower()]
|
||||
newyear = self.newyear_to_int[match.group(3).lower()]
|
||||
text = match.group(1) + match.group(4)
|
||||
else:
|
||||
match = self._calny_iso.match(text)
|
||||
if match:
|
||||
cal = self.calendar_to_int[match.group(2).lower()]
|
||||
newyear = tuple([int(s) for s in match.group(3).split("-")])
|
||||
text = match.group(1) + match.group(4)
|
||||
return (text, cal, newyear)
|
||||
|
||||
def match_newyear(self, text, newyear):
|
||||
@@ -561,6 +599,11 @@ class DateParser(object):
|
||||
if match:
|
||||
newyear = self.newyear_to_int[match.group(2).lower()]
|
||||
text = match.group(1) + match.group(3)
|
||||
else:
|
||||
match = self._ny_iso.match(text)
|
||||
if match:
|
||||
newyear = tuple([int(s) for s in match.group(2).split("-")])
|
||||
text = match.group(1) + match.group(3)
|
||||
return (text, newyear)
|
||||
|
||||
def match_quality(self, text, qual):
|
||||
@@ -586,11 +629,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 +656,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 +717,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 +730,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 +769,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
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id: _Date_bg.py 9101 2007-10-08 16:41:39Z dallingham $
|
||||
|
||||
"""
|
||||
Bulgarian-specific classes for parsing and displaying dates.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import re
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.lib import Date
|
||||
from _DateParser import DateParser
|
||||
from _DateDisplay import DateDisplay
|
||||
from _DateHandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Bulgarian parser
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserBG(DateParser):
|
||||
|
||||
modifier_to_int = {
|
||||
u'преди' : Date.MOD_BEFORE,
|
||||
u'пр.' : Date.MOD_BEFORE,
|
||||
u'пр' : Date.MOD_BEFORE,
|
||||
u'след' : Date.MOD_AFTER,
|
||||
u'сл.' : Date.MOD_AFTER,
|
||||
u'сл' : Date.MOD_AFTER,
|
||||
u'ок' : Date.MOD_ABOUT,
|
||||
u'ок.' : Date.MOD_ABOUT,
|
||||
u'около' : Date.MOD_ABOUT,
|
||||
u'примерно' : Date.MOD_ABOUT,
|
||||
u'прим' : Date.MOD_ABOUT,
|
||||
u'прим.' : Date.MOD_ABOUT,
|
||||
u'приблизително' : Date.MOD_ABOUT,
|
||||
u'приб.' : Date.MOD_ABOUT,
|
||||
u'прибл.' : Date.MOD_ABOUT,
|
||||
u'приб' : Date.MOD_ABOUT,
|
||||
u'прибл' : Date.MOD_ABOUT,
|
||||
}
|
||||
|
||||
calendar_to_int = {
|
||||
u'григориански' : Date.CAL_GREGORIAN,
|
||||
u'г' : Date.CAL_GREGORIAN,
|
||||
u'юлиански' : Date.CAL_JULIAN,
|
||||
u'ю' : Date.CAL_JULIAN,
|
||||
u'еврейски' : Date.CAL_HEBREW,
|
||||
u'е' : Date.CAL_HEBREW,
|
||||
u'ислямски' : Date.CAL_ISLAMIC,
|
||||
u'и' : Date.CAL_ISLAMIC,
|
||||
u'френски републикански' : Date.CAL_FRENCH,
|
||||
u'републикански' : Date.CAL_FRENCH,
|
||||
u'фр.реп.' : Date.CAL_FRENCH,
|
||||
u'р' : Date.CAL_FRENCH,
|
||||
u'френски' : Date.CAL_FRENCH,
|
||||
u'фр.' : Date.CAL_FRENCH,
|
||||
u'персийски' : Date.CAL_PERSIAN,
|
||||
u'п' : Date.CAL_PERSIAN,
|
||||
}
|
||||
|
||||
quality_to_int = {
|
||||
u'приблизително' : Date.QUAL_ESTIMATED,
|
||||
u'прибл.' : Date.QUAL_ESTIMATED,
|
||||
u'изчислено' : Date.QUAL_CALCULATED,
|
||||
u'изчисл.' : Date.QUAL_CALCULATED,
|
||||
u'изч.' : Date.QUAL_CALCULATED,
|
||||
}
|
||||
|
||||
hebrew_to_int = {
|
||||
u"тишрей":1,
|
||||
u"мархешван":2,
|
||||
u"кислев":3,
|
||||
u"тевет":4,
|
||||
u"шват":5,
|
||||
u"адар":6,
|
||||
u"адар бет":7,
|
||||
u"нисан":8,
|
||||
u"ияр":9,
|
||||
u"сиван":10,
|
||||
u"тамуз":11,
|
||||
u"ав":12,
|
||||
u"eлул":13,
|
||||
}
|
||||
|
||||
islamic_to_int = {
|
||||
u"мухаррам":1,
|
||||
u"саффар":2,
|
||||
u"рабиу-л-ауал":3,
|
||||
u"рабиу-с-сани":4,
|
||||
u"джумадал-уля":5,
|
||||
u"джумада-с-сания":6,
|
||||
u"раджаб":7,
|
||||
u"шаабан":8,
|
||||
u"рамадан":9,
|
||||
u"шауал":10,
|
||||
u"зу-л-кида":11,
|
||||
u"зул-л-хиджа":12,
|
||||
}
|
||||
|
||||
persian_to_int = {
|
||||
u"фарвардин":1,
|
||||
u"урдбихищ":2,
|
||||
u"хурдад":3,
|
||||
u"тир":4,
|
||||
u"мурдад":5,
|
||||
u"шахривар":6,
|
||||
u"михр":7,
|
||||
u"абан":8,
|
||||
u"азар":9,
|
||||
u"дай":10,
|
||||
u"бахман":11,
|
||||
u"исфаидармуз":12,
|
||||
}
|
||||
|
||||
french_to_int = {
|
||||
u"вандемер":1,
|
||||
u"брюмер":2,
|
||||
u"фример":3,
|
||||
u"нивоз":4,
|
||||
u"плювиоз":5,
|
||||
u"вантоз":6,
|
||||
u"жерминал":7,
|
||||
u"флореал":8,
|
||||
u"прериал":9,
|
||||
u"месидор":10,
|
||||
u"термидор":11,
|
||||
u"фрюктидор":12,
|
||||
u"допълнителен":13,
|
||||
}
|
||||
|
||||
bce = [
|
||||
u'преди Христа', u'пр. Хр.', u'пр.Хр.'
|
||||
] + DateParser.bce
|
||||
|
||||
def init_strings(self):
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = [u'от']
|
||||
_span_2 = [u'до']
|
||||
_range_1 = [u'между']
|
||||
_range_2 = [u'и']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Bulgarian displayer
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplayBG(DateDisplay):
|
||||
"""
|
||||
Bulgarian language date display class.
|
||||
"""
|
||||
long_months = ( u"", u"януари", u"февруари", u"март", u"април", u"май",
|
||||
u"юни", u"юли", u"август", u"септември", u"октомври",
|
||||
u"ноември", u"декември" )
|
||||
|
||||
short_months = ( u"", u"яну", u"февр", u"март", u"апр", u"май", u"юни",
|
||||
u"юли", u"авг", u"септ", u"окт", u"ное", u"дек" )
|
||||
|
||||
|
||||
calendar = (
|
||||
u"",
|
||||
u"юлиански",
|
||||
u"еврейски",
|
||||
u"републикански",
|
||||
u"персийски",
|
||||
u"ислямски",
|
||||
u"шведски"
|
||||
)
|
||||
|
||||
_mod_str = ("", "преди ", "след ", "около ", "", "", "")
|
||||
|
||||
_qual_str = ("", "приблизително ", "изчислено ")
|
||||
|
||||
_bce_str = u"%s пр. Хр."
|
||||
|
||||
formats = (
|
||||
"ГГГГ-ММ-ДД (ISO)", "Числов", "Месец Ден, Година", "Мес. Ден, Година", "Ден Месец Година", "Ден Мес. Година"
|
||||
)
|
||||
|
||||
hebrew = ( u"",
|
||||
u"Тишрей",
|
||||
u"Мархешван",
|
||||
u"Кислев",
|
||||
u"Тевет",
|
||||
u"Шват",
|
||||
u"Адар",
|
||||
u"Адар бет",
|
||||
u"Нисан",
|
||||
u"Ияр",
|
||||
u"Сиван",
|
||||
u"Тамуз",
|
||||
u"Ав",
|
||||
u"Елул",
|
||||
)
|
||||
|
||||
islamic = ( u"",
|
||||
u"Мухаррам",
|
||||
u"Саффар",
|
||||
u"Рабиу-л-ауал",
|
||||
u"Рабиу-с-сани",
|
||||
u"Джумадал-уля",
|
||||
u"Джумада-с-сания",
|
||||
u"Раджаб",
|
||||
u"Шаабан",
|
||||
u"Рамадан",
|
||||
u"Шауал",
|
||||
u"Зу-л-кида",
|
||||
u"Зул-л-хиджа",
|
||||
)
|
||||
|
||||
persian = ( u"",
|
||||
u"Фарвардин",
|
||||
u"Урдбихищ",
|
||||
u"Хурдад",
|
||||
u"Тир",
|
||||
u"Мурдад",
|
||||
u"Шахривар",
|
||||
u"Михр",
|
||||
u"Абан",
|
||||
u"Азар",
|
||||
u"Дай",
|
||||
u"Бахман",
|
||||
u"Исфаидармуз",
|
||||
)
|
||||
|
||||
french = ( u"",
|
||||
u"Вандемер",
|
||||
u"Брюмер",
|
||||
u"Фример",
|
||||
u"Нивоз",
|
||||
u"Плювиоз",
|
||||
u"Вантоз",
|
||||
u"Жерминал",
|
||||
u"Флореал",
|
||||
u"Прериал",
|
||||
u"Мессидор",
|
||||
u"Термидор",
|
||||
u"Фрюктидор",
|
||||
u"Допълнителен"
|
||||
)
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
Returns a text string representing the date.
|
||||
"""
|
||||
mod = date.get_modifier()
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
newyear = date.get_new_year()
|
||||
|
||||
qual_str = self._qual_str[qual]
|
||||
|
||||
if mod == Date.MOD_TEXTONLY:
|
||||
return date.get_text()
|
||||
elif start == Date.EMPTY:
|
||||
return ""
|
||||
elif mod == Date.MOD_SPAN:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%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())
|
||||
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)
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(('bg_BG', 'bg', 'bulgarian', 'Bulgarian'),
|
||||
DateParserBG, DateDisplayBG)
|
||||
+15
-12
@@ -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
@@ -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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
+87
-23
@@ -56,27 +56,87 @@ class DateParserDE(DateParser):
|
||||
month_to_int[u"jan"] = 1
|
||||
month_to_int[u"jänner"] = 1
|
||||
month_to_int[u"jän"] = 1
|
||||
# Add other common latin, local and historical variants
|
||||
|
||||
# Add other common latin,
|
||||
|
||||
month_to_int[u"januaris"] = 1
|
||||
month_to_int[u"januarii"] = 1
|
||||
month_to_int[u"januarius"] = 1
|
||||
month_to_int[u"februaris"] = 2
|
||||
month_to_int[u"februarii"] = 2
|
||||
month_to_int[u"februarius"] = 2
|
||||
month_to_int[u"martii"] = 3
|
||||
month_to_int[u"martius"] = 3
|
||||
month_to_int[u"aprilis"] = 4
|
||||
month_to_int[u"maius"] = 5
|
||||
month_to_int[u"maii"] = 5
|
||||
month_to_int[u"junius"] = 6
|
||||
month_to_int[u"junii"] = 6
|
||||
month_to_int[u"julius"] = 7
|
||||
month_to_int[u"julii"] = 7
|
||||
month_to_int[u"augustus"] = 8
|
||||
month_to_int[u"augusti"] = 8
|
||||
month_to_int[u"septembris"] = 9
|
||||
month_to_int[u"7bris"] = 9
|
||||
month_to_int[u"september"] = 9
|
||||
month_to_int[u"october"] = 10
|
||||
month_to_int[u"octobris"] = 10
|
||||
month_to_int[u"8bris"] = 10
|
||||
month_to_int[u"novembris"] = 11
|
||||
month_to_int[u"9bris"] = 11
|
||||
month_to_int[u"november"] = 11
|
||||
month_to_int[u"decembris"] = 12
|
||||
month_to_int[u"10bris"] = 12
|
||||
month_to_int[u"xbris"] = 12
|
||||
month_to_int[u"december"] = 12
|
||||
|
||||
# local and historical variants
|
||||
|
||||
month_to_int[u"jenner"] = 1
|
||||
month_to_int[u"feber"] = 2
|
||||
month_to_int[u"februaris"] = 2
|
||||
month_to_int[u"merz"] = 3
|
||||
month_to_int[u"aprilis"] = 4
|
||||
month_to_int[u"maius"] = 5
|
||||
month_to_int[u"junius"] = 6
|
||||
month_to_int[u"julius"] = 7
|
||||
month_to_int[u"augst"] = 8
|
||||
month_to_int[u"7ber"] = 9
|
||||
month_to_int[u"7bris"] = 9
|
||||
month_to_int[u"8ber"] = 10
|
||||
month_to_int[u"8bris"] = 10
|
||||
month_to_int[u"9ber"] = 11
|
||||
month_to_int[u"9bris"] = 11
|
||||
month_to_int[u"10ber"] = 12
|
||||
month_to_int[u"10bris"] = 12
|
||||
month_to_int[u"xber"] = 12
|
||||
month_to_int[u"xbris"] = 12
|
||||
|
||||
# old german names
|
||||
|
||||
month_to_int[u"hartung"] = 1
|
||||
month_to_int[u"eismond"] = 1
|
||||
month_to_int[u"hornung"] = 2
|
||||
month_to_int[u"schmelzmond"] = 2
|
||||
month_to_int[u"taumond"] = 2
|
||||
month_to_int[u"narrenmond"] = 2
|
||||
month_to_int[u"rebmond"] = 2
|
||||
month_to_int[u"hintester"] = 2
|
||||
month_to_int[u"lenzing"] = 3
|
||||
month_to_int[u"lenzmond"] = 3
|
||||
month_to_int[u"launing"] = 4
|
||||
month_to_int[u"ostermond"] = 4
|
||||
month_to_int[u"winnemond"] = 5
|
||||
month_to_int[u"weidenmonat"] = 5
|
||||
month_to_int[u"blumenmond"] = 5
|
||||
month_to_int[u"brachet"] = 6
|
||||
month_to_int[u"brachmond"] = 6
|
||||
month_to_int[u"heuert"] = 7
|
||||
month_to_int[u"heumond"] = 7
|
||||
month_to_int[u"ernting"] = 8
|
||||
month_to_int[u"erntemond"] = 8
|
||||
month_to_int[u"bisemond"] = 8
|
||||
month_to_int[u"scheiding"] = 9
|
||||
month_to_int[u"herbstmond"] = 9
|
||||
month_to_int[u"gilbhard"] = 10
|
||||
month_to_int[u"gilbhart"] = 10
|
||||
month_to_int[u"windmond"] = 11
|
||||
month_to_int[u"nebelung"] = 11
|
||||
month_to_int[u"wintermond"] = 11
|
||||
month_to_int[u"julmond"] = 12
|
||||
month_to_int[u"heilmond"] = 12
|
||||
month_to_int[u"christmond"] = 12
|
||||
month_to_int[u"dustermond"] = 12
|
||||
|
||||
modifier_to_int = {
|
||||
u'vor' : Date.MOD_BEFORE,
|
||||
@@ -137,18 +197,18 @@ class DateDisplayDE(DateDisplay):
|
||||
"""
|
||||
German 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" )
|
||||
|
||||
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" )
|
||||
long_months = ( u"", u"Januar", u"Februar", u"März", u"April", u"Mai",
|
||||
u"Juni", u"Juli", u"August", u"September", u"Oktober",
|
||||
u"November", u"Dezember" )
|
||||
|
||||
short_months = ( u"", u"Jan", u"Feb", u"Mär", u"Apr", u"Mai", u"Jun",
|
||||
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 ", "", "", "")
|
||||
@@ -229,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]
|
||||
|
||||
@@ -239,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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -115,6 +115,7 @@ class DateParserHR(DateParser):
|
||||
month_to_int[u"septembar"] = 9
|
||||
month_to_int[u"septembra"] = 9
|
||||
month_to_int[u"ix"] = 9
|
||||
month_to_int[u"7ber"] = 9
|
||||
|
||||
month_to_int[u"listopad"] = 10
|
||||
month_to_int[u"listopada"] = 10
|
||||
@@ -122,6 +123,7 @@ class DateParserHR(DateParser):
|
||||
month_to_int[u"oktobar"] = 10
|
||||
month_to_int[u"oktobra"] = 10
|
||||
month_to_int[u"x"] = 10
|
||||
month_to_int[u"8ber"] = 10
|
||||
|
||||
month_to_int[u"studeni"] = 11
|
||||
month_to_int[u"studenog"] = 11
|
||||
@@ -129,6 +131,7 @@ class DateParserHR(DateParser):
|
||||
month_to_int[u"novembar"] = 11
|
||||
month_to_int[u"novembra"] = 11
|
||||
month_to_int[u"xi"] = 11
|
||||
month_to_int[u"9ber"] = 11
|
||||
|
||||
month_to_int[u"prosinac"] = 12
|
||||
month_to_int[u"prosinca"] = 12
|
||||
@@ -160,7 +163,7 @@ class DateParserHR(DateParser):
|
||||
u'franc.' : Date.CAL_FRENCH,
|
||||
u'perzijski' : Date.CAL_PERSIAN,
|
||||
u'perz. ' : Date.CAL_PERSIAN,
|
||||
u'swedish' : Date.CAL_SWEDISH,
|
||||
u'švedski' : Date.CAL_SWEDISH,
|
||||
u's' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
@@ -224,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 ", "", "", "")
|
||||
@@ -319,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]
|
||||
|
||||
@@ -329,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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
+18
-15
@@ -101,21 +101,20 @@ 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"Sausio", u"Vasario", u"Kovo", u"Balandzio",
|
||||
u"Geguzes", u"Birzelio", u"Liepos", u"Rugpjucio",
|
||||
u"Rugsejo", u"Spalio", u"Lapkricio", 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 +138,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 +149,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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -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
@@ -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
@@ -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'até' : 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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
+19
-15
@@ -187,22 +187,22 @@ class DateDisplayRU(DateDisplay):
|
||||
"""
|
||||
Russian 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"Январь", u"Февраль", u"Март", u"Апрель", u"Май",
|
||||
u"Июнь", u"Июль", u"Август", u"Сентябрь", u"Октябрь",
|
||||
u"Ноябрь", u"Декабрь")
|
||||
|
||||
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"Янва", u"Февр", u"Март", u"Апре", u"Май",
|
||||
u"Июн", u"Июл", u"Авгу", u"Сент", u"Октя",
|
||||
u"Нояб", u"Дека")
|
||||
|
||||
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
@@ -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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Slovenian version 2010 by Bernard Banko, based on croatian one by Josip
|
||||
|
||||
"""
|
||||
Slovenian-specific classes for parsing and displaying dates.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import re
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.lib import Date
|
||||
from _DateParser import DateParser
|
||||
from _DateDisplay import DateDisplay
|
||||
from _DateHandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Slovenian parser
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserSL(DateParser):
|
||||
"""
|
||||
Converts a text string into a Date object
|
||||
"""
|
||||
month_to_int = DateParser.month_to_int
|
||||
|
||||
month_to_int[u"januar"] = 1
|
||||
month_to_int[u"januarja"] = 1
|
||||
month_to_int[u"januarjem"] = 1
|
||||
month_to_int[u"jan"] = 1
|
||||
month_to_int[u"i"] = 1
|
||||
|
||||
month_to_int[u"februar"] = 2
|
||||
month_to_int[u"februarjem"] = 2
|
||||
month_to_int[u"februarja"] = 2
|
||||
month_to_int[u"feb"] = 2
|
||||
month_to_int[u"ii"] = 2
|
||||
|
||||
month_to_int[u"mar"] = 3
|
||||
month_to_int[u"marcem"] = 3
|
||||
month_to_int[u"marec"] = 3
|
||||
month_to_int[u"marca"] = 3
|
||||
month_to_int[u"iii"] = 3
|
||||
|
||||
month_to_int[u"apr"] = 4
|
||||
month_to_int[u"april"] = 4
|
||||
month_to_int[u"aprilom"] = 4
|
||||
month_to_int[u"aprila"] = 4
|
||||
month_to_int[u"iv"] = 4
|
||||
|
||||
month_to_int[u"maj"] = 5
|
||||
month_to_int[u"maja"] = 5
|
||||
month_to_int[u"majem"] = 5
|
||||
month_to_int[u"v"] = 5
|
||||
|
||||
month_to_int[u"jun"] = 6
|
||||
month_to_int[u"junij"] = 6
|
||||
month_to_int[u"junijem"] = 6
|
||||
month_to_int[u"junija"] = 6
|
||||
month_to_int[u"vi"] = 6
|
||||
|
||||
month_to_int[u"jul"] = 7
|
||||
month_to_int[u"julij"] = 7
|
||||
month_to_int[u"julijem"] = 7
|
||||
month_to_int[u"julija"] = 7
|
||||
month_to_int[u"vii"] = 7
|
||||
|
||||
month_to_int[u"avg"] = 8
|
||||
month_to_int[u"avgust"] = 8
|
||||
month_to_int[u"avgustom"] = 8
|
||||
month_to_int[u"avgusta"] = 8
|
||||
month_to_int[u"viii"] = 8
|
||||
|
||||
month_to_int[u"sep"] = 9
|
||||
month_to_int[u"sept"] = 9
|
||||
month_to_int[u"september"] = 9
|
||||
month_to_int[u"septembrom"] = 9
|
||||
month_to_int[u"septembra"] = 9
|
||||
month_to_int[u"ix"] = 9
|
||||
|
||||
month_to_int[u"okt"] = 10
|
||||
month_to_int[u"oktober"] = 10
|
||||
month_to_int[u"oktobrom"] = 10
|
||||
month_to_int[u"oktobra"] = 10
|
||||
month_to_int[u"x"] = 10
|
||||
|
||||
month_to_int[u"nov"] = 11
|
||||
month_to_int[u"november"] = 11
|
||||
month_to_int[u"novembrom"] = 11
|
||||
month_to_int[u"novembra"] = 11
|
||||
month_to_int[u"xi"] = 11
|
||||
|
||||
month_to_int[u"dec"] = 12
|
||||
month_to_int[u"december"] = 12
|
||||
month_to_int[u"decembrom"] = 12
|
||||
month_to_int[u"decembra"] = 12
|
||||
month_to_int[u"xii"] = 12
|
||||
|
||||
modifier_to_int = {
|
||||
u'pred' : Date.MOD_BEFORE,
|
||||
u'pr.' : Date.MOD_BEFORE,
|
||||
u'po' : Date.MOD_AFTER,
|
||||
u'okoli' : Date.MOD_ABOUT,
|
||||
u'okrog' : Date.MOD_ABOUT,
|
||||
u'okr.' : Date.MOD_ABOUT,
|
||||
u'ok.' : Date.MOD_ABOUT,
|
||||
u'cca.' : Date.MOD_ABOUT,
|
||||
u'cca' : Date.MOD_ABOUT,
|
||||
u'circa' : Date.MOD_ABOUT,
|
||||
u'ca.' : Date.MOD_ABOUT,
|
||||
}
|
||||
|
||||
calendar_to_int = {
|
||||
u'gregorijanski' : Date.CAL_GREGORIAN,
|
||||
u'greg.' : Date.CAL_GREGORIAN,
|
||||
u'julijanski' : Date.CAL_JULIAN,
|
||||
u'jul.' : Date.CAL_JULIAN,
|
||||
u'hebrejski' : Date.CAL_HEBREW,
|
||||
u'hebr.' : Date.CAL_HEBREW,
|
||||
u'islamski' : Date.CAL_ISLAMIC,
|
||||
u'isl.' : Date.CAL_ISLAMIC,
|
||||
u'francoski republikanski': Date.CAL_FRENCH,
|
||||
u'franc.' : Date.CAL_FRENCH,
|
||||
u'perzijski' : Date.CAL_PERSIAN,
|
||||
u'perz. ' : Date.CAL_PERSIAN,
|
||||
u'švedski' : Date.CAL_SWEDISH,
|
||||
u'šved.' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
quality_to_int = {
|
||||
u'približno' : Date.QUAL_ESTIMATED,
|
||||
u'pribl.' : Date.QUAL_ESTIMATED,
|
||||
u'izračunano' : Date.QUAL_CALCULATED,
|
||||
u'izrač.' : Date.QUAL_CALCULATED,
|
||||
}
|
||||
|
||||
bce = ["pred našim štetjem", "pred Kristusom",
|
||||
"p.n.š.", "p. n. š.", "pr.Kr.", "pr. Kr."] + DateParser.bce
|
||||
|
||||
def init_strings(self):
|
||||
"""
|
||||
compiles regular expression strings for matching dates
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
# match 'Day. MONTH year.' format with or without dots
|
||||
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
|
||||
% self._mon_str, re.IGNORECASE)
|
||||
# match Day.Month.Year.
|
||||
self._numeric = re.compile("((\d+)[/\.-])?\s*((\d+)[/\.-])?\s*(\d+)\.?$")
|
||||
|
||||
self._span = re.compile("od\s+(?P<start>.+)\s+do\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile(
|
||||
u"med\s+(?P<start>.+)\s+in\s+(?P<stop>.+)",
|
||||
re.IGNORECASE)
|
||||
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'\
|
||||
% self._jmon_str, re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Slovenian display
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplaySL(DateDisplay):
|
||||
"""
|
||||
Slovenian language date display class.
|
||||
"""
|
||||
long_months = ( u"", u"januarja", u"februarja", u"marca",u"aprila",
|
||||
u"maja", u"junija", u"julija", u"avgusta", u"septembra",
|
||||
u"oktobra", u"novembra", u"decembra"
|
||||
)
|
||||
|
||||
short_months = ( u"", u"jan", u"feb", u"mar", u"apr", u"maj", u"jun",
|
||||
u"jul", u"avg", u"sep", u"okt", u"nov", u"dec"
|
||||
)
|
||||
|
||||
calendar = (
|
||||
"", u"julijanski", u"hebrejski",
|
||||
u"francoski republikanski", u"perzijski", u"islamski",
|
||||
u"švedski"
|
||||
)
|
||||
|
||||
_mod_str = ("", "pred ", "po ", "okrog ", "", "", "")
|
||||
|
||||
_qual_str = ("", "približno ", "izračunano ")
|
||||
|
||||
_bce_str = "%s p.n.š."
|
||||
|
||||
formats = (
|
||||
"ISO (leto-mm-dd)",
|
||||
"številčno",
|
||||
"dan. mes. leto",
|
||||
"dan. mesec leto"
|
||||
)
|
||||
|
||||
def _display_gregorian(self, date_val):
|
||||
"""
|
||||
display gregorian calendar date in different format
|
||||
"""
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if self.format == 0:
|
||||
return self.display_iso(date_val)
|
||||
elif self.format == 1:
|
||||
# D. M. YYYY
|
||||
if date_val[3]:
|
||||
return self.display_iso(date_val)
|
||||
else:
|
||||
if date_val[0] == 0 and date_val[1] == 0:
|
||||
value = str(date_val[2])
|
||||
else:
|
||||
value = self._tformat.replace('%m', str(date_val[1]))
|
||||
value = value.replace('%d', str(date_val[0]))
|
||||
value = value.replace('%Y', str(date_val[2]))
|
||||
value = value.replace('-', '. ')
|
||||
elif self.format == 2:
|
||||
# D. mon. YYYY
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s. %s" % (self.short_months[date_val[1]], year)
|
||||
else:
|
||||
value = "%d. %s. %s" % (date_val[0],
|
||||
self.short_months[date_val[1]], year)
|
||||
else:
|
||||
# D. month YYYY
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = "%s." % year
|
||||
else:
|
||||
value = "%s %s" % (self.long_months[date_val[1]], year)
|
||||
else:
|
||||
value = "%d. %s %s" % (
|
||||
date_val[0],self.long_months[date_val[1]], year)
|
||||
if date_val[2] < 0:
|
||||
return self._bce_str % value
|
||||
else:
|
||||
return value
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
Return a text string representing the date.
|
||||
"""
|
||||
mod = date.get_modifier()
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
newyear = date.get_new_year()
|
||||
|
||||
qual_str = self._qual_str[qual]
|
||||
|
||||
if mod == Date.MOD_TEXTONLY:
|
||||
return date.get_text()
|
||||
elif start == Date.EMPTY:
|
||||
return u""
|
||||
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 u"%sod %s do %s%s" % (qual_str, d_1, d_2, scal)
|
||||
elif mod == Date.MOD_RANGE:
|
||||
d_1 = self.display_cal[cal](start)
|
||||
d_2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
date_string = u"%smed %s in %s%s" % (qual_str, d_1, d_2, scal)
|
||||
date_string = date_string.replace(u"a ",u"em ") #to correct declination
|
||||
date_string = date_string.replace(u"lem ",u"lom ")
|
||||
date_string = date_string.replace(u"rem ",u"rom ")
|
||||
date_string = date_string.replace(u"tem ",u"tom ")
|
||||
return date_string
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
scal = self.format_extras(cal, newyear)
|
||||
date_string = "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|
||||
return date_string
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(("sl", "SL", "sl_SI", "slovenščina", "slovenian", "Slovenian",
|
||||
"sl_SI.UTF8", "sl_SI.UTF-8", "sl_SI.utf-8", "sl_SI.utf8"),
|
||||
DateParserSL, DateDisplaySL)
|
||||
@@ -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
@@ -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)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
@@ -29,6 +29,7 @@ from _DateHandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY,
|
||||
register_datehandler)
|
||||
|
||||
# Import all the localized handlers
|
||||
import _Date_bg
|
||||
import _Date_ca
|
||||
import _Date_cs
|
||||
import _Date_de
|
||||
@@ -44,6 +45,7 @@ import _Date_pl
|
||||
import _Date_pt
|
||||
import _Date_ru
|
||||
import _Date_sk
|
||||
import _Date_sl
|
||||
import _Date_sr
|
||||
import _Date_sv
|
||||
|
||||
|
||||
+10
-2
@@ -125,11 +125,15 @@ class _DdTargets(object):
|
||||
self.REPO_LINK = _DdType(self, 'repo-link')
|
||||
self.REPOREF = _DdType(self, 'reporef')
|
||||
self.PERSON_LINK = _DdType(self, 'person-link')
|
||||
self.PERSON_LINK_LIST = _DdType(self, 'person-link-list')
|
||||
self.FAMILY_LINK = _DdType(self, 'family-link')
|
||||
self.LINK_LIST = _DdType(self, 'link-list')
|
||||
self.RAW_LIST = _DdType(self, 'raw-list')
|
||||
self.HANDLE_LIST = _DdType(self, 'handle-list')
|
||||
self.PERSONREF = _DdType(self, 'personref')
|
||||
self.SOURCEREF = _DdType(self, 'srcref')
|
||||
self.SOURCE_LINK = _DdType(self, 'source-link')
|
||||
self.URL = _DdType(self, 'url')
|
||||
self.SURNAME = _DdType(self, 'surname')
|
||||
|
||||
# List of all types that are used between
|
||||
# gramps widgets but should not be exported
|
||||
@@ -146,13 +150,17 @@ class _DdTargets(object):
|
||||
self.NOTE_LINK,
|
||||
self.PLACE_LINK,
|
||||
self.PERSON_LINK,
|
||||
self.PERSON_LINK_LIST,
|
||||
self.FAMILY_LINK,
|
||||
self.LINK_LIST,
|
||||
self.RAW_LIST,
|
||||
self.HANDLE_LIST,
|
||||
self.PERSONREF,
|
||||
self.REPO_LINK,
|
||||
self.REPOREF,
|
||||
self.SOURCEREF,
|
||||
self.SOURCE_LINK,
|
||||
self.URL,
|
||||
self.SURNAME
|
||||
]
|
||||
|
||||
self.CHILD = _DdType(self, 'child')
|
||||
|
||||
+49
-10
@@ -80,10 +80,22 @@ class History(gen.utils.Callback):
|
||||
'mru-changed' : (list, )
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, dbstate, nav_type):
|
||||
gen.utils.Callback.__init__(self)
|
||||
self.clear()
|
||||
|
||||
dbstate.connect('database-changed', self.connect_signals)
|
||||
self.signal_map = {}
|
||||
self.signal_map[nav_type.lower() + '-delete'] = self.handles_removed
|
||||
self.signal_map[nav_type.lower() + '-rebuild'] = self.history_changed
|
||||
|
||||
def connect_signals(self, dbstate):
|
||||
"""
|
||||
Connects database signals when the database has changed.
|
||||
"""
|
||||
for sig in self.signal_map:
|
||||
dbstate.connect(sig, self.signal_map[sig])
|
||||
|
||||
def clear(self):
|
||||
"""
|
||||
Clears the history, resetting the values back to their defaults
|
||||
@@ -191,6 +203,22 @@ class History(gen.utils.Callback):
|
||||
if not self.at_end():
|
||||
self.history = self.history[0:self.index+1]
|
||||
|
||||
def handles_removed(self, handle_list):
|
||||
"""
|
||||
Called in response to an object-delete signal.
|
||||
Removes a list of handles from the history.
|
||||
"""
|
||||
for handle in handle_list:
|
||||
self.remove(handle)
|
||||
|
||||
def history_changed(self):
|
||||
"""
|
||||
Called in response to an object-rebuild signal.
|
||||
Objects in the history list may have been deleted.
|
||||
"""
|
||||
self.clear()
|
||||
self.emit('mru-changed', (self.mru, ))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Recent Docs Menu
|
||||
@@ -279,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()
|
||||
@@ -301,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()
|
||||
|
||||
@@ -370,13 +408,13 @@ class DisplayState(gen.utils.Callback):
|
||||
"""
|
||||
return self.history_lookup.get((nav_type, nav_group))
|
||||
|
||||
def register(self, nav_type, nav_group):
|
||||
def register(self, dbstate, nav_type, nav_group):
|
||||
"""
|
||||
Create a history and navigation object for the specified
|
||||
navigation type and group, if they don't exist.
|
||||
"""
|
||||
if (nav_type, nav_group) not in self.history_lookup:
|
||||
history = History()
|
||||
history = History(dbstate, nav_type)
|
||||
self.history_lookup[(nav_type, nav_group)] = history
|
||||
|
||||
def get_active(self, nav_type, nav_group=0):
|
||||
@@ -385,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):
|
||||
"""
|
||||
@@ -393,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)
|
||||
|
||||
@@ -142,3 +142,13 @@ class DbError(Exception):
|
||||
def __str__(self):
|
||||
"Return string representation"
|
||||
return self.value
|
||||
|
||||
class MergeError(Exception):
|
||||
"""Error used to report merge errors"""
|
||||
def __init__(self, value=""):
|
||||
Exception.__init__(self)
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
"Return string representation"
|
||||
return self.value
|
||||
|
||||
+28
-11
@@ -4,6 +4,8 @@
|
||||
# Copyright (C) 2004-2007 Donald N. Allingham
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Contribution 2009 by Brad Crittenden <brad [AT] bradcrittenden.net>
|
||||
# Copyright (C) 2008 Benny Malengier
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
#
|
||||
# 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
|
||||
@@ -56,6 +58,7 @@ import config
|
||||
from gui.pluginmanager import GuiPluginManager
|
||||
import Utils
|
||||
import ManagedWindow
|
||||
from QuestionDialog import ErrorDialog
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -92,6 +95,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
|
||||
"""
|
||||
|
||||
#override predefined do_xxx signal handlers
|
||||
__gsignals__ = {"apply": "override", "cancel": "override",
|
||||
"close": "override", "prepare": "override"}
|
||||
|
||||
@@ -164,6 +168,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)
|
||||
@@ -278,7 +298,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
vbox.foreach(vbox.remove)
|
||||
# add new content
|
||||
if config_box_class:
|
||||
self.option_box_instance = config_box_class(self.person)
|
||||
self.option_box_instance = config_box_class(self.person, self.dbstate, self.uistate)
|
||||
box = self.option_box_instance.get_option_box()
|
||||
vbox.add(box)
|
||||
else:
|
||||
@@ -382,22 +402,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
|
||||
@@ -536,7 +552,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):
|
||||
@@ -603,6 +619,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow.ManagedWindow) :
|
||||
export_function = self.map_exporters[ix].get_export_function()
|
||||
success = export_function(self.dbstate.db,
|
||||
filename,
|
||||
ErrorDialog,
|
||||
self.option_box_instance,
|
||||
self.callback)
|
||||
return success
|
||||
|
||||
+571
-78
@@ -28,7 +28,7 @@
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import gtk
|
||||
from gen.ggettext import gettext as _
|
||||
import pango
|
||||
import gobject
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@@ -36,10 +36,60 @@ import gobject
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
from gen.ggettext import ngettext
|
||||
import config
|
||||
|
||||
import gui.widgets
|
||||
from gen.display.name import displayer as name_displayer
|
||||
from Filters import GenericFilter, Rules
|
||||
from gui.utils import ProgressMeter
|
||||
|
||||
def get_proxy_value(proxy_name):
|
||||
return [value for (name, value) in
|
||||
config.get('export.proxy-order') if name == proxy_name][0]
|
||||
|
||||
def set_proxy_value(proxy_name, proxy_value):
|
||||
[name_value for name_value in
|
||||
config.get('export.proxy-order') if name_value[0] == proxy_name][0][1] = int(proxy_value)
|
||||
|
||||
def get_proxy_names():
|
||||
return [name for (name, value) in config.get('export.proxy-order')]
|
||||
|
||||
def swap_proxy_order(row1, row2):
|
||||
po = config.get('export.proxy-order')
|
||||
po[row1], po[row2] = po[row2], po[row1]
|
||||
|
||||
class Progress(object):
|
||||
"""
|
||||
Mirros the same interface that the ExportAssistant uses in the
|
||||
selection, but this is for the preview selection.
|
||||
"""
|
||||
def __init__(self):
|
||||
self.pm = ProgressMeter(_("Selecting Preview Data"), _('Selecting...'))
|
||||
self.progress_cnt = 0
|
||||
self.title = _("Selecting...")
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
def reset(self, title):
|
||||
self.pm.set_header(title)
|
||||
self.title = title
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
def set_total(self, count):
|
||||
self.pm.set_pass(self.title, total=count+1)
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
def update(self, count):
|
||||
self.pm.step()
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
def close(self):
|
||||
self.pm.step()
|
||||
self.pm.close()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -52,97 +102,315 @@ class WriterOptionBox(object):
|
||||
the options.
|
||||
|
||||
"""
|
||||
def __init__(self, person):
|
||||
def __init__(self, person, dbstate, uistate):
|
||||
self.person = person
|
||||
self.dbstate = dbstate
|
||||
self.uistate = uistate
|
||||
self.preview_dbase = None
|
||||
self.preview_button = None
|
||||
self.preview_proxy_button = {}
|
||||
self.proxy_options_showing = False
|
||||
self.proxy_dbase = {}
|
||||
self.private = 0
|
||||
self.restrict = 0
|
||||
self.unlinked = 0
|
||||
self.restrict_num = 0
|
||||
self.reference_num = 0
|
||||
self.cfilter = None
|
||||
self.nfilter = None
|
||||
self.restrict_check = None
|
||||
self.restrict_option = None
|
||||
self.private_check = None
|
||||
self.unlinked_check = None
|
||||
self.filter_obj = None
|
||||
self.filter_note = None
|
||||
self.reference_filter = None
|
||||
self.initialized_show_options = False
|
||||
# The following are special properties. Create them to force the
|
||||
# export wizard to not ask for a file, and to override the
|
||||
# confirmation message:
|
||||
#self.no_fileselect = True
|
||||
#self.confirm_text = "You made it, kid!"
|
||||
|
||||
def mark_dirty(self, widget=None):
|
||||
self.preview_dbase = None
|
||||
if self.preview_button:
|
||||
self.preview_button.set_sensitive(1)
|
||||
for proxy_name in self.preview_proxy_button:
|
||||
if proxy_name != "unfiltered":
|
||||
self.preview_proxy_button[proxy_name].set_sensitive(0)
|
||||
self.parse_options()
|
||||
|
||||
def get_option_box(self):
|
||||
"""Build up a gtk.Table that contains the standard options."""
|
||||
table = gtk.Table(5, 2)
|
||||
widget = gtk.VBox()
|
||||
|
||||
self.filter_obj = gtk.ComboBox()
|
||||
label = gtk.Label(_('_Person Filter'))
|
||||
label.set_use_underline(True)
|
||||
label.set_mnemonic_widget(self.filter_obj)
|
||||
|
||||
# Objects for choosing a Note filter
|
||||
self.filter_note = gtk.ComboBox()
|
||||
label_note = gtk.Label(_('_Note Filter'))
|
||||
label_note.set_use_underline(True)
|
||||
label_note.set_mnemonic_widget(self.filter_note)
|
||||
full_database_row = gtk.HBox()
|
||||
full_database_row.pack_start(gtk.Label("Unfiltered Family Tree:"), False)
|
||||
people_count = len(self.dbstate.db.get_person_handles())
|
||||
button = gtk.Button(ngettext("%d Person", "%d People", people_count) %
|
||||
people_count)
|
||||
button.set_tooltip_text(_("Click to see preview of unfiltered data"))
|
||||
button.set_size_request(100, -1)
|
||||
button.connect("clicked", self.show_preview_data)
|
||||
button.proxy_name = "unfiltered"
|
||||
self.preview_proxy_button["unfiltered"] = button
|
||||
self.spacer = gtk.HBox()
|
||||
full_database_row.pack_end(self.spacer, False)
|
||||
full_database_row.pack_end(button, False)
|
||||
|
||||
widget.pack_start(full_database_row, False)
|
||||
|
||||
self.private_check = gtk.CheckButton(
|
||||
_('_Do not include records marked private'))
|
||||
self.restrict_check = gtk.CheckButton(
|
||||
_('_Restrict data on living people'))
|
||||
self.unlinked_check = gtk.CheckButton(
|
||||
_('_Do not include unlinked records'))
|
||||
self.private_check.connect("clicked", self.mark_dirty)
|
||||
self.private_check.set_active(get_proxy_value("privacy"))
|
||||
|
||||
self.private_check.set_active(config.get('export.no-private'))
|
||||
self.restrict_check.set_active(config.get('export.restrict-living'))
|
||||
self.unlinked_check.set_active(config.get('export.no-unlinked'))
|
||||
|
||||
table.set_border_width(12)
|
||||
table.set_row_spacings(6)
|
||||
table.set_col_spacings(6)
|
||||
table.attach(label, 0, 1, 0, 1, xoptions=0, yoptions=0)
|
||||
table.attach(self.filter_obj, 1, 2, 0, 1, yoptions=0)
|
||||
table.attach(label_note, 0, 1, 1, 2, xoptions =0, yoptions=0)
|
||||
table.attach(self.filter_note, 1, 2, 1, 2, yoptions=0)
|
||||
table.attach(self.private_check, 1, 2, 2, 3, yoptions=0)
|
||||
table.attach(self.restrict_check, 1, 2, 3, 4, yoptions=0)
|
||||
table.attach(self.unlinked_check, 1, 2, 4, 5, yoptions=0)
|
||||
self.proxy_widget = {}
|
||||
self.vbox_n = []
|
||||
self.up_n = []
|
||||
self.down_n = []
|
||||
row = 0
|
||||
for proxy_name in get_proxy_names():
|
||||
frame = self.build_frame(proxy_name, row)
|
||||
widget.pack_start(frame, False)
|
||||
row += 1
|
||||
|
||||
# Populate the Person Filter
|
||||
entire_db = GenericFilter()
|
||||
entire_db.set_name(_("Entire Database"))
|
||||
the_filters = [entire_db]
|
||||
|
||||
if self.person:
|
||||
the_filters += self.__define_person_filters()
|
||||
|
||||
from Filters import CustomFilters
|
||||
the_filters.extend(CustomFilters.get_filters('Person'))
|
||||
|
||||
model = gtk.ListStore(gobject.TYPE_STRING, object)
|
||||
for item in the_filters:
|
||||
model.append(row=[item.get_name(), item])
|
||||
hbox = gtk.HBox()
|
||||
self.advanced_button = gtk.Button(_("Change order"))
|
||||
self.advanced_button.set_size_request(150, -1)
|
||||
self.proxy_options_showing = False
|
||||
self.advanced_button.connect("clicked", self.show_options)
|
||||
hbox.pack_end(self.advanced_button, False)
|
||||
self.preview_button = gtk.Button(_("Calculate Previews"))
|
||||
self.preview_button.connect("clicked", self.preview)
|
||||
hbox.pack_end(self.preview_button, False)
|
||||
widget.pack_start(hbox, False)
|
||||
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('ellipsize', pango.ELLIPSIZE_END)
|
||||
self.filter_obj.pack_start(cell, True)
|
||||
self.filter_obj.add_attribute(cell, 'text', 0)
|
||||
self.filter_obj.set_model(model)
|
||||
self.filter_obj.set_active(0)
|
||||
|
||||
# Populate the Notes Filter
|
||||
notes_filters = [entire_db]
|
||||
|
||||
notes_filters.extend(CustomFilters.get_filters('Note'))
|
||||
notes_model = gtk.ListStore(gobject.TYPE_STRING, object)
|
||||
for item in notes_filters:
|
||||
notes_model.append(row=[item.get_name(), item])
|
||||
self.filter_obj.set_model(self.build_model("person"))
|
||||
self.filter_obj.set_active(get_proxy_value("person"))
|
||||
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('ellipsize', pango.ELLIPSIZE_END)
|
||||
self.restrict_option.pack_start(cell, True)
|
||||
self.restrict_option.add_attribute(cell, 'text', 0)
|
||||
self.restrict_option.set_model(self.build_model("living"))
|
||||
self.restrict_option.set_active(get_proxy_value("living"))
|
||||
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('ellipsize', pango.ELLIPSIZE_END)
|
||||
self.reference_filter.pack_start(cell, True)
|
||||
self.reference_filter.add_attribute(cell, 'text', 0)
|
||||
self.reference_filter.set_model(self.build_model("reference"))
|
||||
self.reference_filter.set_active(get_proxy_value("reference"))
|
||||
|
||||
notes_cell = gtk.CellRendererText()
|
||||
notes_cell.set_property('ellipsize', pango.ELLIPSIZE_END)
|
||||
self.filter_note.pack_start(notes_cell, True)
|
||||
self.filter_note.add_attribute(notes_cell, 'text', 0)
|
||||
self.filter_note.set_model(notes_model)
|
||||
self.filter_note.set_active(0)
|
||||
self.filter_note.set_model(self.build_model("note"))
|
||||
self.filter_note.set_active(get_proxy_value("note"))
|
||||
|
||||
table.show()
|
||||
return table
|
||||
self.filter_note.connect("changed", self.mark_dirty)
|
||||
self.filter_obj.connect("changed", self.mark_dirty)
|
||||
self.restrict_option.connect("changed", self.mark_dirty)
|
||||
self.reference_filter.connect("changed", self.mark_dirty)
|
||||
return widget
|
||||
|
||||
def show_preview_data(self, widget):
|
||||
from DbState import DbState
|
||||
from QuickReports import run_quick_report_by_name
|
||||
if widget.proxy_name == "unfiltered":
|
||||
dbstate = self.dbstate
|
||||
else:
|
||||
dbstate = DbState()
|
||||
dbstate.db = self.proxy_dbase[widget.proxy_name]
|
||||
dbstate.open = True
|
||||
run_quick_report_by_name(dbstate,
|
||||
self.uistate,
|
||||
'filterbyname',
|
||||
'all')
|
||||
|
||||
def preview(self, widget):
|
||||
"""
|
||||
Calculate previews to see the selected data.
|
||||
"""
|
||||
self.parse_options()
|
||||
pm = Progress()
|
||||
self.preview_dbase = self.get_filtered_database(self.dbstate.db, pm, preview=True)
|
||||
pm.close()
|
||||
self.preview_button.set_sensitive(0)
|
||||
|
||||
def build_frame(self, proxy_name, row):
|
||||
"""
|
||||
Build a frame for a proxy option. proxy_name is a string.
|
||||
"""
|
||||
# Make a box and put the option in it:
|
||||
button = gtk.Button(ngettext("%d Person", "%d People", 0) % 0)
|
||||
button.set_size_request(100, -1)
|
||||
button.connect("clicked", self.show_preview_data)
|
||||
button.proxy_name = proxy_name
|
||||
if proxy_name == "person":
|
||||
# Frame Person:
|
||||
self.filter_obj = gtk.ComboBox()
|
||||
label = gtk.Label(_('_Person Filter') + ": ")
|
||||
label.set_alignment(0, 0.5)
|
||||
label.set_size_request(150, -1)
|
||||
label.set_use_underline(True)
|
||||
label.set_mnemonic_widget(self.filter_obj)
|
||||
box = gtk.HBox()
|
||||
box.pack_start(label, False)
|
||||
box.pack_start(self.filter_obj)
|
||||
box.pack_start(
|
||||
gui.widgets.SimpleButton(gtk.STOCK_EDIT,
|
||||
lambda obj: self.edit_filter('Person', self.filter_obj)),
|
||||
False)
|
||||
button.set_tooltip_text(_("Click to see preview after person filter"))
|
||||
elif proxy_name == "note":
|
||||
# Frame Note:
|
||||
# Objects for choosing a Note filter:
|
||||
self.filter_note = gtk.ComboBox()
|
||||
label_note = gtk.Label(_('_Note Filter') + ": ")
|
||||
label_note.set_alignment(0, 0.5)
|
||||
label_note.set_size_request(150, -1)
|
||||
label_note.set_use_underline(True)
|
||||
label_note.set_mnemonic_widget(self.filter_note)
|
||||
box = gtk.HBox()
|
||||
box.pack_start(label_note, False)
|
||||
box.pack_start(self.filter_note)
|
||||
box.pack_start(
|
||||
gui.widgets.SimpleButton(gtk.STOCK_EDIT,
|
||||
lambda obj: self.edit_filter('Note', self.filter_note)),
|
||||
False)
|
||||
button.set_tooltip_text(_("Click to see preview after note filter"))
|
||||
elif proxy_name == "privacy":
|
||||
# Frame 3:
|
||||
label = gtk.Label(_("Privacy Filter") + ":")
|
||||
label.set_alignment(0, 0.5)
|
||||
label.set_size_request(150, -1)
|
||||
box = gtk.HBox()
|
||||
box.pack_start(label, False)
|
||||
box.add(self.private_check)
|
||||
button.set_tooltip_text(_("Click to see preview after privacy filter"))
|
||||
elif proxy_name == "living":
|
||||
# Frame 4:
|
||||
label = gtk.Label(_("Living Filter") + ":")
|
||||
label.set_alignment(0, 0.5)
|
||||
label.set_size_request(150, -1)
|
||||
box = gtk.HBox()
|
||||
box.pack_start(label, False)
|
||||
self.restrict_option = gtk.ComboBox()
|
||||
box.add(self.restrict_option)
|
||||
button.set_tooltip_text(_("Click to see preview after living filter"))
|
||||
elif proxy_name == "reference":
|
||||
# Frame 5:
|
||||
self.reference_filter = gtk.ComboBox()
|
||||
label = gtk.Label(_('Reference Filter') + ": ")
|
||||
label.set_alignment(0, 0.5)
|
||||
label.set_size_request(150, -1)
|
||||
box = gtk.HBox()
|
||||
box.pack_start(label, False)
|
||||
box.pack_start(self.reference_filter)
|
||||
button.set_tooltip_text(_("Click to see preview after reference filter"))
|
||||
else:
|
||||
raise AttributeError("Unknown proxy '%s'" % proxy_name)
|
||||
|
||||
frame = gtk.Frame()
|
||||
hbox = gtk.HBox()
|
||||
frame.add(hbox)
|
||||
vbox = gtk.HBox()
|
||||
self.vbox_n.append(vbox)
|
||||
up = gtk.Button()
|
||||
up.connect("clicked", self.swap)
|
||||
if row == 0:
|
||||
up.set_sensitive(0) # can't go up
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_GO_UP,
|
||||
gtk.ICON_SIZE_MENU)
|
||||
up.set_image(image)
|
||||
up.row = row - 1
|
||||
self.up_n.append(up)
|
||||
down = gtk.Button()
|
||||
down.connect("clicked", self.swap)
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_GO_DOWN,
|
||||
gtk.ICON_SIZE_MENU)
|
||||
down.set_image(image)
|
||||
down.row = row
|
||||
if row == 4:
|
||||
down.set_sensitive(0) # can't go down
|
||||
self.down_n.append(down)
|
||||
self.preview_proxy_button[proxy_name] = button
|
||||
self.preview_proxy_button[proxy_name].set_sensitive(0)
|
||||
box.pack_end(button, False)
|
||||
hbox.pack_start(box)
|
||||
hbox.pack_end(vbox, False)
|
||||
self.proxy_widget[proxy_name] = box
|
||||
return frame
|
||||
|
||||
def show_options(self, widget=None):
|
||||
"""
|
||||
Show or hide the option arrows. Needs to add them if first
|
||||
time due to the fact that Gramps tends to use show_all rather
|
||||
than show.
|
||||
"""
|
||||
if self.proxy_options_showing:
|
||||
self.advanced_button.set_label(_("Change order"))
|
||||
self.spacer_up.hide()
|
||||
self.spacer_down.hide()
|
||||
for n in range(5):
|
||||
self.up_n[n].hide()
|
||||
self.down_n[n].hide()
|
||||
else:
|
||||
self.advanced_button.set_label(_("Hide order"))
|
||||
if not self.initialized_show_options:
|
||||
self.initialized_show_options = True
|
||||
# This is necessary because someone used show_all up top
|
||||
# Now, we can't add something that we want hidden
|
||||
for n in range(5):
|
||||
self.vbox_n[n].pack_start(self.up_n[n])
|
||||
self.vbox_n[n].pack_end(self.down_n[n])
|
||||
# some spacer buttons:
|
||||
up = gtk.Button()
|
||||
up.set_sensitive(0)
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_GO_UP,
|
||||
gtk.ICON_SIZE_MENU)
|
||||
up.set_image(image)
|
||||
self.spacer.pack_start(up, False)
|
||||
down = gtk.Button()
|
||||
down.set_sensitive(0)
|
||||
image = gtk.Image()
|
||||
image.set_from_stock(gtk.STOCK_GO_DOWN,
|
||||
gtk.ICON_SIZE_MENU)
|
||||
down.set_image(image)
|
||||
self.spacer.pack_end(down, False)
|
||||
self.spacer_up = up
|
||||
self.spacer_down = down
|
||||
self.spacer_up.show()
|
||||
self.spacer_down.show()
|
||||
for n in range(5):
|
||||
self.up_n[n].show()
|
||||
self.down_n[n].show()
|
||||
|
||||
self.proxy_options_showing = not self.proxy_options_showing
|
||||
|
||||
def swap(self, widget):
|
||||
"""
|
||||
Swap the order of two proxies.
|
||||
"""
|
||||
row1 = widget.row
|
||||
row2 = widget.row + 1
|
||||
proxy1 = config.get('export.proxy-order')[row1][0]
|
||||
proxy2 = config.get('export.proxy-order')[row2][0]
|
||||
widget1 = self.proxy_widget[proxy1]
|
||||
widget2 = self.proxy_widget[proxy2]
|
||||
parent1 = widget1.get_parent()
|
||||
parent2 = widget2.get_parent()
|
||||
widget1.reparent(parent2)
|
||||
widget2.reparent(parent1)
|
||||
swap_proxy_order(row1, row2)
|
||||
self.mark_dirty(widget)
|
||||
|
||||
def __define_person_filters(self):
|
||||
"""Add person filters if the active person is defined."""
|
||||
@@ -178,24 +446,249 @@ class WriterOptionBox(object):
|
||||
restrict = restrict information on living peoplel
|
||||
cfitler = return the GenericFilter selected
|
||||
nfilter = return the NoteFilter selected
|
||||
unlinked = restrict unlinked records
|
||||
reference = restrict referenced/orphaned records
|
||||
|
||||
"""
|
||||
self.restrict = self.restrict_check.get_active()
|
||||
self.private = self.private_check.get_active()
|
||||
self.unlinked = self.unlinked_check.get_active()
|
||||
if self.private_check:
|
||||
self.private = self.private_check.get_active()
|
||||
set_proxy_value("privacy", self.private)
|
||||
|
||||
config.set('export.no-private', self.private)
|
||||
config.set('export.restrict-living', self.restrict)
|
||||
config.set('export.no-unlinked', self.unlinked)
|
||||
config.save()
|
||||
if self.filter_obj:
|
||||
model = self.filter_obj.get_model()
|
||||
node = self.filter_obj.get_active_iter()
|
||||
if node:
|
||||
self.cfilter = model[node][1]
|
||||
set_proxy_value("person", self.filter_obj.get_active())
|
||||
|
||||
model = self.filter_obj.get_model()
|
||||
node = self.filter_obj.get_active_iter()
|
||||
self.cfilter = model[node][1]
|
||||
if self.restrict_option:
|
||||
model = self.restrict_option.get_model()
|
||||
node = self.restrict_option.get_active_iter()
|
||||
if node:
|
||||
self.restrict_num = model[node][1]
|
||||
set_proxy_value("living", self.restrict_option.get_active())
|
||||
|
||||
model = self.filter_note.get_model()
|
||||
node = self.filter_note.get_active_iter()
|
||||
self.nfilter = model[node][1]
|
||||
if self.filter_note:
|
||||
model = self.filter_note.get_model()
|
||||
node = self.filter_note.get_active_iter()
|
||||
if node:
|
||||
self.nfilter = model[node][1]
|
||||
set_proxy_value("note", self.filter_note.get_active())
|
||||
|
||||
if self.reference_filter:
|
||||
model = self.reference_filter.get_model()
|
||||
node = self.reference_filter.get_active_iter()
|
||||
if node:
|
||||
self.reference_num = model[node][1]
|
||||
set_proxy_value("reference", self.reference_filter.get_active())
|
||||
|
||||
def get_filtered_database(self, dbase, progress=None, preview=False):
|
||||
"""
|
||||
dbase - the database
|
||||
progress - instance that has:
|
||||
.reset() method
|
||||
.set_total() method
|
||||
.update() method
|
||||
.progress_cnt integer representing N of total done
|
||||
"""
|
||||
# Increment the progress count for each filter type chosen
|
||||
if self.private and progress:
|
||||
progress.progress_cnt += 1
|
||||
|
||||
if self.restrict_num > 0 and progress:
|
||||
progress.progress_cnt += 1
|
||||
|
||||
if not self.cfilter.is_empty() and progress:
|
||||
progress.progress_cnt += 1
|
||||
|
||||
if not self.nfilter.is_empty() and progress:
|
||||
progress.progress_cnt += 1
|
||||
|
||||
if self.reference_num > 0 and progress:
|
||||
progress.progress_cnt += 1
|
||||
|
||||
if progress:
|
||||
progress.set_total(progress.progress_cnt)
|
||||
progress.progress_cnt = 0
|
||||
|
||||
if self.preview_dbase:
|
||||
if progress:
|
||||
progress.progress_cnt += 5
|
||||
return self.preview_dbase
|
||||
|
||||
self.proxy_dbase.clear()
|
||||
for proxy_name in get_proxy_names():
|
||||
dbase = self.apply_proxy(proxy_name, dbase, progress)
|
||||
if preview:
|
||||
self.proxy_dbase[proxy_name] = dbase
|
||||
self.preview_proxy_button[proxy_name].set_sensitive(1)
|
||||
people_count = len(dbase.get_person_handles())
|
||||
self.preview_proxy_button[proxy_name].set_label(
|
||||
ngettext("%d Person", "%d People", people_count) %
|
||||
people_count)
|
||||
return dbase
|
||||
|
||||
def apply_proxy(self, proxy_name, dbase, progress=None):
|
||||
"""
|
||||
Apply the named proxy to the dbase, and return.
|
||||
proxy_name is one of
|
||||
["person", "note", "privacy", "living", "reference"]
|
||||
"""
|
||||
# If the private flag is set, apply the PrivateProxyDb
|
||||
import gen.proxy
|
||||
if proxy_name == "privacy":
|
||||
if self.private:
|
||||
if progress:
|
||||
progress.reset(_("Filtering private data"))
|
||||
progress.progress_cnt += 1
|
||||
progress.update(progress.progress_cnt)
|
||||
dbase = gen.proxy.PrivateProxyDb(dbase)
|
||||
|
||||
# If the restrict flag is set, apply the LivingProxyDb
|
||||
elif proxy_name == "living":
|
||||
if self.restrict_num > 0:
|
||||
if progress:
|
||||
progress.reset(_("Filtering living persons"))
|
||||
progress.progress_cnt += 1
|
||||
progress.update(progress.progress_cnt)
|
||||
mode = [None, # include living
|
||||
gen.proxy.LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY,
|
||||
gen.proxy.LivingProxyDb.MODE_EXCLUDE_ALL,
|
||||
][self.restrict_num]
|
||||
dbase = gen.proxy.LivingProxyDb(
|
||||
dbase,
|
||||
mode) #
|
||||
|
||||
# If the filter returned by cfilter is not empty, apply the
|
||||
# FilterProxyDb (Person Filter)
|
||||
elif proxy_name == "person":
|
||||
if not self.cfilter.is_empty():
|
||||
if progress:
|
||||
progress.reset(_("Applying selected person filter"))
|
||||
progress.progress_cnt += 1
|
||||
progress.update(progress.progress_cnt)
|
||||
dbase = gen.proxy.FilterProxyDb(
|
||||
dbase, self.cfilter)
|
||||
|
||||
# Apply the Note Filter
|
||||
elif proxy_name == "note":
|
||||
if not self.nfilter.is_empty():
|
||||
if progress:
|
||||
progress.reset(_("Applying selected note filter"))
|
||||
progress.progress_cnt += 1
|
||||
progress.update(progress.progress_cnt)
|
||||
dbase = gen.proxy.FilterProxyDb(
|
||||
dbase, note_filter=self.nfilter)
|
||||
|
||||
# Apply the ReferencedBySelection
|
||||
elif proxy_name == "reference":
|
||||
if progress:
|
||||
progress.reset(_("Filtering referenced records"))
|
||||
progress.progress_cnt += 1
|
||||
progress.update(progress.progress_cnt)
|
||||
if self.reference_num == 0:
|
||||
pass
|
||||
elif self.reference_num == 1:
|
||||
dbase = gen.proxy.ReferencedBySelectionProxyDb(dbase,
|
||||
all_people=True)
|
||||
else:
|
||||
raise AttributeError("no such proxy '%s'" % proxy_name)
|
||||
|
||||
return dbase
|
||||
|
||||
def edit_filter(self, namespace, filter_obj):
|
||||
"""
|
||||
Callback which invokes the EditFilter dialog. Will create new
|
||||
filter if called if none is selected.
|
||||
"""
|
||||
from gui.filtereditor import EditFilter
|
||||
from Filters import FilterList, GenericFilterFactory
|
||||
import const
|
||||
the_filter = None
|
||||
filterdb = FilterList(const.CUSTOM_FILTERS)
|
||||
filterdb.load()
|
||||
if filter_obj.get_active() != 0:
|
||||
model = filter_obj.get_model()
|
||||
node = filter_obj.get_active_iter()
|
||||
if node:
|
||||
sel_filter = model.get_value(node, 1)
|
||||
# the_filter needs to be a particular object for editor
|
||||
for filt in filterdb.get_filters(namespace):
|
||||
if filt.get_name() == sel_filter.get_name():
|
||||
the_filter = filt
|
||||
else:
|
||||
the_filter = GenericFilterFactory(namespace)()
|
||||
if the_filter:
|
||||
EditFilter(namespace, self.dbstate, self.uistate, [],
|
||||
the_filter, filterdb,
|
||||
lambda : self.edit_filter_save(filterdb, namespace))
|
||||
else: # can't edit this filter
|
||||
from QuestionDialog import ErrorDialog
|
||||
ErrorDialog(_("Cannot edit a system filter"),
|
||||
_("Please select a different filter to edit"))
|
||||
|
||||
def edit_filter_save(self, filterdb, namespace):
|
||||
"""
|
||||
If a filter changed, save them all. Reloads, and also calls callback.
|
||||
"""
|
||||
from Filters import CustomFilters
|
||||
from Filters import reload_custom_filters
|
||||
filterdb.save()
|
||||
reload_custom_filters()
|
||||
if namespace == "Person":
|
||||
model = self.build_model("person")
|
||||
widget = self.filter_obj
|
||||
elif namespace == "Note":
|
||||
model = self.build_model("note")
|
||||
widget = self.filter_note
|
||||
widget.set_model(model)
|
||||
widget.set_active(0)
|
||||
|
||||
def build_model(self, namespace):
|
||||
"""
|
||||
Build a model for the combo box selector.
|
||||
"""
|
||||
from Filters import CustomFilters
|
||||
if namespace == "person":
|
||||
# Populate the Person Filter
|
||||
entire_db = GenericFilter()
|
||||
entire_db.set_name(_("Include all selected people"))
|
||||
the_filters = [entire_db]
|
||||
|
||||
if self.person:
|
||||
the_filters += self.__define_person_filters()
|
||||
|
||||
the_filters.extend(CustomFilters.get_filters('Person'))
|
||||
|
||||
model = gtk.ListStore(gobject.TYPE_STRING, object)
|
||||
for item in the_filters:
|
||||
model.append(row=[item.get_name(), item])
|
||||
elif namespace == "note":
|
||||
# Populate the Notes Filter
|
||||
entire_db = GenericFilter()
|
||||
entire_db.set_name(_("Include all selected notes"))
|
||||
notes_filters = [entire_db]
|
||||
notes_filters.extend(CustomFilters.get_filters('Note'))
|
||||
model = gtk.ListStore(gobject.TYPE_STRING, object)
|
||||
for item in notes_filters:
|
||||
model.append(row=[item.get_name(), item])
|
||||
|
||||
elif namespace == "living":
|
||||
model = gtk.ListStore(gobject.TYPE_STRING, int)
|
||||
row = 0
|
||||
for item in [
|
||||
_('Include all selected people'),
|
||||
_('Replace given names of living people'),
|
||||
_('Do not include living people')]:
|
||||
model.append(row=[item, row])
|
||||
row += 1
|
||||
|
||||
elif namespace == "reference":
|
||||
model = gtk.ListStore(gobject.TYPE_STRING, int)
|
||||
row = 0
|
||||
for item in [
|
||||
_('Include all selected records'),
|
||||
_('Do not include records not linked to a selected person'),]:
|
||||
model.append(row=[item, row])
|
||||
row += 1
|
||||
|
||||
return model
|
||||
|
||||
@@ -38,7 +38,7 @@ from Filters.Rules._HasNoteSubstrBase import HasNoteSubstrBase
|
||||
# "Events having notes that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
|
||||
"""People having notes containing <subtring>"""
|
||||
"""People having notes containing <substring>"""
|
||||
|
||||
name = _('Events having notes containing <substring>')
|
||||
description = _("Matches events whose notes contain text "
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -38,7 +38,7 @@ from Filters.Rules._HasNoteSubstrBase import HasNoteSubstrBase
|
||||
# "People having notes that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
|
||||
"""People having notes containing <subtring>"""
|
||||
"""People having notes containing <substring>"""
|
||||
|
||||
name = _('Families having notes containing <substring>')
|
||||
description = _("Matches families whose notes contain text matching a substring")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
Set of wrappers for family filter rules based on personal rules.
|
||||
|
||||
Any rule that matches family based on personal rule applied
|
||||
to father, mather, or any child, just needs to do two things:
|
||||
to father, mother, or any child, just needs to do two things:
|
||||
> Set the class attribute 'base_class' to the personal rule
|
||||
> Set apply method to be an appropriate wrapper below
|
||||
Example:
|
||||
|
||||
@@ -17,6 +17,7 @@ pkgdata_PYTHON = \
|
||||
_HasNoteSubstrBase.py\
|
||||
_HasReferenceCountBase.py \
|
||||
_HasSourceBase.py \
|
||||
_HasTagBase.py \
|
||||
_HasTextMatchingRegexpOf.py\
|
||||
_HasTextMatchingSubstringOf.py\
|
||||
__init__.py\
|
||||
|
||||
@@ -38,7 +38,7 @@ from Filters.Rules._HasNoteSubstrBase import HasNoteSubstrBase
|
||||
# "Media having notes that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
|
||||
"""Media having notes containing <subtring>"""
|
||||
"""Media having notes containing <substring>"""
|
||||
|
||||
name = _('Media objects having notes containing <substring>')
|
||||
description = _("Matches media objects whose notes contain text "
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -39,7 +39,7 @@ from Filters.Rules import Rule
|
||||
# "Events having notes that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class MatchesSubstringOf(Rule):
|
||||
"""Notes having notes containing <subtring>"""
|
||||
"""Notes having notes containing <substring>"""
|
||||
|
||||
labels = [ _('Substring:')]
|
||||
name = _('Notes containing <substring>')
|
||||
@@ -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
|
||||
|
||||
@@ -28,6 +28,7 @@ pkgdata_PYTHON = \
|
||||
_HasRelationship.py \
|
||||
_HasSource.py \
|
||||
_HasSourceOf.py \
|
||||
_HasTag.py \
|
||||
_HasTextMatchingRegexpOf.py \
|
||||
_HasTextMatchingSubstringOf.py \
|
||||
_HasUnknownGender.py \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -57,25 +57,29 @@ class HasCommonAncestorWith(Rule):
|
||||
# Start with filling the cache for root person (gramps_id in self.list[0])
|
||||
self.ancestor_cache = {}
|
||||
root_person = db.get_person_from_gramps_id(self.list[0])
|
||||
self.add_ancs(db, root_person)
|
||||
self.with_people = [root_person.handle]
|
||||
if root_person:
|
||||
self.add_ancs(db, root_person)
|
||||
self.with_people = [root_person.handle]
|
||||
else:
|
||||
self.with_people = []
|
||||
|
||||
def add_ancs(self, db, person):
|
||||
if person.handle not in self.ancestor_cache:
|
||||
if person and person.handle not in self.ancestor_cache:
|
||||
self.ancestor_cache[person.handle] = set()
|
||||
else:
|
||||
return
|
||||
|
||||
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 = {}
|
||||
@@ -84,13 +88,13 @@ class HasCommonAncestorWith(Rule):
|
||||
for handle in self.with_people:
|
||||
if ((handle in self.ancestor_cache and
|
||||
self.ancestor_cache[handle]) &
|
||||
(other.handle in self.ancestor_cache and
|
||||
(other and other.handle in self.ancestor_cache and
|
||||
self.ancestor_cache[other.handle])):
|
||||
return True
|
||||
return False
|
||||
|
||||
def apply(self, db, person):
|
||||
if person.handle not in self.ancestor_cache:
|
||||
if person and person.handle not in self.ancestor_cache:
|
||||
self.add_ancs(db, person)
|
||||
|
||||
return self.has_common_ancestor(person)
|
||||
|
||||
@@ -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"""
|
||||
|
||||
@@ -51,8 +51,8 @@ class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith,MatchesFilter):
|
||||
"with anybody matched by a filter")
|
||||
category = _("Ancestral filters")
|
||||
|
||||
def __init__(self,list):
|
||||
HasCommonAncestorWith.__init__(self,list)
|
||||
def __init__(self, list):
|
||||
HasCommonAncestorWith.__init__(self, list)
|
||||
self.ancestor_cache = {}
|
||||
|
||||
def prepare(self, db):
|
||||
@@ -64,13 +64,13 @@ 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):
|
||||
if person and filt.apply(db, person):
|
||||
#store all people in the filter so as to compare later
|
||||
self.with_people.append(person.handle)
|
||||
#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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,6 +34,7 @@ from gen.ggettext import sgettext as _
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from Filters.Rules._Rule import Rule
|
||||
from gen.lib import NameOriginType
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -43,41 +44,76 @@ from Filters.Rules._Rule import Rule
|
||||
class HasNameOf(Rule):
|
||||
"""Rule that checks for full or partial name matches"""
|
||||
|
||||
labels = [ _('Given name:'),
|
||||
_('Family name:'),
|
||||
_('Suffix:'),
|
||||
labels = [ _('Given name:'),
|
||||
_('Full Family name:'),
|
||||
_('person|Title:'),
|
||||
_('Suffix:'),
|
||||
_('Call Name:'),
|
||||
_('Nick Name:'),
|
||||
_('Prefix:'),
|
||||
_('Single Surname:'),
|
||||
_('Connector'),
|
||||
_('Patronymic:'),
|
||||
_('Call Name:'),]
|
||||
_('Family Nick Name:')]
|
||||
name = _('People with the <name>')
|
||||
description = _("Matches people with a specified (partial) name")
|
||||
category = _('General filters')
|
||||
|
||||
def apply(self,db,person):
|
||||
self.firstn = self.list[0]
|
||||
self.lastn = self.list[1]
|
||||
self.surn = self.list[2]
|
||||
self.title = self.list[3]
|
||||
self.prefix = self.list[4]
|
||||
self.patr = self.list[5]
|
||||
self.calln = self.list[6]
|
||||
def prepare(self, db):
|
||||
self.firstn = self.list[0].upper()
|
||||
self.lastn = self.list[1].upper()
|
||||
self.title = self.list[2].upper()
|
||||
self.suffix = self.list[3].upper()
|
||||
self.calln = self.list[4].upper()
|
||||
self.nick = self.list[5].upper()
|
||||
self.famnick = self.list[10].upper()
|
||||
#surname parts
|
||||
self.prefix = self.list[6].upper()
|
||||
self.surn = self.list[7].upper()
|
||||
self.con = self.list[8].upper()
|
||||
self.patr = self.list[9].upper()
|
||||
|
||||
def apply(self, db, person):
|
||||
for name in [person.get_primary_name()] + person.get_alternate_names():
|
||||
val = 1
|
||||
if self.firstn and name.get_first_name().upper().find(self.firstn.upper()) == -1:
|
||||
valpref = 0
|
||||
if not self.prefix:
|
||||
valpref = 1
|
||||
valsurn = 0
|
||||
if not self.surn:
|
||||
valsurn = 1
|
||||
valcon = 0
|
||||
if not self.con:
|
||||
valcon = 1
|
||||
valpatr = 0
|
||||
if not self.patr:
|
||||
valpatr = 1
|
||||
if self.firstn and name.get_first_name().upper().find(self.firstn) == -1:
|
||||
val = 0
|
||||
if self.lastn and name.get_surname().upper().find(self.lastn.upper()) == -1:
|
||||
elif self.lastn and name.get_surname().upper().find(self.lastn) == -1:
|
||||
val = 0
|
||||
if self.surn and name.get_suffix().upper().find(self.surn.upper()) == -1:
|
||||
elif self.suffix and name.get_suffix().upper().find(self.surn) == -1:
|
||||
val = 0
|
||||
if self.title and name.get_title().upper().find(self.title.upper()) == -1:
|
||||
elif self.title and name.get_title().upper().find(self.title) == -1:
|
||||
val = 0
|
||||
if self.prefix and name.get_prefix().upper().find(self.prefix.upper()) == -1:
|
||||
elif self.calln and name.get_call_name().upper().find(self.calln) == -1:
|
||||
val = 0
|
||||
if self.patr and name.get_patronymic().upper().find(self.patr.upper()) == -1:
|
||||
elif self.nick and name.get_nick_name().upper().find(self.nick) == -1:
|
||||
val = 0
|
||||
if self.calln and name.get_call_name().upper().find(self.calln.upper()) == -1:
|
||||
elif self.famnick and name.get_family_nick_name().upper().find(self.famnick) == -1:
|
||||
val = 0
|
||||
if val == 1:
|
||||
else:
|
||||
#obtain surnames
|
||||
for surn in name.get_surname_list():
|
||||
if self.prefix and surn.get_prefix().upper().find(self.prefix) != -1:
|
||||
valpref = 1
|
||||
if self.surn and surn.get_surname().upper().find(self.surn) != -1:
|
||||
valsurn = 1
|
||||
if self.con and surn.get_connector().upper().find(self.con) != -1:
|
||||
valcon = 1
|
||||
if self.patr and surn.get_origintype().value == NameOriginType.PATRONYMIC \
|
||||
and surn.get_surname().upper().find(self.patr) != -1:
|
||||
valpatr = 1
|
||||
if val == 1 and valpref == 1 and valsurn == 1 and valcon == 1 and valpatr ==1:
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -38,7 +38,7 @@ from Filters.Rules._HasNoteSubstrBase import HasNoteSubstrBase
|
||||
# "People having notes that contain a substring"
|
||||
#-------------------------------------------------------------------------
|
||||
class HasNoteMatchingSubstringOf(HasNoteSubstrBase):
|
||||
"""People having notes containing <subtring>"""
|
||||
"""People having notes containing <substring>"""
|
||||
|
||||
name = _('People having notes containing <substring>')
|
||||
description = _("Matches people whose notes contain text matching a substring")
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2010 Nick Hall
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# $Id$
|
||||
"""
|
||||
Rule that checks for a person with a particular tag.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from Filters.Rules._HasTagBase import HasTagBase
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# HasTag
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class HasTag(HasTagBase):
|
||||
"""
|
||||
Rule that checks for a person with a particular tag.
|
||||
"""
|
||||
labels = [ _('Tag:') ]
|
||||
name = _('People with the <tag>')
|
||||
description = _("Matches people with the particular tag")
|
||||
@@ -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)
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -48,8 +48,9 @@ class IncompleteNames(Rule):
|
||||
|
||||
def apply(self,db,person):
|
||||
for name in [person.get_primary_name()] + person.get_alternate_names():
|
||||
if name.get_first_name() == "":
|
||||
return True
|
||||
if name.get_surname() == "":
|
||||
if name.get_first_name().strip() == "":
|
||||
return True
|
||||
for surn in name.get_surname_list():
|
||||
if surn.get_surname().strip() == "":
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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]:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user