wiki:Translations

Translations

JOSM translation is a whole divided into three parts, one of which is seen on every startup, another by the Software, and a third by Wiki or online help users.

Wiki and Online help

A good start for you to contribute is this Wiki. It serves as Online Help for JOSM, too. Please see the details on Translations/Wiki. You can start working right now — like on every good wiki.

Some English specific notes are on the bottom of this page.

StartupPage

The translation of JOSM start messages can be changed at StartupPageSource.

This page has a special format:

  • Each line "en:" starts a new translatable line.
  • Each line with another language abbreviation translates the previous English line.
  • Each line without specifics is taken as is.
  • Lines starting with "#" are ignored.

NOTE: There aren't always empty lines between the different sets. Be careful not to mix translations or forget some! Please sort the entries in each set by the lowercase language abbreviation, but keep "en:" first.

When changing English text please keep in mind that translations also need to be adapted. If you are not able to do so, then add an "x" in front of the language abbreviation, so the translation is still available as a draft, but disabled.

The previewed or saved page shows multiple sections sorted by language. Lines marked with EN show untranslated lines. Lines marked with X have been marked as draft line. Lines marked with BASE are missing in a nationalized translation and have been overridden with the language based translation (i.e. "ca" used instead of missing "ca@valencia").

The translation of older JOSM start messages can be changed at VersionHistorySource for the current year. For each former year a separate page exists (e.g. VersionHistorySource/2016) back to 2008. The line format is the same as above.

The state of the translation over time is shown on Translations/Statistics.

Software

Translation of the program texts including plugins is done at Launchpad. A few plugins are translated at transifex instead (as of January 2018 Mapillary, geojson and scripting).

The templates at Launchpad are updated each night together with the new latest build. Translations are imported before each new release (or more often when needed).

The Java translation has some specialities which must be remembered when translating:

  • The ' sign is a special character. It must be escaped by another ', so '' means a single quote in resulting display.
  • For languages with heavy usage of this character the typographic ’ may be used instead of the escaping (looks better when translating, in the final software a user will hardly see the difference).
    • This character is U+2019 named RIGHT SINGLE QUOTATION MARK
    • Under Linux this character is available with <ALT-GR>+<SHIFT>+<N>
    • Under Windows the character is available by pressing <ALT> and typing 0146 on keypad
  • Don't use the message formating brackets {}, or when, then escape each with single quotes like '{' or '}'.

All strings have a reference to the place in source code where they appear. That can help to find proper translation. You find the sources here:

Changes made in Launchpad will be imported into JOSM for all languages which are already in JOSM. Usually the JOSM team updates the text data once or twice just before the release of a new tested version (which is usually at the end of every month, see roadmap).

New languages will be added to JOSM when there are at least 2000 translated strings. Please start with main user interface to reach best results.

A short description how to add new language support for test purposes, when 2000 strings limit is not yet reached:

  • Create the language files and store them in the plugin file (or JOSM core):
    • Language files are stored in directory "data" of JOSM and named with the lowercase language code with extension .lang.
    • These files are always a set. The English base file and the translation files must be created together or they will not work correctly.
    • The Perl script i18n.pl must be called with a destination directory and the .po files to create translation data.
  • Add the new language in init() function of I18n.java:
    • A proper code for the plural mode of the language needs to specified.
    • A description of the plural calculations can be found in the .po file downloaded from Launchpad.
    • If none of the existing modes matches the language, add new one needs to be added in the PluralMode enumeration and in pluralEval() function.
    • For some special languages it is necessary to add workaround code in LanguageInfo.java to translate between Java language code and the newer codes used on Launchpad

Language specific notes

Here are some recommendations how the terms of JOSM/OSM might be worded to keep the parts of the translation consistent with themselves.

EnglishTranslationHints
tag
tags properties
key
value
way
node
relation
member
element
membership
referrer
track In English several terms for raw GPS data tracks areused. We here talk always use GPS-Track.
tagging
tagging preset
outside of the world outside of the downloaded area
button
OSM notes
preset Presets
mappaint style Styles
advanced preferences
Last modified 4 weeks ago Last modified on 2018-04-22T21:26:42+02:00

Attachments (2)

Download all attachments as: .zip