DigitalCommons / mykomap

A web application for mapping initiatives in the Solidarity Economy
3 stars 0 forks source link

Map may not be localising Vocab directory values correctly? #218

Closed wu-lee closed 10 months ago

wu-lee commented 11 months ago

Describe the bug The DotCoop 2023 demo map uses the country ID as a directory field. When switching to a supported language for the UI, say ES, the UI shows Spanish but the country names seem to remain English.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dev.maps.solidarityeconomy.coop/temp/dotcoop2023/?language=FR
  2. Open the directory sidebar
  3. Check the country names.

Expected behavior The directory should be labelled "Annuaire" and it should have the first three values "Argentine", "Australie" and "Austriche".

What's seen Although the label is correct the first three values are "Argentina", "Australia" and "Austria". Similarly for Spanish (language=ES), the names are in English.

Desktop:

ColmDC commented 10 months ago

I cannot replicate this in Firefox on Windows on a MM v3.0.9. @wu-lee

wu-lee commented 10 months ago

I've actually found a bug related this when working on #200 - the code has a function to look up vocab terms with a parameter for the language which defaults to the fallback language (English). The parameter was omitted and so was always the fallback language.

The reason why you couldn't replicate it is that the bug was introduced after v3.0.9, in fact in the branch for #200 (appearing in v3.1.0). It appeared in, and was fixed in updates to this change: e45b88ce38

I've also made the parameter non-optional, just to avoid that in the future. Here e45b88ce38

ColmDC commented 10 months ago

Can't replicate on 3.1.0, so closing.