[editor] Use name in local language #6257

Merged
root merged 3 commits from name into master 2024-04-25 06:20:03 +00:00
Contributor

Helb for ios needed

I don't have a mac nor an iphone, so I can't implement the ios part. I tried to make changes without Xcode, but that didn't work without a proper IDE.

That's why I need someone who can mirror the changes done on Android to ios. Moreover the layout of the editing page needs to be change to have enough room for the "As it is written in the local language" string.


[editor] Use name in local language

As we can see in #762, #1478, #1481, #3378, #442 and other issues, OM has problems with handeling name tags. This is not a small bug but a fundametal problem with the approach OM uses. Hiding the default name=* from the users and then trying to do conversions that are assumed to be save leads to unpredictable behaviour and breaks osm data.

I think it's best to not do any conversions in the editor but just present the actual osm data to the users. Just having one name field (for most features) will also make the editing UX simpler. At the moment many people get confused by the two name fields and use them for short-name and long-name or invent translations where there are none (e.g. most Restaurants don't have multilingual names and adding e.g. name:en doesn't really make sense) (Source: changeset observation)

This PR consists of two changes.

  • Firstly it changes the languages that are shown to the user by default. Previously english, the user's language and the countrie's language the POI is in was shown. Now only name=* / Native for each country / "As it is written in the local language" is shown.

  • Moreover, name conversions for displaying and saving names, that caused problems are removed. Previously OM would e.g. display the name value in name:en in case name:en is empty.

Todo

  • core
  • Android
  • Test changes and upload data to OSM
  • ios
  • add translations

Examples

