fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
462 stars 299 forks source link

Use upper case for enumeration key words #4308

Closed hartenthaler closed 2 years ago

hartenthaler commented 2 years ago

There is now a GEDCOM test file for GEDCOM 7.0: maximal70.ged at https://gedcom.io/tools/ and a validator tool. When importing this GEDCOM file into webtrees 2.0.23 and exporting it again it is possible to use the validator to compare the result with the original file. webtrees is already very good in preserving imported GEDCOM records.

There are some minor errors reported:

INDI.DEAT.RESN CONFIDENTIAL, LOCKED
INDI.FAMC.PEDI OTHER

becomes by webtrees to

INDI.DEAT.RESN confidential, locked
INDI.FAMC.PEDI other

GEDCOM 7.0 defines that such values have to use uppercase letters like GEDCOM tags. So the validator shows up errors by webtrees.

In GEDCOM 5.5.1 it doesn't matter if these keywords are uppercase or lowercase. Maybe it is possible to switch in webtrees already now from lowercase to uppercase,

fisharebest commented 2 years ago

webtrees 2.1 now has code to standardise the upper/lower case of each field.

We currently use the upper/lower case from the 5.5.1

For most fields, it is simple to change.

The new error-checker will tell you if you use the wrong upper/lower case. So if we change it, we must do it now, before the 2.1 release. (Which I wanted to do today...)

Otherwise we will tell people to use lowercase today, and then uppercase next month :-(

BUT, there are some fields that require more significant changes. webtrees converts RESN to lowercase during import, so we can use performance optimisations on the privacy calculations.

There is also code that assumes PEDI will be lower case.

fisharebest commented 2 years ago

There is also code that assumes PEDI will be lower case.

Fixed.

This just leaves RESN.

fisharebest commented 2 years ago

Need to check AGE

fisharebest commented 2 years ago

All fields now use upper case - except RESN.

fisharebest commented 2 years ago

Done!