-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localization setting change leads to incorrect unique detected species count #54
Comments
Hi, yes that would mess up the stats. This should probably be made clearer in the 'Settings' |
This is a fundamental and very common problem of taxonomy - also for scientific names. A database of biological entities (taxa) would need to be implemented to change that behaviour, i.e. usage of a taxonomic backbone. I doubt I find the time to fix this, but surely there are already working solutions for that. I would bet there is a RESTful API for birds somewhere which could provide a current taxonomy based on IDs, and without looking at it I bet you a beverage that @kahst can provide a solution basically out of the box. 😄 The basic idea is that one uses a stable ID instead of a name, and has relations behind that ID to deliver a) consistency in case of name changes and b), more importantly, consistency in case of merges and splits considering the ID. (Which happens, rather frequently. We even have a 'taxonomy' of taxonomists for that - we call them splitters and lumbers based on their favoured changes in biological taxonomy...) |
I fixed this manually, by updating the detected species in the database. However, IMHO there is an "easy" fix: There is already the scientific name of the bird in the database. The front-end can use this name as a key to show language-specific bird names in the front-end only. No additional API, etc. is needed. The database could only hold the scientific name and all other methods/features/front-ends could operate on them. Like in this case, just mapping the scientific name when displaying the front-end to the selected language. The mapping must be already available in the code base, as otherwise the database table could not store both, scientific and language-specific names. |
Ouch, I hope that was not too painful. Yes, using scientific names internally is the correct thing to do for easy internationalization. |
If the warning doesn't work in the future, it's kind of a case of 'bad luck' really isn't it. Other than not allowing that to change (disable dropdown) once the db contains entries but that is all sorts of complicated really.... |
Describe the bug
If one changes the database language in the localisation settings, previously detected species are double counted with their common names in the current and previously selected localisation languages. E.g., if I switch from English to German, I get. in the stats "Grünfink" and "European Goldfinch". Hence, the number of identified species is wrong after the settings are updated.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Localization should only impact displayed names, not database stats or number of unique species.
Screenshots
Additional context
Your build
Code or log snippets
The text was updated successfully, but these errors were encountered: