wiki:Zh_CN:Translations

translation incomplete

翻译

JOSM的翻译包含三个部分,一个是每次启动都会看到的初始界面,另一个是软件,还有一个是 Wiki.

Table of Contents

  1. Wiki
  2. 初始界面
  3. 软件

Wiki

你现在可以开始翻译这个 Wiki 了,这是一个好的开始. 本 Wiki 也可以作为 JOSM 的在线帮助.
觉得翻译太差/不完整?等着别人翻译不如自己动手,赶快划到最下面点击编辑此界面吧!

了解更多:
Translations/Wiki
词汇表

初始界面

JOSM start messages 的译文可以在 StartupPageSource 编辑。

这个页面有特殊的格式:

  • 每一行具有 "en:" 将意味着新的可翻译的一行的开始。
  • 每一行具有另外的 language abbreviation 将翻译上一行英文。
  • 没有具体说明的每一行均按原样采用。
  • 以“#”开头的行将被忽略。

注意: 不同集合之间并不总是有空行。小心不要混淆翻译或忘记一些翻译!请按小写的语言缩写对每组中的条目进行排序,但请保留"en:"在最前面。

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/2021) back to 2008. The line format is the same as above.

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

软件

包括插件在内的程序文本的翻译是在 Launchpad。一些插件的翻译反而位于 Transifex(截至 2018 年 1 月 Mapillary、geojson 和脚本)。有关使用什么平台的计划,请参阅#8645

Launchpad 上的模板每天晚上都会与新的最新版本一起更新。在每个新版本之前导入翻译(或者在需要时更频繁地导入)。

Java 翻译有一些特点,翻译时必须记住:

  • 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 formatting brackets {}, or when, then escape each with single quotes like '{' or '}'.

所有字符串都有对其在源代码中出现位置的引用。这可以帮助找到合适的翻译。您可以在这里找到来源:

对于 JOSM 中已有的所有语言,在 Launchpad 中所做的更改将导入到 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).

如果你想添加新的语言,那么你至少需要翻译2000条字符串(从主界面开始效果更佳).

对于如何在尚未达到添加新的语言支持限制的2000个字符串前即进行测试的简单介绍:

  • 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
Last modified 14 months ago Last modified on 2023-09-27T04:27:50+02:00
Note: See TracWiki for help on using the wiki.