gbif / gbif-api

GBIF API
Apache License 2.0
28 stars 5 forks source link

language codes for vernacular names appear to be capitalized (was: "eng" currently: "ENGLISH") #95

Closed jhpoelen closed 2 years ago

jhpoelen commented 2 years ago

Previously,

http://api.gbif.org/v1/species/2882753/vernacularNames

would return ISO 639-3 compatible language codes like "eng", however, as of today 2022-09-12, it appears that the language codes are all-caps (e.g., "ENGLISH"). These all-cap language names appear not to be ISO 639 compatible (see https://iso639-3.sil.org/code_tables/639/data/e and attached screenshot).

Suggest to revert language codes of vernacular names to ISO 639 compatible strings.

Screenshot from 2022-09-12 14-31-34

mdoering commented 2 years ago

Looks like the enum is serialized directly, not using the ISO serializer.

marcos-lg commented 2 years ago

Fixed

jhpoelen commented 2 years ago

@marcos-lg @mdoering Thanks for your prompt reply!

I reverted my workaround, and the integration tests passed as before.

jhpoelen commented 2 years ago

related GBIF commit https://github.com/gbif/checklistbank/commit/26121074464c8c3434ff89e6d71076de628926f3