Commit Graph

27463 Commits

Author SHA1 Message Date
Nick Hall
183280b35a Add unit tests for quarter dates 2022-02-19 21:09:43 +00:00
Steve Youngs
76ee061b25 Teach DateParser about calendar quarter dates
The calendar year can be divided into four quarters, often abbreviated
as Q1, Q2, Q3, and Q4. Q1 is 1 January to 31 March, Q2 1 April to
30 June, Q3 is 1 July to 30 September and Q4 is 1 October to 31 December

This commit teaches DateParser to parse quarter dates and represet them
as a date range. An example quarter date is "Q2 2020" which is converted
to "between 1 April 2020 and 30 June 2020". This is a one way conversion
2022-02-19 21:08:36 +00:00
CWSchulze
47b57d5b59 Enable "file:///" URI paths for addons location 2022-02-19 18:37:27 +00:00
John Muccigrosso
b9d2c0f00e Increase information in database summary text report
Add type counts for events, places, sources, citations,
repositories and notes.
2022-02-18 23:29:10 +00:00
John Muccigrosso
33e0345eb0 Fix presumed typo in menu item
"Sorts events" should be "Sort events".
2022-02-18 23:05:52 +00:00
John Muccigrosso
e28a37ba14 Explicitly set birth name in GEDCOM export
Following discussion at https://gramps.discourse.group/t/distinguish-birth-and-married-names-in-ged-file/815/7 .
2022-02-18 22:49:17 +00:00
prculley
ba0c222c4e Relationship Graph: Add option for 'offset parents'
Replaces 'use subgraph' option
Fix extra node appearing when a spouse is filtered out

Fixes #11550, #11494
2022-02-18 20:40:08 +00:00
Mathieu
7bfbec139f Provide an option to "hide" the LDS tab
Immplements #3872.
2022-02-18 19:37:52 +00:00
Nick Hall
ec5afcf45e Add new Indonesian translation
Only about 1% of strings have been translated, so we won't make
it active yet.  At some point we need to update the LINGUAS file
and add a classifier in the setup script.
2022-02-17 23:06:20 +00:00
Nick Hall
471ddcbce7 Merge pull request #1161 from SNoiraud/FR11809 2022-02-15 22:37:36 +00:00
SNoiraud
8de8e36095 editdate: better pylint score 2022-02-15 22:16:54 +00:00
SNoiraud
42b71b23d6 Allow user to set default calendar in date editor
Fixes #11809
2022-02-15 22:16:28 +00:00
Dave Scheipers
677d09e578 Update Preferences dialog
Clean up of existing Preferences tabs.

Implements #12049
2022-02-15 21:48:28 +00:00
David Straub
f5a4e4829f Fix Place.get_text_data_child_list 2022-02-14 22:14:56 +00:00
David Straub
c740aacce0 Add gramps_id to repository & note text data lists 2022-02-14 22:06:38 +00:00
Nick Hall
1d56e7d47a Merge pull request #1120 from DavidMStraub/main 2022-02-14 21:55:49 +00:00
David Straub
1849f11e5d Add unit test for python3 -m gramps 2022-02-14 21:52:00 +00:00
David Straub
c0c491cffd Add __main__.py 2022-02-14 21:51:47 +00:00
Nick Hall
2e8d22ea4a Merge pull request #1018 from prculley/no_magic 2022-02-14 21:19:53 +00:00
prculley
261f651f3b Fix Check&Repair progress meter for Duplicated Gramps_ID check 2022-02-14 21:19:19 +00:00
prculley
86c47156e6 Fix no_magic for dbapi 2022-02-14 21:19:15 +00:00
Matthias Kemmer
410a64b142 Add CopyAll functionality to Ancestor gramplet 2022-02-14 20:51:02 +00:00
Nick Hall
0ff0104a68 Fix bug introduced when simplifying looping
Partially revert commit 7248f073f0.

