There are several ways to contribute to TortoiseHg translations:
- Testing translations and reporting issues at bitbucket
- Contributing translations via Launchpad [either]
- Approve uploaded .po files [only]
- Maintain translation infrastructure (upload .pot files) [this]
The general principle is that all translations are coordinated through Launchpad, issues are tracked at bitbucket, and messages use the tortoisehg-discuss mail list.
Table of Contents |
Contributing translations
Please visit our page on Launchpad
About TortoiseHg Translation Team: http://thread.gmane.org/gmane.comp.version-control.mercurial.tortoisehg.user/1813
Language specific
German: Übersetzungshilfen (guidelines from hg, also used in thg)
Testing translations on Windows
- Install TortoiseHg via the binary installer
- Download a translation in MO format from Launchpad
- Copy the .mo file to %ProgramFiles%\TortoiseHg\locale\XX\LC_MESSAGES\tortoisehg.mo where XX is the locale
- Set environment variable LANG=XX
- Launch TortoiseHg
You can also test translations from a source install on Windows:
- 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).
- Download a translation in MO format from Launchpad (or use the one you just produced yourself, if you happen to be a translator).
- Copy the .mo file to <repo></repo>\locale\XX\LC_MESSAGE\tortoisehg.mo where XX is the locale.
- Set the language:
- Set the environment variable LANG=XX.
- 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)
- 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/menuthg.py 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
- Clone tortoisehg to your machine and symlink hgtk into your path (See hgtk wiki page on main wiki)
- run python setup.py build_mo
- Download a translation in MO format from Launchpad
- Copy the .mo file to tortoisehg\locale\XX\LC_MESSAGES\tortoisehg.mo where XX is the locale
- 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.
- Generate .pot file from default branch
- Upload .pot to launchpad unstable series
- Download .po from launchpad unstable series
- Translate
- Upload changed .po to launchpad unstable series
- 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.