Most OSM features just have a name tag. For these places OM previously used to convert the name Tag and display it as german and english (note that the english name is totally made up by OM here). When saving, name changes are not forwarded to 'name' but to 'name:de' or 'name:en' while the outdated 'name' value stays in the OSM database. An example for this feature type is (https://www.openstreetmap.org/way/308082258)

This PR Before
Screenshot_2023-10-09-21-25-52-111_app organicmaps beta Screenshot_2023-10-09-21-25-19-441_app organicmaps

For features with several languages the picture is similar. The englisch value that shows up in the latest release is made up by OM as well. (https://www.openstreetmap.org/relation/147095)

This PR Before
Screenshot_2023-10-09-21-27-13-420_app organicmaps beta Screenshot_2023-10-09-21-26-42-204_app organicmaps
Screenshot_2023-10-09-21-27-22-523_app organicmaps beta Screenshot_2023-10-09-21-26-51-884_app organicmaps

Creating new features looks like this

This PR Before
Screenshot_2023-10-09-21-28-49-750_app organicmaps beta Screenshot_2023-10-09-21-28-34-494_app organicmaps
### :exclamation: **Helb for ios needed** I don't have a mac nor an iphone, so I can't implement the ios part. I tried to make changes without Xcode, but that didn't work without a proper IDE. That's why I need someone who can mirror the changes done on Android to ios. Moreover the layout of the editing page needs to be change to have enough room for the "As it is written in the local language" string. --- ### [editor] Use name in local language As we can see in #762, #1478, #1481, #3378, #442 and other issues, OM has problems with handeling name tags. This is not a small bug but a fundametal problem with the approach OM uses. Hiding the default `name=*` from the users and then trying to do conversions that are assumed to be save leads to unpredictable behaviour and breaks osm data. I think it's best to not do any conversions in the editor but just present the actual osm data to the users. Just having one name field (for most features) will also make the editing UX simpler. At the moment many people get confused by the two name fields and use them for short-name and long-name or invent translations where there are none (e.g. most Restaurants don't have multilingual names and adding e.g. `name:en` doesn't really make sense) (Source: changeset observation) This PR consists of two changes. - Firstly it changes the languages that are shown to the user by default. Previously english, the user's language and the countrie's language the POI is in was shown. Now only `name=*` / `Native for each country` / "As it is written in the local language" is shown. - Moreover, name conversions for displaying and saving names, that caused problems are removed. Previously OM would e.g. display the `name` value in `name:en` in case `name:en` is empty. ### Todo - [x] core - [x] Android - [x] Test changes and upload data to OSM - [x] ios - [x] add translations ### Examples Most OSM features just have a `name` tag. For these places OM previously used to convert the `name` Tag and display it as german and english (note that the english name is totally made up by OM here). When saving, name changes are not forwarded to 'name' but to 'name:de' or 'name:en' while the outdated 'name' value stays in the OSM database. An example for this feature type is (https://www.openstreetmap.org/way/308082258) | This PR| Before | |--------|--------| | ![Screenshot_2023-10-09-21-25-52-111_app organicmaps beta](https://github.com/organicmaps/organicmaps/assets/79519062/106389bf-e746-4ae0-a3d5-cd1552738ff9) | ![Screenshot_2023-10-09-21-25-19-441_app organicmaps](https://github.com/organicmaps/organicmaps/assets/79519062/7e3fea82-b7b3-4406-9f5a-a7f8fa1f3d8b) | For features with several languages the picture is similar. The englisch value that shows up in the latest release is made up by OM as well. (https://www.openstreetmap.org/relation/147095) | This PR | Before | |--------|--------| | ![Screenshot_2023-10-09-21-27-13-420_app organicmaps beta](https://github.com/organicmaps/organicmaps/assets/79519062/566baa00-ffcc-465a-b96f-01ee3e26dc58)| ![Screenshot_2023-10-09-21-26-42-204_app organicmaps](https://github.com/organicmaps/organicmaps/assets/79519062/06df345c-306f-4032-b076-52e47efe375b) | |![Screenshot_2023-10-09-21-27-22-523_app organicmaps beta](https://github.com/organicmaps/organicmaps/assets/79519062/13b2889e-dfab-459d-84c8-c71cac5409cf)|![Screenshot_2023-10-09-21-26-51-884_app organicmaps](https://github.com/organicmaps/organicmaps/assets/79519062/d217bb36-7750-477d-81d1-152b5261636e)| Creating new features looks like this | This PR | Before | |--------|--------| | ![Screenshot_2023-10-09-21-28-49-750_app organicmaps beta](https://github.com/organicmaps/organicmaps/assets/79519062/77051041-c430-406b-8654-4dd9df97d15c)| ![Screenshot_2023-10-09-21-28-34-494_app organicmaps](https://github.com/organicmaps/organicmaps/assets/79519062/303b37a2-69e6-49b8-9363-da71701e3156) |
biodranik (Migrated from github.com) requested changes 2023-11-03 00:53:22 +00:00
biodranik (Migrated from github.com) left a comment

Let's try to avoid mapsme mistakes and do it better by educating users. I'm counting on someone monitoring OSM edits to better understand if wrong names can be prevented at the OM side by improving the UI/UX.

  1. Does it make sense to change the "Add a language" button to "Add a translation"?
  2. Please consider removing/reverting code changes from all related commits: https://github.com/mapsme/omim/pull/3788 https://github.com/mapsme/omim/pull/4229/commits https://github.com/mapsme/omim/pull/4268/files
  3. Changing the core implies symmetric changes on iOS.
Let's try to avoid mapsme mistakes and do it better by educating users. I'm counting on someone monitoring OSM edits to better understand if wrong names can be prevented at the OM side by improving the UI/UX. 1. Does it make sense to change the "Add a language" button to "Add a translation"? 2. Please consider removing/reverting code changes from all related commits: https://github.com/mapsme/omim/pull/3788 https://github.com/mapsme/omim/pull/4229/commits https://github.com/mapsme/omim/pull/4268/files 3. Changing the core implies symmetric changes on iOS.
biodranik (Migrated from github.com) commented 2023-11-03 00:36:46 +00:00

Consider remove the code that won't be used later instead of commenting it.

Consider remove the code that won't be used later instead of commenting it.
biodranik (Migrated from github.com) commented 2023-11-03 00:14:49 +00:00

Is this needed?

Is this needed?
biodranik (Migrated from github.com) commented 2023-11-03 00:15:43 +00:00
    if (name.lang.equals(Language.DEFAULT_LANG_CODE))
      holder.inputLayout.setHint(holder.itemView.getContext().getString(R.string.editor_default_language));
    else
      holder.inputLayout.setHint(name.langName);
```suggestion if (name.lang.equals(Language.DEFAULT_LANG_CODE)) holder.inputLayout.setHint(holder.itemView.getContext().getString(R.string.editor_default_language)); else holder.inputLayout.setHint(name.langName); ```
biodranik (Migrated from github.com) commented 2023-11-03 00:16:45 +00:00
  [editor_default_language_hint]
```suggestion [editor_default_language_hint] ```
biodranik (Migrated from github.com) commented 2023-11-03 00:18:20 +00:00
    tags = android
    comment = The second part of the editor_edit_place_name_hint to explain that name should be entered in a local language, see https://wiki.openstreetmap.org/wiki/Key:name
```suggestion tags = android comment = The second part of the editor_edit_place_name_hint to explain that name should be entered in a local language, see https://wiki.openstreetmap.org/wiki/Key:name ```
biodranik (Migrated from github.com) commented 2023-11-03 00:24:05 +00:00

Here is the bunch of translations generated with tools/python/translate.py where the first part "the name of the place" should be removed, to get a correct hint. Note that the final phrase should look good taking into account the title "Name of the place".

    en = The name of the place, as it is written in the local language
    ar = اسم المكان كما هو مكتوب باللغة المحلية
    be = Назва мясцовасці, як напісана на мясцовай мове
    bg = Името на мястото, както се изписва на местния език
    ca = El nom del lloc, tal com està escrit en la llengua local
    cs = Název místa, jak je zapsán v místním jazyce
    da = Stedets navn, som det er skrevet på det lokale sprog
    de = Der name des ortes, wie er in der landessprache geschrieben wird
    el = Το όνομα του τόπου, όπως γράφεται στην τοπική γλώσσα
    es = El nombre del lugar, tal y como está escrito en la lengua local
    es-MX = El nombre del lugar, tal como está escrito en el idioma local.
    et = Koha nimi, nagu see on kirjutatud kohalikus keeles.
    eu = Lekuaren izena, bertako hizkuntzan idatzita dagoenez
    fa = نام محل همانطور که به زبان محلی نوشته شده است
    fi = Paikan nimi, kuten se kirjoitetaan paikallisella kielellä.
    fr = Le nom du lieu, tel qu'il est écrit dans la langue locale.
    he = שם המקום, כפי שהוא כתוב בשפת המקום
    hi = स्थान का नाम, जैसा कि स्थानीय भाषा में लिखा गया है
    hu = A helység neve, ahogyan azt a helyi nyelven írják
    id = Nama tempat, seperti yang ditulis dalam bahasa lokal
    it = Il nome del luogo, così come è scritto nella lingua locale
    ja = 現地の言葉で書かれた地名
    ko = 현지 언어로 표기된 장소 이름
    mr = स्थानिक भाषेत लिहिल्याप्रमाणे ठिकाणाचे नाव
    nb = Navnet på stedet, slik det skrives på det lokale språket.
    nl = De naam van de plaats, zoals die in de plaatselijke taal wordt geschreven
    pl = Nazwa miejsca zapisana w lokalnym języku
    pt = O nome do local, tal como está escrito na língua local
    pt-BR = O nome do lugar, como está escrito no idioma local
    ro = Numele locului, așa cum este scris în limba locală
    ru = Название места, как оно пишется на местном языке
    sk = Názov miesta, ako sa píše v miestnom jazyku
    sv = Platsens namn, som det är skrivet på det lokala språket
    sw = Jina la mahali, kama limeandikwa katika lugha ya ndani
    th = ชื่อสถานที่ตามที่เขียนเป็นภาษาท้องถิ่น
    tr = Yerel dilde yazıldığı şekliyle yerin adı
    uk = Назва місця, як вона пишеться місцевою мовою
    vi = Tên của địa điểm, như được viết bằng ngôn ngữ địa phương
    zh-Hans = 用当地语言书写的地名
    zh-Hant = 用當地語言書寫的地點名稱

Here is the bunch of translations generated with `tools/python/translate.py` where the first part "the name of the place" should be removed, to get a correct hint. Note that the final phrase should look good taking into account the title "Name of the place". ``` en = The name of the place, as it is written in the local language ar = اسم المكان كما هو مكتوب باللغة المحلية be = Назва мясцовасці, як напісана на мясцовай мове bg = Името на мястото, както се изписва на местния език ca = El nom del lloc, tal com està escrit en la llengua local cs = Název místa, jak je zapsán v místním jazyce da = Stedets navn, som det er skrevet på det lokale sprog de = Der name des ortes, wie er in der landessprache geschrieben wird el = Το όνομα του τόπου, όπως γράφεται στην τοπική γλώσσα es = El nombre del lugar, tal y como está escrito en la lengua local es-MX = El nombre del lugar, tal como está escrito en el idioma local. et = Koha nimi, nagu see on kirjutatud kohalikus keeles. eu = Lekuaren izena, bertako hizkuntzan idatzita dagoenez fa = نام محل همانطور که به زبان محلی نوشته شده است fi = Paikan nimi, kuten se kirjoitetaan paikallisella kielellä. fr = Le nom du lieu, tel qu'il est écrit dans la langue locale. he = שם המקום, כפי שהוא כתוב בשפת המקום hi = स्थान का नाम, जैसा कि स्थानीय भाषा में लिखा गया है hu = A helység neve, ahogyan azt a helyi nyelven írják id = Nama tempat, seperti yang ditulis dalam bahasa lokal it = Il nome del luogo, così come è scritto nella lingua locale ja = 現地の言葉で書かれた地名 ko = 현지 언어로 표기된 장소 이름 mr = स्थानिक भाषेत लिहिल्याप्रमाणे ठिकाणाचे नाव nb = Navnet på stedet, slik det skrives på det lokale språket. nl = De naam van de plaats, zoals die in de plaatselijke taal wordt geschreven pl = Nazwa miejsca zapisana w lokalnym języku pt = O nome do local, tal como está escrito na língua local pt-BR = O nome do lugar, como está escrito no idioma local ro = Numele locului, așa cum este scris în limba locală ru = Название места, как оно пишется на местном языке sk = Názov miesta, ako sa píše v miestnom jazyku sv = Platsens namn, som det är skrivet på det lokala språket sw = Jina la mahali, kama limeandikwa katika lugha ya ndani th = ชื่อสถานที่ตามที่เขียนเป็นภาษาท้องถิ่น tr = Yerel dilde yazıldığı şekliyle yerin adı uk = Назва місця, як вона пишеться місцевою мовою vi = Tên của địa điểm, như được viết bằng ngôn ngữ địa phương zh-Hans = 用当地语言书写的地名 zh-Hant = 用當地語言書寫的地點名稱 ```
@ -28,3 +27,3 @@
StringUtf8Multilang::kDefaultCode == langCode)
if (StringUtf8Multilang::kUnsupportedLanguageCode == langCode)
{
return false;
biodranik (Migrated from github.com) commented 2023-11-03 00:30:22 +00:00

Why kDefaultCode was removed here?

Why kDefaultCode was removed here?
biodranik (Migrated from github.com) commented 2023-11-03 00:32:48 +00:00

Please remove the code instead of leaving it in that state.

Please remove the code instead of leaving it in that state.
biodranik (Migrated from github.com) commented 2023-11-03 00:34:27 +00:00

Should it be removed?

Should it be removed?
biodranik (Migrated from github.com) commented 2023-11-03 00:35:22 +00:00

Is this variable needed?

Is this variable needed?
biodranik (Migrated from github.com) commented 2023-11-03 00:38:28 +00:00

Isn't the default name extracted in the loop below?

Isn't the default name extracted in the loop below?
biodranik (Migrated from github.com) commented 2023-11-03 00:35:03 +00:00

Is it needed?

Is it needed?
biodranik (Migrated from github.com) commented 2023-11-03 00:39:40 +00:00

Consider removing addFakes

Consider removing addFakes
biodranik (Migrated from github.com) commented 2023-11-03 00:51:11 +00:00

Let's remove all related code, as the advanced mode is always used now.

Let's remove all related code, as the advanced mode is always used now.
biodranik (Migrated from github.com) commented 2023-11-03 00:52:12 +00:00

Is this function/test still needed?

Is this function/test still needed?
biodranik (Migrated from github.com) commented 2023-11-03 00:53:05 +00:00

That doesn't look like the right way to write tests after changing the functionality.

That doesn't look like the right way to write tests after changing the functionality.
map-per reviewed 2024-04-01 08:40:27 +00:00
Author
Contributor

Is there some way to keep the correct capitalisation in the translate.py tool?

"de = Der name des ortes, wie er in der landessprache geschrieben wird" is actually
"de = Der Name des Ortes, wie er in der Landessprache geschrieben wird"

Is there some way to keep the correct capitalisation in the `translate.py` tool? "de = Der name des ortes, wie er in der landessprache geschrieben wird" is actually "de = Der Name des Ortes, wie er in der Landessprache geschrieben wird"
map-per reviewed 2024-04-01 09:12:26 +00:00
Author
Contributor

I will do that later, because it would brake the ios version if I did it now

I will do that later, because it would brake the ios version if I did it now
map-per reviewed 2024-04-01 09:31:20 +00:00
Author
Contributor

No, result.mandatoryNamesCount is already 0. I removed it.

No, result.mandatoryNamesCount is already 0. I removed it.
map-per reviewed 2024-04-01 10:05:06 +00:00
Author
Contributor

Removed the variable and only kept getter and setter dummies to not break ios

Removed the variable and only kept getter and setter dummies to not break ios
biodranik (Migrated from github.com) reviewed 2024-04-01 10:40:37 +00:00
biodranik (Migrated from github.com) commented 2024-04-01 10:40:37 +00:00

Yes, that bug was already fixed in translate.py:

    en = The name of the place, as it is written in the local language
    af = Die naam van die plek, soos dit in die plaaslike taal geskryf is
    ar = اسم المكان كما هو مكتوب باللغة المحلية
    az = Yerin yerli dildə yazıldığı kimi adı
    be = Назва месца, як напісана на мясцовай мове
    bg = Името на мястото, както се изписва на местния език
    ca = El nom del lloc, tal com està escrit en la llengua local
    cs = Název místa, jak je zapsán v místním jazyce
    da = Stedets navn, som det er skrevet på det lokale sprog
    de = Der Name des Ortes, wie er in der Landessprache geschrieben wird
    el = Το όνομα του τόπου, όπως γράφεται στην τοπική γλώσσα
    es = El nombre del lugar, tal y como está escrito en la lengua local
    es-MX = El nombre del lugar, tal como está escrito en el idioma local.
    et = Koha nimi, nagu see on kirjutatud kohalikus keeles.
    eu = Lekuaren izena, bertako hizkuntzan idatzita dagoenez
    fa = نام محل همانطور که به زبان محلی نوشته شده است
    fi = Paikan nimi, kuten se kirjoitetaan paikallisella kielellä.
    fr = Le nom du lieu, tel qu'il est écrit dans la langue locale.
    he = שם המקום, כפי שהוא כתוב בשפת המקום
    hi = स्थान का नाम, जैसा कि स्थानीय भाषा में लिखा गया है
    hu = A helység neve, ahogyan azt a helyi nyelven írják
    id = Nama tempat, seperti yang ditulis dalam bahasa lokal
    it = Il nome del luogo, così come è scritto nella lingua locale
    ja = 現地の言葉で書かれた地名
    ko = 현지 언어로 작성된 장소 이름
    lt = Vietovės pavadinimas, užrašytas vietine kalba
    mr = स्थानिक भाषेत लिहिल्याप्रमाणे ठिकाणाचे नाव
    nb = Navnet på stedet, slik det skrives på det lokale språket.
    nl = De naam van de plaats, zoals die in de plaatselijke taal wordt geschreven
    pl = Nazwa miejsca zapisana w lokalnym języku
    pt = O nome do local, tal como está escrito na língua local
    pt-BR = O nome do lugar, como está escrito no idioma local
    ro = Numele locului, așa cum este scris în limba locală
    ru = Название места, как оно пишется на местном языке
    sk = Názov miesta, ako sa píše v miestnom jazyku
    sv = Platsens namn, som det är skrivet på det lokala språket
    sw = Jina la mahali, kama limeandikwa katika lugha ya ndani
    th = ชื่อสถานที่ตามที่เขียนเป็นภาษาท้องถิ่น
    tr = Yerel dilde yazıldığı şekliyle yerin adı
    uk = Назва місця, як вона пишеться місцевою мовою
    vi = Tên của địa điểm, như được viết bằng ngôn ngữ địa phương
    zh-Hans = 用当地语言书写的地名
    zh-Hant = 用當地語言書寫的地點名稱
Yes, that bug was already fixed in `translate.py`: ``` en = The name of the place, as it is written in the local language af = Die naam van die plek, soos dit in die plaaslike taal geskryf is ar = اسم المكان كما هو مكتوب باللغة المحلية az = Yerin yerli dildə yazıldığı kimi adı be = Назва месца, як напісана на мясцовай мове bg = Името на мястото, както се изписва на местния език ca = El nom del lloc, tal com està escrit en la llengua local cs = Název místa, jak je zapsán v místním jazyce da = Stedets navn, som det er skrevet på det lokale sprog de = Der Name des Ortes, wie er in der Landessprache geschrieben wird el = Το όνομα του τόπου, όπως γράφεται στην τοπική γλώσσα es = El nombre del lugar, tal y como está escrito en la lengua local es-MX = El nombre del lugar, tal como está escrito en el idioma local. et = Koha nimi, nagu see on kirjutatud kohalikus keeles. eu = Lekuaren izena, bertako hizkuntzan idatzita dagoenez fa = نام محل همانطور که به زبان محلی نوشته شده است fi = Paikan nimi, kuten se kirjoitetaan paikallisella kielellä. fr = Le nom du lieu, tel qu'il est écrit dans la langue locale. he = שם המקום, כפי שהוא כתוב בשפת המקום hi = स्थान का नाम, जैसा कि स्थानीय भाषा में लिखा गया है hu = A helység neve, ahogyan azt a helyi nyelven írják id = Nama tempat, seperti yang ditulis dalam bahasa lokal it = Il nome del luogo, così come è scritto nella lingua locale ja = 現地の言葉で書かれた地名 ko = 현지 언어로 작성된 장소 이름 lt = Vietovės pavadinimas, užrašytas vietine kalba mr = स्थानिक भाषेत लिहिल्याप्रमाणे ठिकाणाचे नाव nb = Navnet på stedet, slik det skrives på det lokale språket. nl = De naam van de plaats, zoals die in de plaatselijke taal wordt geschreven pl = Nazwa miejsca zapisana w lokalnym języku pt = O nome do local, tal como está escrito na língua local pt-BR = O nome do lugar, como está escrito no idioma local ro = Numele locului, așa cum este scris în limba locală ru = Название места, как оно пишется на местном языке sk = Názov miesta, ako sa píše v miestnom jazyku sv = Platsens namn, som det är skrivet på det lokala språket sw = Jina la mahali, kama limeandikwa katika lugha ya ndani th = ชื่อสถานที่ตามที่เขียนเป็นภาษาท้องถิ่น tr = Yerel dilde yazıldığı şekliyle yerin adı uk = Назва місця, як вона пишеться місцевою мовою vi = Tên của địa điểm, như được viết bằng ngôn ngữ địa phương zh-Hans = 用当地语言书写的地名 zh-Hant = 用當地語言書寫的地點名稱 ```
NeatNit (Migrated from github.com) reviewed 2024-04-19 08:16:47 +00:00
@ -15306,0 +15323,4 @@
fa = همانطور که به زبان محلی نوشته شده است
fi = Paikallisella kielellä kirjoitettuna
fr = Comme c'est écrit dans la langue locale
he = כפי שנכתב בשפה המקומית
NeatNit (Migrated from github.com) commented 2024-04-19 08:16:47 +00:00
    he = כפי שנכתב בשפה המקומית
```suggestion he = כפי שנכתב בשפה המקומית ```
jimcarst (Migrated from github.com) approved these changes 2024-04-19 08:33:11 +00:00
jimcarst (Migrated from github.com) left a comment

nl is OK. (Sidenote: OM displayed the 'Sacré-Cœur' in Paris in my local language and I was confused for a moment)

nl is OK. (Sidenote: OM displayed the 'Sacré-Cœur' in Paris in my local language and I was confused for a moment)
biodranik (Migrated from github.com) reviewed 2024-04-19 08:58:33 +00:00
biodranik (Migrated from github.com) left a comment

Please test both iOS and Android implementations if they work properly. The debug version still uses the dev OSM server, right?

Any screenshots/videos from Android version on how it looks now?

Please test both iOS and Android implementations if they work properly. The debug version still uses the dev OSM server, right? Any screenshots/videos from Android version on how it looks now?
@ -15306,0 +15310,4 @@
af = Soos dit in die plaaslike taal geskryf is
ar = كما هو مكتوب باللغة المحلية
az = Yerli dildə yazıldığı kimi
be = На мясцовай мове
biodranik (Migrated from github.com) commented 2024-04-19 08:35:22 +00:00

Maybe just "In the local language"?

    en = In the local language
    af = In plaaslike taal
    ar = باللغة المحلية
    az = Yerli dildə
    be = На мясцовай мове
    bg = На местния език
    ca = En llengua local
    cs = V místním jazyce
    da = På det lokale sprog
    de = In der Landessprache
    el = Στην τοπική γλώσσα
    es = En la lengua local
    et = Kohalikus keeles
    eu = Bertako hizkuntzan
    fa = به زبان محلی
    fi = Paikallisella kielellä
    fr = Dans la langue locale
    he = בשפה המקומית
    hi = स्थानीय भाषा में
    hu = A helyi nyelven
    id = Dalam bahasa setempat
    it = Nella lingua locale
    ja = 現地語で
    ko = 현지 언어로
    lt = Vietos kalba
    mr = स्थानिक भाषेत
    nb = På det lokale språket
    nl = In de plaatselijke taal
    pl = W lokalnym języku
    pt = Na língua local
    pt-BR = No idioma local
    ro = În limba locală
    ru = На местном языке
    sk = V miestnom jazyku
    sv = På det lokala språket
    sw = Kwa lugha ya kienyeji
    th = ในภาษาถิ่น
    tr = Yerel dilde
    uk = Місцевою мовою
    vi = Bằng ngôn ngữ địa phương
    zh-Hans = 当地语言
    zh-Hant = 用當地語言
Maybe just "In the local language"? ``` en = In the local language af = In plaaslike taal ar = باللغة المحلية az = Yerli dildə be = На мясцовай мове bg = На местния език ca = En llengua local cs = V místním jazyce da = På det lokale sprog de = In der Landessprache el = Στην τοπική γλώσσα es = En la lengua local et = Kohalikus keeles eu = Bertako hizkuntzan fa = به زبان محلی fi = Paikallisella kielellä fr = Dans la langue locale he = בשפה המקומית hi = स्थानीय भाषा में hu = A helyi nyelven id = Dalam bahasa setempat it = Nella lingua locale ja = 現地語で ko = 현지 언어로 lt = Vietos kalba mr = स्थानिक भाषेत nb = På det lokale språket nl = In de plaatselijke taal pl = W lokalnym języku pt = Na língua local pt-BR = No idioma local ro = În limba locală ru = На местном языке sk = V miestnom jazyku sv = På det lokala språket sw = Kwa lugha ya kienyeji th = ในภาษาถิ่น tr = Yerel dilde uk = Місцевою мовою vi = Bằng ngôn ngữ địa phương zh-Hans = 当地语言 zh-Hant = 用當地語言 ```
@ -15306,0 +15314,4 @@
bg = Както е написано на местния език
ca = Com està escrit en la llengua local
cs = Jak je napsáno v místním jazyce
da = Som det står skrevet på det lokale sprog
biodranik (Migrated from github.com) commented 2024-04-19 08:35:55 +00:00

На мясцовай мове

На мясцовай мове
@ -15306,0 +15319,4 @@
el = Όπως είναι γραμμένο στην τοπική γλώσσα
es = Como está escrito en la lengua local
et = Nagu on kirjutatud kohalikus keeles
eu = Bertako hizkuntzan idatzita dagoenez
biodranik (Migrated from github.com) commented 2024-04-19 08:34:22 +00:00

Should it be de = Wie in der Landessprache geschrieben?

Should it be ` de = Wie in der Landessprache geschrieben`?
@ -15306,0 +15342,4 @@
sv = Som det står skrivet på det lokala språket
sw = Kama ilivyoandikwa katika lugha ya kienyeji
th = ตามที่เขียนเป็นภาษาท้องถิ่น
tr = Yerel dilde yazıldığı gibi
biodranik (Migrated from github.com) commented 2024-04-19 08:36:23 +00:00

На местном языке

На местном языке
@ -15306,1 +15348,4 @@
zh-Hans = 当地语言写道
zh-Hant = 因為它是用當地語言寫的
[editor_edit_place_category_title]
biodranik (Migrated from github.com) commented 2024-04-19 08:35:41 +00:00

Місцевою мовою

Місцевою мовою
biodranik (Migrated from github.com) commented 2024-04-19 08:41:38 +00:00

Can needFakes parameter be removed?

Can needFakes parameter be removed?
biodranik (Migrated from github.com) commented 2024-04-19 08:42:05 +00:00

Please check if indentation is 2 spaces everywhere.

Please check if indentation is 2 spaces everywhere.
biodranik (Migrated from github.com) commented 2024-04-19 08:42:38 +00:00

@kirylkaveryn can you please help to remove this parameter? Or was it already removed?

@kirylkaveryn can you please help to remove this parameter? Or was it already removed?
biodranik (Migrated from github.com) commented 2024-04-19 08:44:24 +00:00

nit: use single line instead of two lines, then tests will be more readable (more lines will fit the screen).

nit: use single line instead of two lines, then tests will be more readable (more lines will fit the screen).
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
biodranik (Migrated from github.com) commented 2024-04-19 08:43:47 +00:00

Was this order lost? Why is it not important?

Was this order lost? Why is it not important?
biodranik (Migrated from github.com) commented 2024-04-19 08:57:11 +00:00

Formatting looks inconsistent here.

Formatting looks inconsistent here.
muralito (Migrated from github.com) reviewed 2024-04-19 12:09:54 +00:00
@ -15306,0 +15310,4 @@
af = Soos dit in die plaaslike taal geskryf is
ar = كما هو مكتوب باللغة المحلية
az = Yerli dildə yazıldığı kimi
be = На мясцовай мове
muralito (Migrated from github.com) commented 2024-04-19 12:09:54 +00:00

this is also a valid option in "es".

this is also a valid option in "es".
kirylkaveryn reviewed 2024-04-19 13:14:45 +00:00

I didn't remove this parameter. Why it should be removed?

I didn't remove this parameter. Why it should be removed?
biodranik (Migrated from github.com) reviewed 2024-04-19 13:16:15 +00:00
biodranik (Migrated from github.com) commented 2024-04-19 13:16:15 +00:00

Because it is not used anymore and completely removed from Android code. All related unused code should also be removed for iOS (when addFakes == true).

Because it is not used anymore and completely removed from Android code. All related unused code should also be removed for iOS (when `addFakes == true`).
map-per reviewed 2024-04-19 14:45:45 +00:00
@ -15306,0 +15319,4 @@
el = Όπως είναι γραμμένο στην τοπική γλώσσα
es = Como está escrito en la lengua local
et = Nagu on kirjutatud kohalikus keeles
eu = Bertako hizkuntzan idatzita dagoenez
Author
Contributor

I switched to "lokalen Sprache", because this is clearer for countries with different languages in different parts of the country (e.g. Belgium) (see: organicmaps/organicmaps#6257 (comment))

I switched to "lokalen Sprache", because this is clearer for countries with different languages in different parts of the country (e.g. Belgium) (see: https://git.omaps.dev/organicmaps/organicmaps/pulls/6257#issuecomment-1814157570)
map-per reviewed 2024-04-19 14:49:45 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
Author
Contributor

The functionality changed and now only 'default_name' is always shown. This simplified the code and we now need fewer tests.

The functionality changed and now only 'default_name' is always shown. This simplified the code and we now need fewer tests.
matheusgomesms (Migrated from github.com) reviewed 2024-04-19 14:54:04 +00:00
matheusgomesms (Migrated from github.com) commented 2024-04-19 14:54:03 +00:00
    pt = Como escrito na língua local

PT = PT-BR

```suggestion pt = Como escrito na língua local ``` PT = PT-BR
map-per reviewed 2024-04-19 16:40:08 +00:00
Author
Contributor

@kirylkaveryn The value of needFakes is ignored in the core, and you can also call the function with out a parameter. So you can safely remove all needFakes related code from iOS

@kirylkaveryn The value of `needFakes` is ignored in the core, and you can also call the function with out a parameter. So you can safely remove all `needFakes` related code from iOS
map-per reviewed 2024-04-19 16:46:57 +00:00
@ -15306,0 +15310,4 @@
af = Soos dit in die plaaslike taal geskryf is
ar = كما هو مكتوب باللغة المحلية
az = Yerli dildə yazıldığı kimi
be = На мясцовай мове
Author
Contributor

I still prefer "As it is written...", because it gives people the hint that they should just write down what's on the sign of the shop. But I don't have a strong opinion on this, so we can change it if you prefer "In the local language"

I still prefer "As it is written...", because it gives people the hint that they should just write down what's on the sign of the shop. But I don't have a strong opinion on this, so we can change it if you prefer "In the local language"
map-per reviewed 2024-04-19 16:48:23 +00:00
Author
Contributor

The value of needFakes is ignored in the core, and you can also call the function with out a parameter. So you can safely remove all needFakes related code from iOS

The value of `needFakes` is ignored in the core, and you can also call the function with out a parameter. So you can safely remove all `needFakes` related code from iOS
biodranik (Migrated from github.com) reviewed 2024-04-19 20:36:59 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
biodranik (Migrated from github.com) commented 2024-04-19 20:36:59 +00:00

If the country/region's languages are known, would it be more beneficial to also duplicate the default name into the tagged one, and encourage to add translations for those users who care? E.g. for Switzerland, when adding an object, I now see:

  • French
  • German
  • (should also see Italian, need to fix it)
  • English (always shown as the international language)
  • Belarussian (my system language)

The last two in this case are less important and can be hidden by default (or left as is).

If I type German, then the name can be saved as name= and name:de=, right? (If fr, it, de are all changed, then there should be the sorted hard-coded order of languages per region, and the first one should be used as a name=).

By showing only "Name in local language" we can not be 100% sure which language was used to type it, right? And are losing the opportunity to save the name under an explicitly defined language.

That is true for adding new features on the map. For editing, we have different cases:

  1. No name tag at all, and it can be edited by a user. Likely the same logic as above can be used.
  2. Only default name= is present. Only it can be displayed.
  3. A default name= and some translations are present. All of them should be displayed.

What would be more beneficial for OSM and users all over the world in the long term?

CC @Zverik

If the country/region's languages are known, would it be more beneficial to also duplicate the default name into the tagged one, and encourage to add translations for those users who care? E.g. for Switzerland, when adding an object, I now see: - French - German - (should also see Italian, need to fix it) - English (always shown as the international language) - Belarussian (my system language) The last two in this case are less important and can be hidden by default (or left as is). If I type German, then the name can be saved as name= and name:de=, right? (If fr, it, de are all changed, then there should be the sorted hard-coded order of languages per region, and the first one should be used as a name=). By showing only "Name in local language" we can not be 100% sure which language was used to type it, right? And are losing the opportunity to save the name under an explicitly defined language. That is true for adding new features on the map. For editing, we have different cases: 1. No name tag at all, and it can be edited by a user. Likely the same logic as above can be used. 2. Only default name= is present. Only it can be displayed. 3. A default name= and some translations are present. All of them should be displayed. What would be more beneficial for OSM and users all over the world in the long term? CC @Zverik
kirylkaveryn reviewed 2024-04-20 08:17:13 +00:00

@map-per Fixed!
You can pick up the fix from my last commit here: organicmaps/organicmaps#7946/commits/aee10205fe6db5f7d29ca9a9c8a8d82922f5f48c

So you can safely remove the needFakes form cpp now.

@map-per Fixed! You can pick up the fix from my last commit here: https://git.omaps.dev/organicmaps/organicmaps/pulls/7946/commits/aee10205fe6db5f7d29ca9a9c8a8d82922f5f48c So you can safely remove the `needFakes` form cpp now.
map-per reviewed 2024-04-20 13:22:44 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
Author
Contributor

The problem with displaying multilingual names too prominent ist that, at the moment, many people get confused by the two (or more) name fields and use them for short-name and long-name or invent translations where there are none (e.g. most Restaurants don't have multilingual names and adding e.g. name:en doesn't really make sense)

That's why this PR simplifies the UX to display just one name field by default.

The problem with name conversions is that it it only takes regions with only one language into account. So the idea doesn't work any more if there are two languages, like e.g. in Belgium. And keep in mind that the OM implementation of this idea never worked properly, resulting in wrong and nonsense data being uploaded to OSM.

That's why this PR removes name conversions.

So in the long term it ist most beneficial to fix the bugs of the OM editor. Then no wrong data is uploaded to OSM and users all over the world get higher quality map data.

The problem with displaying multilingual names too prominent ist that, at the moment, many people get confused by the two (or more) name fields and use them for short-name and long-name or invent translations where there are none (e.g. most Restaurants don't have multilingual names and adding e.g. name:en doesn't really make sense) That's why this PR simplifies the UX to display just one name field by default. The problem with name conversions is that it it only takes regions with only one language into account. So the idea doesn't work any more if there are two languages, like e.g. in Belgium. And keep in mind that the OM implementation of this idea never worked properly, resulting in wrong and nonsense data being uploaded to OSM. That's why this PR removes name conversions. So in the long term it ist most beneficial to fix the bugs of the OM editor. Then no wrong data is uploaded to OSM and users all over the world get higher quality map data.
biodranik (Migrated from github.com) reviewed 2024-04-20 14:55:30 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
biodranik (Migrated from github.com) commented 2024-04-20 14:55:29 +00:00

I agree that wrong data should not be uploaded to OSM. But is it the best way to fix that issue? The proposed approach is clear to every OSMer, but is it clear for inexperienced users?

One of the current issues is that users don't read that the name field says "French", or "Dutch", and write there some unrelated stuff. Will they read and understand "As in the local language"? It's even more confusing than "French" or "Dutch".

If confusion comes from many fields, what about displaying only relevant map languages then? Isn't it important to understand which language was used by a user when the name was typed? Especially in 2+ official local languages (Belgium, Switzerland, Canada, etc.)?

I agree that wrong data should not be uploaded to OSM. But is it the best way to fix that issue? The proposed approach is clear to every OSMer, but is it clear for inexperienced users? One of the current issues is that users _don't read_ that the name field says "French", or "Dutch", and write there some unrelated stuff. Will they read and understand "As in the local language"? It's even more confusing than "French" or "Dutch". If confusion comes from many fields, what about displaying only relevant map languages then? Isn't it important to understand which language was used by a user when the name was typed? Especially in 2+ official local languages (Belgium, Switzerland, Canada, etc.)?
kirylkaveryn reviewed 2024-04-21 07:07:45 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(

@map-per perhaps we could notify the user about what is "local language" is? Because in the current implementation, this may not be clear. So if I'm not a native speaker or just a tourist and cannot provide "name in local language" it would be better to skip this field? Because OM isn't for only experienced osmers, but for a wide range of users. What do you think?

@map-per perhaps we could notify the user about what is "local language" is? Because in the current implementation, this may not be clear. So if I'm not a native speaker or just a tourist and cannot provide "name in local language" it would be better to skip this field? Because OM isn't for only experienced osmers, but for a wide range of users. What do you think?
map-per reviewed 2024-04-21 14:21:15 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
Author
Contributor

One of the current issues is that users don't read that the name field says "French", or "Dutch", and write there some unrelated stuff.

I have not noticed any such errors while reviewing OM edits. Are you sure they exist?

Isn't it important to understand which language was used by a user when the name was typed?

No, that's not important in the OSM tagging scheme. That's just the way OSM is, we can't change that.

perhaps we could notify the user about what is "local language" is?

I think "As it is written in the local language" is clear enough

> One of the current issues is that users don't read that the name field says "French", or "Dutch", and write there some unrelated stuff. I have not noticed any such errors while reviewing OM edits. Are you sure they exist? > Isn't it important to understand which language was used by a user when the name was typed? No, that's not important in the OSM tagging scheme. That's just the way OSM is, we can't change that. > perhaps we could notify the user about what is "local language" is? I think "As it is written in the local language" is clear enough
biodranik (Migrated from github.com) reviewed 2024-04-21 15:21:20 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
biodranik (Migrated from github.com) commented 2024-04-21 15:21:20 +00:00

I have not noticed any such errors while reviewing OM edits. Are you sure they exist?

Didn't you explicitly mention that issue above? Or am I misunderstood you?

The problem with displaying multilingual names too prominent is that, at the moment, many people get confused by the two (or more) name fields and use them for short-name and long-name or invent translations where there are none (e.g. most Restaurants don't have multilingual names and adding e.g. name:en doesn't really make sense)

> I have not noticed any such errors while reviewing OM edits. Are you sure they exist? Didn't you explicitly mention that issue above? Or am I misunderstood you? > The problem with displaying multilingual names too prominent is that, at the moment, many people get confused by the two (or more) name fields and use them for short-name and long-name or invent translations where there are none (e.g. most Restaurants don't have multilingual names and adding e.g. name:en doesn't really make sense)
map-per reviewed 2024-04-21 16:01:22 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
Author
Contributor

Ah, OK, then that's a misunderstanding. People invent translations, but they invent them in the right language.

Ah, OK, then that's a misunderstanding. People invent translations, but they invent them in the right language.
map-per reviewed 2024-04-21 16:14:24 +00:00
@ -291,4 +282,4 @@
{
vector<int8_t> nativeMwmLanguages = {GetLangCode("de"), GetLangCode("fr")};
auto const namesDataSource = EditableMapObject::GetNamesDataSource(
Author
Contributor

Now that I think about it again, the short-name and long-name issues I saw are probably rather a result of the name conversion. So the users probably added a german name that was saved to name=* and then had second thought and changed the german name, but OM didn't change name=* but added name:de=*.

Now that I think about it again, the short-name and long-name issues I saw are probably rather a result of the name conversion. So the users probably added a german name that was saved to name=* and then had second thought and changed the german name, but OM didn't change name=* but added name:de=*.
romana-la (Migrated from github.com) reviewed 2024-04-21 18:16:47 +00:00
@ -15306,0 +15339,4 @@
ro = Așa cum este scris în limba locală
ru = На местном языке
sk = Tak, ako sa píše v miestnom jazyku
sv = Som det står skrivet på det lokala språket
romana-la (Migrated from github.com) commented 2024-04-21 18:16:47 +00:00
    sk = Tak, ako sa píše v miestnom jazyku
```suggestion sk = Tak, ako sa píše v miestnom jazyku ```
biodranik (Migrated from github.com) approved these changes 2024-04-24 21:32:12 +00:00
biodranik (Migrated from github.com) left a comment

Ok, let's test it in beta/production. Many thanks to @map-per for starting and finishing it, and for everyone else to support and improvements!

Please let me know at alex at organicmaps dot app if you want to receive regular master branch beta builds. I need to add your email to our Firebase group.

@map-per please let me know if you are interested in joining our closed Telegram/Matrix chat for active contributors.

Ok, let's test it in beta/production. Many thanks to @map-per for starting and finishing it, and for everyone else to support and improvements! Please let me know at alex at organicmaps dot app if you want to receive regular master branch beta builds. I need to add your email to our Firebase group. @map-per please let me know if you are interested in joining our closed Telegram/Matrix chat for active contributors.
biodranik (Migrated from github.com) approved these changes 2024-04-25 06:19:54 +00:00
biodranik (Migrated from github.com) left a comment

Clean history, thanks!

Clean history, thanks!
This repo is archived. You cannot comment on pull requests.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#6257
No description provided.