umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.16k stars 220 forks source link

Language switching dropdown not working as expected #2086

Closed iriman closed 3 weeks ago

iriman commented 1 month ago

Describe the bug Language switching dropdown on main page doesn't work for Persian language.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://umap.openstreetmap.fr/en/'
  2. Click on 'English' dropdown and the bottom of page and choose 'فارسی'
  3. See error '404 not found'

Expected behavior Switching language of website

Additional context By clicking on the button, page address ends with '/fa' and gives error. But when opening website on a device with Persian locale, it ends with '/fa-ir' and this works correctly.

yohanboniface commented 1 month ago

Thanks for the report, the registered language version seems to be fa-ir, but the dropbox ask for fa. See "https://umap.openstreetmap.fr/fa-ir/". I'll have a look soon.

yohanboniface commented 3 weeks ago

@iriman We have fa-ir in translations, but Django does not know about fa-ir. Should I register fa-ir in Django or move all fa-ir translations to fa (given it is untranslated at this time) and just keep fa ?

iriman commented 3 weeks ago

There is another language code fa-Af for Farsi in Afghanistan that is slightly different from Farsi in Iran. IMO there's no problem if you move translations from fa-ir to fa, unless someone request for a specific fa-AF translation on transifex in future. Since current translation in transifex is work of an Iranian user.