#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)
Change History (5)
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | preset error.png added |
---|
comment:2 by , 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 , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
You use "pl:text". Read again - it must be "pl.text". See also lots of example managed in wiki.
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.