#23627 closed enhancement (fixed)
Show map features with localized names also for chinese language
Reported by: | Lepus | Owned by: | Lepus |
---|---|---|---|
Priority: | normal | Milestone: | 24.04 |
Component: | Core | Version: | latest |
Keywords: | map render language | Cc: |
Description
Displaying localized names on the map will make localization checking much easier and make it easier to edit areas in non-native languages.
Attachments (0)
Change History (17)
comment:1 by , 7 months ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 7 months ago
This means displaying localized names on the map, not just in the window box. Also, it would be better if you could choose a localized language code, because some languages have more than one language code, such as zh
, zh-Hant
, zh-Hant-HK
are all available language codes.
comment:3 by , 7 months ago
As said: The map DOES show your local language first and afterwards default names. Simply change your interface language and you will get other texts when available.
If you don't provide exact use case and the information I requested I'll close this ticket as wontfix.
comment:4 by , 7 months ago
I know why. There are only two Chinese interface languages: zh_CN
and zh_TW
. However, name:zh_TW
and name:zh_CN
are not legal tags. What is actually used is name:zh-Hans
or name:zh-Hans-CN
for zh_CN
, name:zh-Hant
or name:zh-Hant-TW
for zh_TW
. This results in Chinese names not being displayed as expected.
comment:5 by , 7 months ago
Please explain the different values to me. What's zh-Hans and zh-Hans-CN. Should they both be displayed? In which order when both exist? I also assume that all 4 should be displayed?
Like (first is highest, last lowest priority)
zh_CN: name:zh-Hans, name:zh-Hans-CN, name:zh-Hant, name:zh-Hant-TW
zh_TW: name:zh-Hant, name:zh-Hant-TW, name:zh-Hans, name:zh-Hans-CN
comment:6 by , 7 months ago
zh-Hans
and zh-Hant
are simplified and traditional variants of no specific region. Language codes with region include zh-Hans-CN
and zh-Hans-SG
for simplified Chinese, zh-Hant-TW
, zh-Hant-HK
and zh-Hant-CN
for traditional Chinese.
Since there are no regional differences in most cases, language codes without regions are more often used, and codes with regions are only used when there are regional differences.
So the priority (first is highest, last lowest) can be
zh_CN: name:zh-Hans-CN
,name:zh-Hans
,name:zh
zh_TW: name:zh-Hant-TW
,name:zh-Hant
,name:zh
follow-up: 12 comment:7 by , 7 months ago
I started implementing this. Note that the order is "name:zh-Hans-CN,name:zh-Hans,name:zh,name". I thought it would be better to add the other one before name "name:zh-Hans-CN,name:zh-Hans,name:zh,name:zh-Hant-TW,name:zh-Hant,name". You don't think so?
comment:9 by , 7 months ago
Milestone: | → 24.04 |
---|
comment:11 by , 7 months ago
Summary: | Add option to show map features with localized names → Show map features with localized names also for chinese language |
---|
comment:12 by , 7 months ago
Replying to stoecker:
I started implementing this. Note that the order is "name:zh-Hans-CN,name:zh-Hans,name:zh,name". I thought it would be better to add the other one before name "name:zh-Hans-CN,name:zh-Hans,name:zh,name:zh-Hant-TW,name:zh-Hant,name". You don't think so?
Since there are several region codes but they are rarely used, it is unlikely that name:zh-Hans-CN
and zh-Hant-TW
appear alone.
It may be useful to add the following three language codes in Korea and Vietnam.
zh_CN: "name:zh-Hans-CN,name:zh-Hans,name:zh,name:zh-Hant,name:lzh,name:ko-Hani,name:vi-Hani,name"
zh_TW: "name:zh-Hant-TW,name:zh-Hant,name:zh,name:lzh,name:ko-Hani,name:zh-Hans,name:vi-Hani,name"
If regional variants are also added, it will be
zh_CN: "name:zh-Hans-CN,name:zh-Hans,name:zh,name:zh-Hant,name:zh-Hant-HK,name:zh-Hant-TW,name:lzh,name:ko-Hani,name:vi-Hani,name"
zh_TW: "name:zh-Hant-TW,name:zh-Hant,name:zh-Hant-HK,name:zh,name:lzh,name:ko-Hani,name:zh-Hans,name:zh-Hans-CN,name:vi-Hani,name"
comment:13 by , 7 months ago
Resolution: | → fixed |
---|---|
Status: | needinfo → closed |
I think that's too much. I'll leave it as is for now. Please open a new ticket after some testing when you still think it needs adapting.
P.S. For personal changes you can manually adapt mappaint.nameOrder variable in expert settings.
comment:14 by , 7 months ago
I forgot to mention one thing, does this not affect the name in the window? Currently only name:zh
is displayed, which may also require adaptation.
comment:15 by , 7 months ago
Please when referring to anything provide an example, how it looks and what you would expect. I'm not active in Chinese area and typically can't distinguish the writing, because for me these are only fancy lines and not more (like all the other scripts around the world except for Latin and Cyrillic :-). Best give a small area and exactly describe expectations and current state.
comment:16 by , 7 months ago
I have set the above name code in mappaint.nameOrder
and it works on the map. But in the tag window, selection window, relation window, and relation edit window, all the feature names shown have nothing to do with the values I set. As long as I set the JOSM language to one of the two Chinese, only name:zh
is displayed in these windows, and I expect they can also use name fields mentioned above such as name:zh-Hant
. Will the changes you've made affect this?
Thanks for your report, however your ticket is incomplete and therefore not helpful in its current form.
Please add all needed information according to this list:
To ensure that all technical relevant information is contained, create new tickets by clicking in JOSMs Main Menu on Help → Report Bug.
Remember: This is a generic notice so we don't need to write the same stuff again and again. It may only apply in parts to the specific case!
Describe an exact use case and your settings. JOSM display localized names for many many years now.