Skip to content

Conversation

@tacsipacsi
Copy link
Contributor

Wikidata recently introduced “default values for labels” to reduce size of items. One particular example where these are used is humans, since humans’ names are written the same in all Latin-script languages. Well, mostly. For example, Leonardo da Vinci is called “Léonard de Vinci” in French, and because all labels that use the Italian spelling have been removed (including Dutch, English and German), now the Dutch interface falls back to the only label we extracted, saying that the namesake of Leonardo da Vincistraat is “Léonard de Vinci” rather than “Leonardo da Vinci”.

(I couldn’t find such an example in Brussels, but it’s possible that all labels are removed in favor of mul, in which case we wouldn’t extract any label, and the frontend would display null. That’d be even worse than showing a French label on the Dutch interface.)

This patch fixes this by falling back to the mul label if there is no label in the given language. This is only a fallback, so the French interface still says that the rue Léonard de Vinci is named after “Léonard de Vinci”; and it affects only labels, not descriptions, as there are no mul descriptions.

Wikidata recently introduced “default values for labels”
(https://www.wikidata.org/wiki/WD:mul) to reduce size of items. One
particular example where these are used is humans, since humans’ names
are written the same in all Latin-script languages. Well, mostly. For
example, Leonardo da Vinci (https://www.wikidata.org/wiki/Q762) is
called “Léonard de Vinci” in French, and because all labels that use the
Italian spelling have been removed (including Dutch, English and
German), now the Dutch interface falls back to the only label we
extracted, saying that the namesake of Leonardo da Vincistraat is
“Léonard de Vinci” rather than “Leonardo da Vinci”.

(I couldn’t find such an example in Brussels, but it’s possible that
*all* labels are removed in favor of `mul`, in which case we wouldn’t
extract any label, and the frontend would display `null`. That’d be
even worse than showing a French label on the Dutch interface.)

This patch fixes this by falling back to the `mul` label if there is no
label in the given language. This is only a fallback, so the French
interface still says that the rue Léonard de Vinci is named after
“Léonard de Vinci”; and it affects only labels, not descriptions, as
there are no `mul` descriptions.
@tacsipacsi
Copy link
Contributor Author

Thanks for triggering CI! The PHPStan errors are all unrelated, most of them fixed in #71.

@jbelien jbelien merged commit a71d77e into EqualStreetNames:master Sep 26, 2025
3 of 4 checks passed
@tacsipacsi tacsipacsi deleted the mul branch October 5, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants