Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8094 closed defect (worksforme)

Preset with translation

Reported by: kendzi Owned by: team
Priority: normal Milestone:
Component: External preset Version:
Keywords: preset translation Cc:

Description

How to add translation for preset elements label and text?

Attachments (1)

preset error.png (28.4 KB ) - added by kendzi 13 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by stoecker, 13 years ago

The file trunk/data/defaultpresets.xml has following note:

The fields "name", "text", "display_values" may also be localized (e.g. de.name).
When translations of equal words but different meanings may conflict, a translation
context should be specified. Use "name_context", "text_context" or "values_context"
for this. The context should be a meaningful short description to help translators.

In JOSM internally all "name", "text" and "display_values" are translated when
no specific translation has been given in XML file. When no "display_values"
are supplied, then "values" will be treated as "display_values" and translated instead.

by kendzi, 13 years ago

Attachment: preset error.png added

comment:2 by kendzi, 13 years ago

Thanks but I have already read this description. I try to use attribute "pl.text" but this cause exception when preset is loaded. Look to image. I know that values are auto-magically translated using JOSM translations blobs. But I would like to provide my own translation only for limited set of languages and I want to store this translations in my preset. How I can do it?

comment:3 by stoecker, 13 years ago

Resolution: worksforme
Status: newclosed

You use "pl:text". Read again - it must be "pl.text". See also lots of example managed in wiki.

comment:4 by kendzi, 13 years ago

My mistake. Now is working. Thanks for help.

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.