[openstreetmap/openstreetmap-website] Translated texts containing ` ` are showed in routing directions without converting the HTML entity to its associated character (Issue #6163)

2025-07-02 Thread ricloy via rails-dev
ricloy created an issue (openstreetmap/openstreetmap-website#6163)

### URL

https://www.openstreetmap.org/directions?locale=et&engine=fossgis_osrm_car&route=43.96236%2C11.30708%3B43.96151%2C11.30427#map=18/43.961907/11.305688

### How to reproduce the issue?

Wherever translated text 
[Osm:Javacript.directions.distance_in_units.m](https://translatewiki.net/w/i.php?title=Special:Translations&message=Osm%3AJavascripts.directions.distance_in_units.m)
 contains the HTML entity ` `, OSM website literally shows ` ` 
without parsing it.

To see the problem, just switch to Eesti language and then query for directions 
from any point to any point of the map:

![Image](https://github.com/user-attachments/assets/2fb15eec-7adb-4ffb-b180-eedb95dc43c3)

 I think that OSM website should convert it to a non-breaking space character 
and show that to the user.

Another possibility, on translators side, could be to directly insert the UTF-8 
encodings of non-breaking chars (U+00A0) into the translated text but they are 
not visually distinguishable from ordinary space chars, hence they might be 
"corrected" by other translators every once in a while.

### Screenshot(s) or anything else?

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6163
You are receiving this because you are subscribed to this thread.

Message ID: ___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev


Re: [openstreetmap/openstreetmap-website] Translated texts containing `  ` are showed in routing directions without converting the HTML entity to its associated character (Issue #6163)

2025-07-02 Thread ricloy via rails-dev
ricloy left a comment (openstreetmap/openstreetmap-website#6163)

AFAIK HTML entities are used and parsed correctly in a few other cases (e.g. 
`©` and `®` in the copyright page); I think it would be plausible to 
have the same behaviour with ` `; moreover I don't how many translators 
are familiar with the concept of Unicode/UTF-8.

P.S. I'm one of the Italian translators and I support using UTF-8 encodings 
when necessary.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6163#issuecomment-3027496078
You are receiving this because you are subscribed to this thread.

Message ID: 
___
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev