Clone wiki

thg / developers / Translation

There are several ways to contribute to TortoiseHg translations:

  1. Testing translations and reporting issues at bitbucket
  2. Contributing translations via Launchpad [either via web or by uploading .po files]
  3. Approve uploaded .po files [only if you are unhappy with what other contribute]
  4. Maintain translation infrastructure (upload .pot files) [this is the boring part that allows everybody else to work]

The general principle is that all translations are coordinated through Launchpad, issues are tracked at bitbucket, and messages use the tortoisehg-discuss mail list.

Contributing translations

Please visit our page on Launchpad

About TortoiseHg Translation Team:

Language specific

German: √úbersetzungshilfen (guidelines from hg, also used in thg)

Testing translations on Windows

  1. Install TortoiseHg via the binary installer
  2. Download a translation in MO format from Launchpad
  3. Copy the .mo file to %ProgramFiles%\TortoiseHg\locale\XX\LC_MESSAGES\ where XX is the locale
  4. Set environment variable LANG=XX
  5. Launch TortoiseHg

You can also test translations from a source install on Windows:

  1. Create the folder structure locale\XX\LC_MESSAGE\ in the repo root of your source install (as a sibling to the tortoisehg folder that is).
  2. Download a translation in MO format from Launchpad (or use the one you just produced yourself, if you happen to be a translator).
  3. Copy the .mo file to <repo root>\locale\XX\LC_MESSAGE\ where XX is the locale.
  4. Set the language:
    1. Set the environment variable LANG=XX.
    2. An alternative to setting the language as an environment variable, is to set it in your startup script for running TortoiseHg from source. Simply add or uncomment line "set LANG=XX" in that script, and you're done. (see here for an example thg.cmd startup script)
  5. Launch TortoiseHg from source.

Translating Explorer Context Menu

Context menu items are translated using the same process as the rest of the source code. The strings in tortoisehg/util/ are translated on launchpad. As part of the installer building process, the translations for those strings is extracted into registry files which are then included in the installer.

Testing translations on Unix

  1. Clone tortoisehg to your machine and symlink hgtk into your path (See hgtk wiki page on main wiki)
  2. run python build_mo
  3. Download a translation in MO format from Launchpad
  4. Copy the .mo file to tortoisehg\locale\XX\LC_MESSAGES\ where XX is the locale
  5. Set environment variable LANG=XX

try hgtk user or some other commands.

Contributing translations on the unstable branch

Note that this is only for advanced translators as it require more steps and your translations may be discarded before released.

  1. Generate .pot file from default branch
  2. Upload .pot to launchpad unstable series
  3. Download .po from launchpad unstable series
  4. Translate
  5. Upload changed .po to launchpad unstable series
  6. Commit .po to default branch

You may want to skip steps as appropriate. In particular, it is possible to work without using launchpad. In this case it is your responsibility that your .po file is uploaded to launchpad before the next release of TortoiseHg.

Getting the latest .po files

You can export .po files manually or use the daily bzr export.

% bzr branch lp:~tortoisehg-i18n/tortoisehg/stable-po