| 55 | | A short description how to add new language support for test purposes, when 2000 strings limit is not yet reached: |
| 56 | | * Create the language files and store them in the plugin file (or JOSM core): |
| 57 | | * Language files are stored in directory "data" of JOSM and named with the lowercase language code with extension '''.lang'''. |
| 58 | | * These files are always a set. The English base file and the translation files must be created together or they will not work correctly. |
| 59 | | * The Perl script [osm:source:applications/editors/josm/i18n/i18n.pl i18n.pl] must be called with a destination directory and the '''.po''' files to create translation data. |
| 60 | | * Add the new language in init() function of [source:trunk/src/org/openstreetmap/josm/tools/I18n.java I18n.java]: |
| 61 | | * A proper code for the plural mode of the language needs to specified. |
| 62 | | * A description of the plural calculations can be found in the '''.po''' file downloaded from Launchpad. |
| 63 | | * If none of the existing modes matches the language, add new one needs to be added in the PluralMode enumeration and in pluralEval() function. |
| 64 | | * For some special languages it is necessary to add workaround code in [source:trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java LanguageInfo.java] to translate between Java language code and the newer codes used on Launchpad |
| | 55 | Как добавить поддержку нового языка для тестирования, если переведено менее 2000 строк: |
| | 56 | * Создайте языковые файлы и запишите их в каталог модуля (или ядра JOSM) |
| | 57 | * Языковые файлы хранятся в каталоге "JOSM\data" и имеют код языка в нижнем регистре в качестве имени и расширение '''.lang'''. |
| | 58 | * Эти файлы всегда компилируются вместе — основной файл английского языка и файл с переводом, иначе правильно работать не будет. |
| | 59 | * Чтобы создать такой набор нужно вызвать Perl-скрипт [osm:source:applications/editors/josm/i18n/i18n.pl i18n.pl] с каталогом результата и '''.po''' файлами в параметрах. |
| 66 | | Current JOSM translation status active in the software (only JOSM core, no plugins) is shown in following table. |
| | 61 | * Добавьте новый язык в init() функцию в [source:trunk/src/org/openstreetmap/josm/tools/I18n.java I18n.java]: |
| | 62 | * Нужно указать правильный код режима множественного числа. |
| | 63 | * Описание формулы для расчёта формы множественного числа можно посмотреть в файле '''.po''', скачанного с Launchpad. |
| | 64 | * Если ни один из существующих режимов множественного числа не подходит, необходимо добавить новый в нумератор PluralMode и в функцию pluralEval(). |
| | 65 | * Для некоторых языков необходимо добавить "workaround code" в [source:trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java LanguageInfo.java] для перевода между кодом языка Java и новыми кодами языков, используемыми Launchpad. |
| | 66 | |
| | 67 | Текущий статус перевода интерфейса (только ядро JOSM, без модулей) показан в следующей таблице: |
| 94 | | * It is possible to access image from English base page (or any other page) also in translated page by using the page in the link: [[Image(wiki:Styles:Mappaint_deprecated.png)]] |
| 95 | | * It is nice if screenshots are offered in the native language althought the English version is also accepted and less work. |
| 96 | | * Links inside the texts should go to translated pages or to English page when not yet translated (marked with (En) or something alike) |
| 97 | | * Pages should be consistent, so when adding new stuff, update the English base page also (except for language specific things) |
| | 95 | * Можно получить доступ к изображениям с английской базовой страницы (или любой другой) с помощью ссылки: [[Image(wiki:Styles:Mappaint_deprecated.png)]] (пример) |
| | 96 | * Хотя лучше делать скриншоты на родном языке, но на английском также допустимы и их монтирование занимает меньше времени |
| | 97 | * Ссылки в текстах должны вести на переведённые страницы (или на оригинал, если перевода ещё нет) |
| | 98 | * Страницы должны быть согласованы, так что при добавлении нового материала, обновите базовую английскую страницу (если это не касается только определённого языка) |