• R/O
  • SSH
  • HTTPS

tortoisesvn:


File Info

Rev. 10753
Größe 6,031 Bytes
Zeit 2007-09-27 19:08:04
Autor dongsheng.song
Log Message

* Languages/Tortoise_zh_CN.po

Add format commands.

* Languages/translations.txt

Remove '-sort-by-file' from format commands.

Content

Translations
------------

TortoiseSVN is still in development so translations of all resources is
also a work 'in progress'.

General
-------
The TortoiseSVN project uses gettext PO (portable object) files for its
translation. PO files are plain text, so you can even translate using a
normal text editor. The only thing you have to take care of is that the
editor can handle the UTF-8 charset. There is a wide range of tools out
there that can handle and manipulate PO files.
We recommend that you use poEdit (http://poedit.sourceforge.net) on Windows
or kbabel (http://i18n.kde.org/tools/kbabel/) on Linux.

This description assumes that you use poEdit.

Getting started
---------------
If you want to implement a new language for TortoiseSVN do the following.

1) Use TortoiseSVN (or any other SubVersion client) to check out:
   http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/Languages/
   (You will get more than one file)
   or point your browser to:
   http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/Languages/
   right-click on Tortoise.pot and save this file to your local harddisk.
   Tortoise.pot is the portable object template (hence .pot) for the
   translation.

2) Rename Tortoise.pot to Tortoise_xx.po, where xx is your two letter
   ISO-639-1 language code. Look up your language code here:
   http://www.loc.gov/standards/iso639-2/langcodes.html
   If you want to translate into a language that has two different locales
   and you *really* need the second locale, add the two letter ISO-3166
   locale code. If you're not sure about your country code, look here:
   http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html.
   Please keep in mind that we would like to have as few translations as
   possible that cover as many languages as possible. We would not be
   very happy at having to maintain a (de_CH) Swiss German, (de_AT)
   Austrian German and (de_DE) German German translation. :-)
   But if it's necessary like in Chinese, sure go ahead. We are happy with
   simplified (zh_CN) and traditional (zh_TW) Chinese.

3) Now translate what you can using poEdit. If you are not sure with one
   or the other translation, mark it as "fuzzy". You can enter a comment
   in poEdit to give some information about your thoughts to other trans-
   lators.
   If you are not sure about the meaning of the original sentence ask on
   the list.

4) Add a header with '#' comments to the PO file using a normal text edi-
   tor that explains which language you translated and the terminology
   you used, like:
   #
   # German translations for TortoiseSVN
   # This file is distributed under the same license as the subversion package.
   #
   # Translation dictionary:
   #
   # argument     parameter
   # bogus        ungültig
   # checkout     auschecken (denglisch, ich weiß, aber akzeptabel)
   # client       Client, des Client
   # commit       übertragen
   # item         Objekt
   # label        Marke / Markierung

5) Make sure your file is saved in UTF-8 encoding and that it does *not*
   begin with UTF-8 BOMs (Byte Order Marks)

6) Send your Tortoise_xx.po to the mailing list (patches@tortoisesvn.tigris.org).
   or, if you have a Tigris ID (http://www.tigris.org/servlets/Join) and
   request a role in the project
   (http://tortoisesvn.tigris.org/servlets/ProjectMembershipRequest),
   and is granted the role by the project admins, you may commit your
   translations directory to the TortoiseSVN repository.

Adding to an existing translation
---------------------------------
1) Get hold of Tortoise.pot and the Tortoise_xx.po you want to improve

2) Start poEdit with Tortoise_xx.po and select "Update from .pot file"
   from the "Catalog" Menu

3) Select Tortoise.pot and wait until poEdit has finished merging the
   template and the current translation.

4) The untranslated strings (and fuzzy translations) are always at the
   top of the list.

5) Translate what you can and send the resulting PO file back to the
   mailing list (patches@tortoisesvn.tigris.org).

Format your translation
--------------------------
Please format your translation before send Tortoise_xx.po to the
mailing list, or commit to the TortoiseSVN repository. You can do it
like this:
    $ msgmerge --no-wrap -o Tortoise_xx.po.new Tortoise_xx.po Tortoise.pot
    $ mv -f Tortoise_xx.po.new Tortoise_xx.po

This can minimize the svn diff output, review your translation is easy.

What now?
---------
That's all you have to do. We'll take care of creating the resource dlls
and installers for the different language packs.

Building your own dlls
----------------------
If you want to test the translations you made yourself, before you release
them, you need four things:

- The "raw" resource dlls for your version of TortoiseSVN. Other dlls
  won't work. Take a look at:
  http://tortoisesvn.tigris.org/servlets/ProjectDocumentList?folderID=1847
  and pick your language dlls e.g. Languages_1.0.8.zip for TortoiseSVN 1.0.8.
- The pot file for your version of TortoiseSVN e.g:
  http://tortoisesvn.tigris.org/svn/tortoisesvn/tags/version_1.0.8/...
- Any po file for your language. Either pick one from tags or the latest
  po file from trunk
- The ResText utility that is used to insert the data from the po file
  into your resource dlls:
  http://tortoisesvn.tigris.org/files/documents/406/14560/ResText.zip

Once you finished your installation, you run:

restext apply TortoiseProcLang.dll ..\bin\TortoiseProcNNNN.dll Tortoise_CC.po
restext apply TortoiseMergeLang.dll ..\bin\TortoiseMergeNNNN.dll Tortoise_CC.po

where NNNN is your four digit country code (1031 for germany)
and CC is your 2 letter country code (de for germany)

You can find the four digit country code at
http://www.microsoft.com/globaldev/reference/lcid-all.mspx
under the column LCID dec.

After successfully creating your dlls, copy them into:
C:\Program Files\TortoiseSVN\Languages
Now you should be able to select your language from the combobox on the
TortoiseSVN main setting page.
Show on old repository browser