GRASS messages translation: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 43: Line 43:
=== Files to be edited (downloaded) ===
=== Files to be edited (downloaded) ===
In GRASS GIS 6, we have 5 types of .po files per language (see in the source code the directory locale/po/ or see [http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/locale/po/ here for direct download]):
In GRASS GIS 6, we have 5 types of .po files per language (see in the source code the directory locale/po/ or see [http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/locale/po/ here for direct download]):
GRASS GIS 6의 경우, 각언어당 5가지의 .po파일을 가졌다. (소스 코드의 locale/po/ 디렉퇼를 참조하거나  [http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/locale/po/ here for direct download]부분을 보십시오.):


* <tt>grasslibs_LANG.po</tt>: messages from libraries
* <tt>grasslibs_LANG.po</tt>: messages from libraries 라이버리의 메시지.
* <tt>grassmods_LANG.po</tt>: messages from commands ("modules")
* <tt>grassmods_LANG.po</tt>: messages from commands ("modules") ("모듈") 명령어 집합에서.
* <tt>grassnviz_LANG.po</tt>: messages from NVIZ Tcl/Tk graphical user interface (GRASS 6)
* <tt>grassnviz_LANG.po</tt>: messages from NVIZ Tcl/Tk graphical user interface (GRASS 6) NVIZ Tcl/Tk 그리기 사용자 접속 부분
* <tt>grasstcl_LANG.po</tt>: messages from Tcl/Tk graphical user interface (GRASS 6)
* <tt>grasstcl_LANG.po</tt>: messages from Tcl/Tk graphical user interface (GRASS 6) Tcl/Tk 그리기 사용자 접속 부분
* <tt>grasswxpy_LANG.po</tt>: messages from wxgrass/wxPython graphical user interface
* <tt>grasswxpy_LANG.po</tt>: messages from wxgrass/wxPython graphical user interface wgxgrass/wxPython 그리고 사용자 접속 부분.