Deleting items during list iteration can lead to problems. In this
case an infinite loop was introduced in PR #975.
2022-02-14 19:40:39 +00:00
Nick Hall
e390bb7c5b Update gramps.pot 2022-02-14 17:44:19 +00:00
Nick Hall
d88bb36ba7 Fix for renamed gramps.xml.in file
The file was renamed as part of PR #1143.
2022-02-14 17:44:19 +00:00
Andika Triwidada
220633862c Translated using Weblate (Indonesian)
Currently translated at 1.8% (130 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/id/
2022-02-14 17:44:05 +00:00
RiseT
a353b2889f Translated using Weblate (German)
Currently translated at 100.0% (6915 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/de/
2022-02-14 17:44:05 +00:00
cedecode
e3262e2d40 Translated using Weblate (German (Austria))
Currently translated at 100.0% (6915 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/de_AT/
2022-02-14 17:44:05 +00:00
Mukli Krisztián
f13c53b5f7 Translated using Weblate (Hungarian)
Currently translated at 100.0% (6915 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/hu/
2022-02-14 17:44:05 +00:00
Avi Markovitz
26999c640a Translated using Weblate (Hebrew)
Currently translated at 100.0% (6915 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/he/
2022-02-14 17:44:05 +00:00
Mirko Leonhaeuser
ff6d4b2754 Translated using Weblate (German)
Currently translated at 100.0% (6915 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/de/

Translated using Weblate (German)

Currently translated at 100.0% (6915 of 6915 strings)

Translation: Gramps/gramps
Translate-URL: https://hosted.weblate.org/projects/gramps-project/gramps/de/
2022-02-14 17:44:05 +00:00
Nick Hall
0b04c8ab77 Merge pull request #975 from Baizley/simplify_loops 2022-02-13 21:00:07 +00:00
Baizley
6d1105da81 Correct enumerations unpacking. 2022-02-13 20:49:25 +00:00
Baizley
a9a1b7b57e Small code improvements. 2022-02-13 20:49:25 +00:00
Baizley
7248f073f0 Simplify looping across Gramps.
Index based loops across the Gramps project
are mapped to their Pythonic equalivant.

Many of these improves radability, and a
some of them improves performance by being
lazy evaluated.
2022-02-13 20:49:19 +00:00
Nick Hall
8777c11811 Merge pull request #974 from Baizley/simplify-error-construction-in-argument-parser 2022-02-13 20:38:16 +00:00
Baizley
8ca2ff5dad Refactor error construction into a common method. 2022-02-13 19:58:09 +00:00
Baizley
8a5c8ffbc9 Expand unit test for Gramps parsing error. 2022-02-13 19:58:09 +00:00
Baizley
1b53a3948a Simplify handling of getops error. 2022-02-13 19:58:09 +00:00
Baizley
178d3ecb00 Add unit test for handling getopt error. 2022-02-13 19:58:09 +00:00
Nick Hall
ba09cda0d0 Merge pull request #970 from Baizley/simplify_get_name_format 2022-02-13 19:54:51 +00:00
Baizley
89c73db352 Correct continuation line unaligned for hanging indent 2022-02-13 19:43:25 +00:00
Baizley
3b5d324b95 Remove unused imports. 2022-02-13 19:43:25 +00:00
Baizley
99d589a7a2 Add tests for methods relying on name_formats.
The NameDisplay class contains various methods
that interact with the dict holding the
name formats.
To enable further refactoring, these methods
have been brought under test for most of
their implementations.
2022-02-13 19:43:25 +00:00
Baizley
080d1d1dca Correct the assumed order of the name formats.
This commit corrects the ordering to the one in
Gramps 5.1 when run on Python 3.3.
Unlike the implementation in 5.1, this
implementation does not rely on dict ordering
and will therefore be consistent across Python
versions.

The assumed order of ascending positives followed
by negatives in reverse order, was based on tests
run on Python 3.7. However, the current ordering
in Gramps 5.1 is depended on dict ordering which
has changed between Python versions.
The expected ordering is therefore taken as the
one in Gramps 5.1 run on Python 3.3, which is
what the CI environment tests on.
This ordering is positives followed by negatives
both in ascending order.
I.e. -2, -3, -1,  0,  1,  2,  3,  4,  5
  =>  0,  1,  2,  3,  4,  5, -1, -2, -3
2022-02-13 19:43:25 +00:00
Baizley
3cb4115ae4 Use list comprehension for name format list.
Combine construction and filtering with list
comprehension.

Adjust sort method to work over tuples.
2022-02-13 19:43:25 +00:00
Baizley
b66b9b3727 Simplify sorting in get_name_format.
First, the simplification uses the
built-in cmp_to_key function from functools
to remove the duplicated function in the
class.

Second, the cmp function was reduced to
two cases:
1. When x and y is positive:
Here the st
2. When x or y is negative:
Here the sign of y determines the ordering,
which can be seen from the following cases:

1. x is negative, y is negative =>
their order needs to be, so y is considered
higher, which means x is considered lower
(negative).

2. x is negative, y is positive =>
x is considered higher (positive).

3. x is positive, y is negative =>
y is considered higher, which means x is
considered lower (negative).

Third, the sorting is abstracted away
behind a function declaring the sort order.
2022-02-13 19:43:25 +00:00
Baizley
02983370bd Add test coverage for get_name_format.
The test class enumaretes all possible
values for the three boolean arguments.
Some of the results is arguably wrong,
but since other classes depend on the
current semantics, these cases have
not been corrected.
2022-02-13 19:43:25 +00:00
André Apitzsch
727139f817 Remove xdg-utils dependency 2022-02-13 19:23:00 +00:00
Nick Hall
9bb252e405 Merge pull request #1143 from a-andre/reverseDNS 2022-02-13 19:00:02 +00:00