#9105 closed defect (fixed)
some color keywords are not translated in Preferences -> Colors (e.g. piste.*)
Reported by: | aceman | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 13.11 |
Component: | Internal mappaint style | Version: | latest |
Keywords: | i18n | Cc: |
Description
Most of the color names in Preferences -> Display settings -> Colors are translatable. But there are some special color names that are not. See e.g. piste.*, highway.*, aeroway.*, amenity.*, light.water or emergency.access.point . These are nowhere to be found in the strings to be translated. There are only versions with dot (.) replaced with (underscore). E.g. light_water. Something seems to be wrong here and these strings are differing in the display and the backend.
Attachments (0)
Change History (9)
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 12 years ago
I don't think I use any external styles (only some addons). The line is displayed as "Paint style standard: piste.easy |<colorcode>|" .
comment:3 by , 12 years ago
Keywords: | i18n added |
---|---|
Owner: | changed from | to
Status: | needinfo → new |
They are from the internal style:
It might to do something with ColorProperty.getColorKey.
I tried
-
src/org/openstreetmap/josm/data/preferences/ColorProperty.java
40 40 * @return The color key for this property 41 41 */ 42 42 public static String getColorKey(String colName) { 43 return colName == null ? null : colName.toLowerCase().replaceAll("[^a-z0-9 ]+",".");43 return colName == null ? null : colName.toLowerCase().replaceAll("[^a-z0-9_]+","."); 44 44 } 45 45 46 46 @Override
and it seemed to fix it - names in Color preferences were translated.
However, I haven't looked in depth, and I suspect such change will have consequences.
comment:4 by , 12 years ago
In [o29954] I fixed the i18n extraction to match the color code restrictions.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 12 years ago
Thanks, so will you summarize here whether the dot form or the underscore form will be valid for translation?
comment:7 by , 12 years ago
The variant with dot will be correct, but translator should translate it into human readable format, neither using dot, nor underscore.
comment:8 by , 11 years ago
Milestone: | → 13.11 (6383) |
---|
I assume these are from external styles. Can you confirm?