Difference between revisions of "Hugin translation guide"
m (→The following times: Typo)
(→Getting Started on translations: typo and better description)
|Line 5:||Line 5:|
== Getting Started on translations ==
== Getting Started on translations ==
*1. Get your
*1. Get your file
:Each language a *.po file containing all the translated strings. use the [http://www.loc.gov/standards/iso639-2/php/code_list.php ISO 639-1] naming convention.
:In general, you need the latest *.po
:In general, you need the latest *.po the one for the language you want to modify. You can download the [http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/file/default/src/translations Mercurial repository]to your po fileand then the link "raw" the to file .)
If there is no file for your language you can the hugin.pot .
*2. Edit your *.po file
*2. Edit your *.po file
Revision as of 17:40, 29 November 2010
- 1 Introduction
- 2 Getting Started on translations
- 3 Use your new translation file
- 4 Become a Power Translator
- 5 Translation guide for specific terms
- 6 Technical translation issues
- 7 Tips and Tricks
- 8 Developer info
This page intends to provide guidance to translators of the Hugin project. Some terminology is very specific or used in a specific way in hugin, making it hard to find a close translation that fits the context of hugin in another language than English.
Getting Started on translations
- 1. Get your language file
- Each language version of hugin uses a different *.po file (just like "fr.po" for French or "ja.po" for Japanese) containing all the translated strings. The country codes use the ISO 639-1 naming convention.
- In general, you need the latest *.po file, usually the one for the language you want to modify. You can download it from the Mercurial repository: in this list of files navigate to your *.po file, click on the file name and then use the link "raw" in the navigation bar to save the file (right click or ctrl-click: Save Link as...) to your local hard disk.
- If there is yet no translation file for your language you can use the file hugin.pot and rename that using the above naming convention or just ask the developers list for assistance.
- 2. Edit your *.po file
- To edit the *.po or *.pot files, use poedit (it is a cross-platform PO files editor which runs on Mac OS X, Unix and Windows) or kbabel (it runs on any KDE platform). Note that you don't have to translate everything if you don't have time or knowledge to do it all. Also check below for things that shouldn't be translated (like software names) or for some explanations on specific words.
- Note: When using a version of Poedit before 1.4.3, editing comments directly in the right pane doesn't work, the text isn't saved into the .po file. To edit comments, use the "edit comment" dialogue from the menu. With Poedit 1.4.3 and later, please note that to see the comment window you have to check "View / Show comment window", and to be able to modify the comment you must go to "File / Preferences..." and check "Comment window is editable" in the "Editor" tab.
- Messages marked as fuzzy are actually not used in the GUI, their English counterparts are used instead. This seems to be an automagic suggestion which naturally often fails, so compare a fuzzy translation with the original phrase.
- 3. Submit your *.po file, or even better, commit your changes through Mercurial
- You can submit your edited translation via hugin's tracker on sourceforge (make sure you're logged in, otherwise you will see a non-descriptive error message from sourceforge). Select the category "translation" and the group "hugin" and attach your file.
- An even better solution, but which the first time takes you a few more minutes to set everything up, is to use Hugin's revision control system. For more information see Become a Power Translator below.
Use your new translation file
poedit updates your PO file and creates a MO file for your language. You can rename your MO file into hugin.mo and replace the hugin.mo file from your current installation (don't forget to make a backup of the original MO file, just in case).
- On Windows the MO file is in your hugin directory, in share\locale\XX\LC_MESSAGES\hugin.mo, where XX is your language.
- On Linux the MO file is under /usr/local/share/locale/XX/LC_MESSAGES/hugin.mo
- On Mac OS X the MO file is inside the hugin bundle: just click on Hugin.app and from the context menu choose "Show package contents", from there it's under Contents/Resources/XX.lproj/locale/hugin.mo (XX is your language code).
If you want to you can also rebuild hugin (doesn't have to be a heavy job when you only changed the .po file, the process only updates that part).
Become a Power Translator
After adding your po file to Hugin's tracker, the developers still need to integrate it, which is not easy as it means dealing with conflicting version (but how should a developer know which one of two conflicting sentences in a foreign language is the right one?). Thus using the same Mercurial approach to translation reduces considerably the burden on the rest of the team and is very much appreciated. Translation is a development too!
So instead of adding your po file to the tracker, you can integrate it yourself. You'll first need a Sourceforge user account (register here if you don't have one yet. Then tell the developers on the mailing list what your user account is, so that they can grant you access to Mercurial, the revision control system (you'll need this before following the next steps).
The first time
For Windows users
- 1. Get and install TortoiseHg.
- 2. In the explorer create a new folder, e.g. hugin-hg. Then do a right click on the created folder and select "Clone" in the "TortoiseHG" submenu. Select the repository http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin as source path and select "Clone".
- 3. Now select "Repository Settings" in the "TortoiseHG" context menu of the folder. In the section "Synchronize" add a new setting with an alias/name e.g. "writeRepo" and the URL ssh://YOUR-SOURCEFORGE-USERNAME@hugin.hg.sourceforge.net/hgroot/hugin/hugin , close the settings dialog. (This needs to be done only once.)
- 4. You can commit your (partial) results anytime: right-click on the folder and select in the context menu "Hg Commit..." - enter a short text describing what you did (e.g.: "updated French translation"), check that only your modified .po file is selected and click OK. Note that you can select only the "translation" folder instead of "hugin-trunk" if you modified only files within "translation".
- 5. Open the folder context menu, open "TortoiseHG/Synchronize". Select your in step 2 created setting in the combobox and select "Push". (Or you can also push from the "Repository Explorer".)
- 1. Get and install Mercurial. (
apt-get install mercurialon Ubuntu/Debian,
yum install mercurialon Fedora,
emerge mercurialon Gentoo)
- 2. Get the full Hugin source code.
hg clone http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin hugin
- 3. Do your translation work inside the folder src/translations
- 4. You can commit your (partial) results anytime by running the commands
hg pull hg commit TRANSLATEDFILE.po -m "updated LANGUAGE translation" hg push ssh://YOUR-SOURCEFORGE-USERNAME@hugin.hg.sourceforge.net/hgroot/hugin/hugin
Important: committed changes are only on your local disk. You must push them to SourceForge to make them available to the project.
The following times
The next time you want to work on the translations, you'll have first to retrieve the latest version of the files (as someone else might have modified something in the meantime) before working on it and then commiting it again.
- For Windows users
- Simply right-click your "hugin" folder and select "Synchronize" in the "TortoiseHG" menu. In the dialog select "Update" in the combobox "After pull" (You can select in the settings under "Synchronize" that this is the default setting). Now select "Pull".
- For Linux/Unix/OSX
- change into the folder with the files and execute
hg pull hg up -c
and then you can continue from step 3 above.
Extra perk - Build the latest Hugin
- If you're already here, you may want to also build and enjoy the latest Hugin. Some of the current contributors to the build, distribution and code of Hugin have learned this way. You are just a few clicks away from building your own bleeding edge Hugin. Find your platform in Build your Own Test Builds section of the wiki and follow the instructions.
- Welcome to the club!
Translation guide for specific terms
Note to translators, please add your language variant to the term on a new line in the same format as NL=
Also add your own difficult terms that are not mentioned here.
Note to developers, please check and enhance the meanings of these terms if they are unclear or incorrect.
- Aligning versus Finding control points
- Problem= they appear to be similar or the same, can they be interchanged?
- NL=referentie (was anker)
- Meaning=A technique for distributing OS X software as a single file.
- NL=bundle (bundel?)
- bundled version
- Meaning=? Any packaged software will contain multiple files, these files are said to be 'bundled' (not just OS X)
- NL=ingebouwde versie (gebundelde versie?)
- Camera response (C. r. curve)
- Meaning=it corresponds with photo-electrical transfer function, and I am not sure can I translate it to "opto-electic curve of camera" in my language, because stright tranlation of "camera response" statement sounds trivial and not clear.
- PL=krzywa optoelektryczna aparatu?
- control points
- Meaning=corresponding areas in two images (or the same image for horizontal and vertical control points)
- NL=ijkpunten (was controle punten), IJkpunten bij hoofdletters
- Crop factor
- Meaning=The physical size of a CCD sensor relative to a 35mm frame.
- Cropped (images)
- Meaning=image cut smaller than the original size
- Discussion=Should this be translated? Like Blend, this is jargon, may be clearer when untranslated?
- ET=kärbitud (pildid)
- NL=uitgesneden (afbeeldingen)
- Custom parameters
- Meaning=parameters other than standard (+context???)
- NL=aangepaste parameters
- Meaning=wizard for ease of use, alternative names: Assistant, workflow guide, etc.
- NL=Druide (kan beter?)
- Estimate (position, FoV, etc.)
- Meaning=? in my book, estimate means an educated guess. I get the impression that a more exact term is intended for hugin. Where can this term be replaced with "calculate" or "determine"?
- NL=bepalen (eng:determine), bereken (eng:calculate) alternative suggestion: Schatten (eng:estimate)
- Exposure blending (or Exposure fusion)
- Meaning=Taking a bracketed photo stack and picking the best bits to create a new image. Hugin tries to use the phrase 'Exposure fusion' rather than 'blending' as the tool for this is enfuse.
- NL=Blend van belichtingen?
- Field of View
- Meaning=Horizontal Angle of view
- Meaning=An astronomical technique, using a photo taken with the lens covered or of an even white surface to calibrate normal photos
- NL=flatfield (astrofoto jargon, ook in NL gebruikt)
- Meaning=monochrome colourspace. Typically grayscale images can have many shades of gray as well as black and white.
- NL=grijsschaal (kan beter!)
- High Dynamic Range (HDR)
- Meaning=Luminance values are within a large numeric range (typically floating point with a linear response)
- NL=Hoog Dynamisch Bereik (HDR)
- Meaning=photo, scan, ....
- DE=Merkmalspunkt (see Article about SIFT in the German Wikipedia)
- Low Dynamic Range (LDR)
- Meaning=Luminance values are within a small numeric range (typically 8-bit or 16bit integer with a non-linear response curve).
- NL=Laag Dynamisch Bereik (LDR)
- Meaning=render and distort an image to a different projection?
- NL=translatie, afbeelding, vervorming, projectie?
- Num. Transf.
- Meaning=Numerical Transform. Rotation of panorama roll, pitch and yaw by manually entering numbers.
- NL=Num. Transf.
- Photometric Alignment
- Meaning=Determining relative exposure, camera response and vignetting
- ET=fotomeetriline joondamine
- NL=fotometrische uitlijning (beter?: fotometrische afstemming)
- Photometric Optimisation
- Meaning=Optimisation of non-mapping image parameters, such as 'Camera response', Vignetting and Exposure.
- ET=fotomeetriline optimeerimine
- NL=fotometrische optimalisatie
- pyramid image
- Meaning=This is the practice of creating a stack of successively smaller versions of an image, useful for many image manipulation tasks.
- NL=piramidale afbeelding
- Seam blending
- Meaning=Taking two or more partially overlapping photos and blending then with a seam down the middle of the overlap. The tool typically used for this is enblend
- Stitcher (the tab)
- Meaning= Where the actual combining of the images is done
- NL=Samenvoegen (alt: Combineren, Naaien?)
- Vertical or Horizontal guide
- Meaning=Horizontal or Vertical "control points"
- NL=h/v hulp (suggestie: ijklijnen)?
Do not translate:
- Autopano (program name)
- Autopano-SIFT (program name)
- Deflate (zip method)
- Enblend (program name)
- EXR (HDR file type)
- JPEG (file type)
- LZW (zip method)
- Nona (program name)
- Packbits (zip method)
- PTStitcher (program name)
Technical translation issues
Some strings don't appear to be translated, they are apparently generated by the GUI toolkit or the operating system. Most likely they will be in the same language as hugin, because very few people, other than translators, start a program with a specific language other than that of the environment.
The file src/translations/ignored-entries.txt contains a list of ignored entries from the xrc files (which are used to declare most of the hugin UI). If you need to translate a sentence which is there, remove the line from the file and run the extract-messages.sh script to update the .po files.
If you find a source term that isn't correct, spelling or meaning, probably best to bring it up with Pablo d'Angelo or on the hugin mailinglist: 
List of source string problems
- calculate highest sensible width. (uses every image pixel)
- I can translate this literally, but is this even helpful in English? (this is a tooltip for the size calc button in the Stitcher tab)
Tips and Tricks
Running hugin in a specific language
If you want to run hugin in another language than the default, use the following command (Linux with UTF8):
$ LANG=nl_NL.utf8 hugin
This will start hugin in dutch. Other languages have different names of course, try looking in /usr/share/i18n/locales/.
Adding new strings
After adding new strings, translators need to find them in the .pot and .po files otherwise they won't get translated.
Hugin has a script to extract the messages from both the .xrc files and the .cpp source code and insert them into the hugin.pot and .po files. New strings are added and unused strings are marked as obsolete.
Before running the script, make sure you have wxrc installed. On older Ubuntu, run
sudo apt-get install wxrc. On Ubuntu 10.4 it is
sudo apt-get install wx-common.
Then, add the new strings:
hg pull hg up cd src/translations ./extract-messages.sh hg ci hg push ssh://YOUR-SOURCEFORGE-USERNAME@hugin.hg.sourceforge.net/hgroot/hugin/hugin
Applying a contributed .po file
You could just overwrite the original and commit, but this assumes the file is correctly formatted and hasn't lost any strings. Better to use msgmerge to merge the contributed .po file with the existing:
msgmerge -o zh_CN.merged.po /tmp/zh_CN.contributed.po src/translations/zh_CN.po mv zh_CN.merged.po src/translations/zh_CN.po hg ci zh_CN.po -m 'Edited chinese translation' hg push ssh://YOUR-SOURCEFORGE-USERNAME@hugin.hg.sourceforge.net/hgroot/hugin/hugin
msgfmt --statistics eo_XX.po
Issues That Need Work
- There are more than 1000 strings in the hugin.pot file. The main translation problem we have now is that many of these strings are in the sourcecode, but not in bits that are used - i.e. there are strings that are being translated unnecessarily (the panodruid for example).
- The .po files headers are inconsistent. Ideally they would all feature the same license and copyright notice; and they would list all contributors.