Gramps addons-source vs gramps

Have a look at the Symbols class. There are many symbols defined that you can choose from.

That section of Symbols class answers the other question by @dave.khuon on GitHub about the correspondences of numbers to genders.

But Dave wants add Gender symbols to some built-in reports. His GitHub PR has an implementation that handles Male, Female and Neuter. But Unknown and Other aren’t “Neuter”. So I was hoping for an example that shows how to be flexible enough to handle future changes.

Symbols class seem the appropriate functionality to do that. But since the report I mentioned blows up, perhaps you could suggest a good implementation of the Unknown and Other symbols.

The relationship view uses the first four symbols in the Symbol class for the gender symbols.

So we use SYMBOL_ASEXUAL_SEXLESS for “Unknown” and SYMBOL_HERMAPHRODITE for “Other”.

1 Like

Hmmm. The Combined experimental Relationship view mode was really unhappy with the Other gender too. Guess I’ll have to compare to see how it differs from the normal Relationships view mode.

I have 2 sets of PRs that I wrongly committed to Gramps/master. I should have gone to maintenance/gramps52. My apologies. Anyway, I like to do all over, through the normal process.

  1. for the 3 reports in textreport, I was using only SYMBOLs _MALE, _FEMALE, and _NEUTRAL (if not the first 2). I just recoded to use the full set of symbols are these (0,1,2,3,7,8) the only ones related to gender? If someone can confirm that, I will push the new code in. I will default to 2 should the gender be none of the above. My changes will look like this.

_MSYM = Symbols()
_MSYM_GSET = (0,1,2,3,7,8)

if gndr not in _MSYM_GSET: gndr = 2 # = unknown
return _MSYM.get_symbol_for_string(gndr)+ ’ ’

  1. as for the graphic reports in drawreport, the problem is more complicated. It might be related to the absence of additional person boxes that I created in the new style to handle the color. I will use your tips to see if I can borrow and use them in these reports. Meanwhile, let me deal with text reports first.

Again, thanks for your feed-back.
PS: please kill all my 5 PRs that reached gramps/master

What value to the database for person.gender? (0,1,2,3,7,8) or more? or less?

Since these are enhancements not bug fixes, I suspect that the PRs have to go into the Master branch. They’d be rejected for being more than bug fixes or translations.

Or, I could just use symbols from the whole table and use default only if the value is not in the table.

1 Like

That sounds reasonable. It should make it flexible enough to handle when the Symbols class has future expansions.

I take it that I can rely on this subset (0,1,2,3,7,8) of the symbols table representing all of the person genders.
I will default to 2 if it is not in the subset. I agree we can fix it should the symbol table be revised later.

Thanks.

1 Like

@Nick-Hall
Added a note to Feature Request with unhandled exception error information.
The feature request should probably be converted to a bug report.
0013429: [CombinedView] Update addon to support when Child has ‘Other’ Gender

The response to that should be a good cross-reference for filing a “Other” gender bug/issue for the Reports → Graphical Reports → Ancestor Tree

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.