Modify

Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#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 stoecker, 11 years ago

Owner: changed from team to aceman
Status: newneedinfo

I assume these are from external styles. Can you confirm?

comment:2 by aceman, 11 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 AlfonZ, 11 years ago

Keywords: i18n added
Owner: changed from aceman to team
Status: needinfonew

They are from the internal style:

It might to do something with ColorProperty.getColorKey.
I tried

  • src/org/openstreetmap/josm/data/preferences/ColorProperty.java

     
    4040     * @return The color key for this property
    4141     */
    4242    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_]+",".");
    4444    }
    4545
    4646    @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 stoecker, 11 years ago

In [o29954] I fixed the i18n extraction to match the color code restrictions.

comment:5 by stoecker, 11 years ago

Resolution: fixed
Status: newclosed

comment:6 by aceman, 11 years ago

Thanks, so will you summarize here whether the dot form or the underscore form will be valid for translation?

comment:7 by stoecker, 11 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 Don-vip, 10 years ago

Milestone: 13.11 (6383)

comment:9 by stoecker, 7 years ago

Milestone: 13.11 (6383)13.11

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.