How to prepare your campaign for translation ============================================ 1. Mark all strings to be translated with _"my english string" 2. In your [campaign] and [scenario] tags, add the following 2 lines, before the 1st translatable strings: translations=data/campaigns//translations textdomain= It is strongly suggested that your textdomain follows the "wesnoth-" naming scheme. How to use the wesnoth user-campaign po-kit, version 2 ====================================================== Note: this is a highly preliminar kit. Future versions will hopefully have less software requirements. Software requirements --------------------- gettext, make (untested with non-gnu make), an sh-compatible shell Initial setup ------------- 1. Make sure you don't have any other campaign in the same directory, or you will get messages from all the campaign stored in the same message catalog. That is, do not consider your data/campaigns dir a suitable place. Instead, create a directory where you'll put only your campaign files and the pokit files. This dir will be the "source directory" for your campaign, from which you'll be able to generate installable translated campaigns. Example (after application of step 2 below): $ ls Two_Brothers-0.2.1+yann/ Two_Brothers Two_Brothers.cfg 2. Untar the po-kit tarball to at the same level you have your .cfg file. 3. Create a campaign.def file near your [campaign] definition file, providing the CAMPAIGN and DOMAIN variables. CAMPAIGN should be the name of the directory holding your campaign data, and DOMAIN the textdomain you declared in your WML files. Eg: CAMPAIGN=Two_Brothers DOMAIN=wesnoth-twobrothers 4. Build an initial .pot file by running "make", making sure wmlxgettext is in your PATH. If you don't have wesnoth 0.8.8-CVS or newer installed in your PATH, you can run something like: make WMLXGETTEXT=/utils/wmlxgettext Adding a new translation ------------------------ In the po/ directory: 1. add in the po/LINGUAS file. This file contains a space-separated list of languages for which you will provide translations. 2. run "msginit -l --no-translator" Preparing your campaign for upload, with the translations --------------------------------------------------------- 1. Run "make", still making sure wmlxgettext is in your path. You will get a translations/ directory near your scenarios/ dir. Optionnally, run "make clean" to get rid of all intermediate files. 2. Upload as usual. Changes in 2.4 -------------- - Added warning about not using multiple campaigns in the same dir. Changes in 2.3 -------------- - Replace (unused) xgettext with true, so poor mac users with olde gettext can still use the po-kit. - Get rid of XGETTEXT_OPTIONS in po/Makevars, since it is not useful to us either. - Made it so empty po/LINGUAS does not thrown an error Changes in 2.2 -------------- - Do not require msgcat when not extracting strings from C++. Changes in 2.1 -------------- - Really create po/LINGUAS if non-existent. - Also substitute GMSGFMT and XGETTEXT in po/Makefile. Changes in 2.0 -------------- - Dropped dependency on automake and autoconf. - Made it possible to upgrade the po-kit: - Do not ship po/LINGUAS in the tarball, but create it empty if non-existent. - Move all campaign definitions in campaign.defs, not in tarball either - Provide a "make tarball" rule to make it easier to pack a new release.