where "LANG" in the above file names is a two character code which indicates the language. It is based on the Alpha-2 code of [http://www.loc.gov/standards/iso639-2/php/English_list.php ISO 639-1] (right column). Example: <tt>grasswxpy_pl.po</tt> for Polish.
where "LANG" in the above file names is a two character code which indicates the language. It is based on the Alpha-2 code of [http://www.loc.gov/standards/iso639-2/php/English_list.php ISO 639-1] (right column). Example: <tt>grasswxpy_pl.po</tt> for Polish.
위에서 "LANG"부분은 해당 언어를 의미하는 두자의 글자 코드이다. 이 코드는 [http://www.loc.gov/standards/iso639-2/php/English_list.php ISO 639-1]의 알파-2코드에 기인한다. (우측 횡). 예시:


=== Continuing an existing translation ===
=== Continuing an existing translation ===

Revision as of 15:03, 13 May 2013

Help page translations

GRASS messages translation project

Many users prefer to use software in their mother tongue which is mostly not English. This requires that all GRASS software messages have to be translated to languages other than English. The GRASS Development Team is seeking translators. Please subscribe to the dedicated mailing list at

    GRASS translations mailing list
    http://lists.osgeo.org/mailman/listinfo/grass-translations

Translation related issues may be discussed there. This is an opportunity for non-programmers to contribute as messages can be easily translated. No programming skills required!

Wanted languages

Simple Chinese, Swahili, Hindi, Greek, Tamil, Russian, Telugu, Português, ... Please join us!

다수의 사용자들은 영어가 아닌 각자의 모국어로 작성된 소프트웨어를 사용하기를 원한다. 이러한 연유로 그라스 소프트웨어의 모든 메시지를 영어가 아닌 다른 많은 언어로 번역할 필요가 있다. 그라스 개발자 팀은 번역할 분들을 찾고 있으니 다음 메일링 목록에 등록하기를 바랍니다.

     GRASS translations mailing list
    http://lists.osgeo.org/mailman/listinfo/grass-translations

번연 관계 쟁점이 위에서 다루어 질 것입니다. 메시지는 쉽게 번역될 수 있기에 프로그램 전문가가 아니어도 기여할 수 있습니다. 프로그램 기술은 필요하지 않습니다.

  • team에 참여하십시오.

번역 대상 언어

간단 중국어, 스왈리어, 힌디어, 그리스, 타밀, 러시아, 텔루구, 프루투칼, ... 성원바랍니다!

How to change the language

How to create new translations

Files to be edited (downloaded)

In GRASS GIS 6, we have 5 types of .po files per language (see in the source code the directory locale/po/ or see here for direct download): GRASS GIS 6의 경우, 각언어당 5가지의 .po파일을 가졌다. (소스 코드의 locale/po/ 디렉퇼를 참조하거나 here for direct download부분을 보십시오.):

  • grasslibs_LANG.po: messages from libraries 라이버리의 메시지.
  • grassmods_LANG.po: messages from commands ("modules") ("모듈") 명령어 집합에서.
  • grassnviz_LANG.po: messages from NVIZ Tcl/Tk graphical user interface (GRASS 6) NVIZ Tcl/Tk 그리기 사용자 접속 부분
  • grasstcl_LANG.po: messages from Tcl/Tk graphical user interface (GRASS 6) Tcl/Tk 그리기 사용자 접속 부분
  • grasswxpy_LANG.po: messages from wxgrass/wxPython graphical user interface wgxgrass/wxPython 그리고 사용자 접속 부분.

where "LANG" in the above file names is a two character code which indicates the language. It is based on the Alpha-2 code of ISO 639-1 (right column). Example: grasswxpy_pl.po for Polish. 위에서 "LANG"부분은 해당 언어를 의미하는 두자의 글자 코드이다. 이 코드는 ISO 639-1의 알파-2코드에 기인한다. (우측 횡). 예시:

Continuing an existing translation

The file(s) are there but partially outdated? Read on.

First announce on the GRASS translations mailing list that you plan to continue the translation of a certain language. Why? Because sometimes people silently translate already and we need these efforts to be coordinated to avoid doing it twice...

Then get these four .po files for your language and start. If a file is missing, just ask on the list to get it generated or see next section. To get these .po files (the files are in the directory locale/po/):

Then edit the files with a .po file editor (poEDIT or kbabel or..., see below). Take care to maintain layout and special characters. And submit often - if you wait for weeks, the messages may already be outdated and your time wasted. Just keep in touch on the GRASS translations mailing list!

Starting a new translation

The language you want isn't yet there? Read on.

Briefly, the steps to create new messages files are (if you find this too complicated, ask on the GRASS translations mailing list to get these files done for you!):

  1. Get the latest source code development version from either the SVN repository or as SVN snapshot (see Download).
  2. run: './configure --with-nls [... other parameters]' to configure the GRASS source code
  3. run: 'cd locale' to change into the translation directory
  4. run: 'make pot' to create grass*.pot template files (to extract original messages)
  5. run: copy these file from templates/ into po/; rename them to contain the two characters language code (see Alpha-2 code of ISO 639-1) and to .po extension; update the file headers either manually or with your .po editing software
 (Example: Polish language):
	        mv ./templates/grasslibs.pot ./po/grasslibs_pl.po
	        mv ./templates/grassmods.pot ./po/grassmods_pl.po
	        mv ./templates/grassnviz.pot ./po/grassnviz_pl.po
	        mv ./templates/grasstcl.pot ./po/grasstcl_pl.po
	        mv ./templates/grasswxpy.pot ./po/grasswxpy_pl.po

Now translate the messages in these po/*.po files (using poEDIT or other editor, see below)

From time to time messages need to be updated from the originals. This is usually done by the GRASS translation manager.

Software to translate: .po file editors


How to use Transifex to translate messages online in a browser:

  • (currently offline due to 2011 transifex website transition. please contact the translations mailing list (or Markus N) if you'd like to help with that)
Register and sign in
Register and sign in
Click to edit online
Click to edit online

Testing different languages

Testing different languages requires that the respective language environment and, if needed, fonts are installed. Check what languages are currently installed on your system with:

 locale -a

To change to a certain language environment (locale), do the following steps (here, example for Unix style environment):

  1. Define/check language settings:
    echo $LANG
    echo $LANGUAGE
    echo $LC_MESSAGES
 
  2. Change it (example for to Japanese):
   a) bash shell:
        export LANG=ja_JP.UTF-8
        export LANGUAGE=ja_JP.UTF-8
        export LC_MESSAGES=ja_JP.UTF-8
 
 
   b) (t)csh shell:
        setenv LANG ja_JP.UTF-8
        setenv LANGUAGE ja_JP.UTF-8
        setenv LC_MESSAGES ja_JP.UTF-8

Now launch GRASS in this terminal. If you launch it from an icon, you have to change the LOCALE in the computer setup program instead.

Other common languages useful for testing are de_DE for German, fr_FR for French, or "C" for none (effectively en_US, which for GRASS is the base language).

Creating startup scripts for different languages

GRASS in English language, save as "grass64eng" (executable flag set, store in path):

     #!/bin/sh
     export LANG=en_US
     export LANGUAGE=en_US
     export LC_MESSAGES=en_US
     exec grass64 "$@"

GRASS in Japanese language, save as "grass64ja" (executable flag set, store in path):

     #!/bin/sh
     export LANG=ja_JA.UTF-8
     export LANGUAGE=ja_JA.UTF-8
     export LC_MESSAGES=ja_JA.UTF-8
     grass64 "$@"

Coordination among translators

If several translators work on the same language files, obviously some coordination is needed. Please announce work via the "translations" mailing list at http://lists.osgeo.org/mailman/listinfo/grass-translations

Also the translation manager is listening there to the upload the changed files into the GRASS source code repository.

Best practices

Installation of language packages

Example: Chinese

  • Mandriva: urpmi locales-zh kde-l10n-zh_CN fonts-ttf-default-zh_CN

See also