Example of Starting a Translation
French will be used for the example:
cvs checkout webwml/Makefile.common webwml/english cd webwml mkdir french cvs add french cd french cp ../english/.wmlrc ../english/Make.* . echo 'include $(subst webwml/french,webwml/english,$(CURDIR))/Makefile' > Makefile mkdir po cvs add Make* .wmlrc po cp Makefile po make -C po init-po cvs add po/Makefile po/*.fr.po
Edit the .wmlrc file and change:
- '-D CUR_LANG=English' to '-D CUR_LANG=French'
- '-D CUR_ISO_LANG=en' to '-D CUR_ISO_LANG=fr'
- '-D CUR_LOCALE=en_US' to '-D CUR_LOCALE=fr_FR'
- '-D CHARSET=iso-8859-1' to whatever is appropriate.
French just happens to use the same character encoding as English so no change is necessary, however it's likely that new languages will need to have this setting adjusted.
Edit Make.lang and change 'LANGUAGE := en' to 'LANGUAGE := fr'. In case you are translating to a language which uses a multi-byte charset, you may have to change some other variables in that file, for more information read ../Makefile.common and perhaps other working examples (translations such as Chinese).
Go to french/po and translate entries in PO files. This should be quite straightforward.
Always make sure you copy the Makefile to each directory you translate.
This is necessary because the program
make is used to convert
the .wml files into HTML, and
make uses Makefiles.
When you are done adding and editing pages, do a
cvs commitfrom the webwml directory. You can now start translating the pages.
Example of Translating a Page
A French translation of the social contract will be used for the example:
cd webwml ./copypage.pl english/social_contract.wml cd french cvs add social_contract.wml
This will automatically add the translation-check header, pointing to the version of the original file which was copied. It also creates the destination directory and Makefile, if missing.
Edit social_contract.wml and translate the text. Do not try to translate any links or change them in any way - if you want to change anything, request it on the debian-www list. When done, type
cvs commit -m "short description of the changes you made" social_contract.wml
Example of Adding a New Directory
This example shows the French translation adding the intro/ directory:
cd webwml/french mkdir intro cvs add intro cd intro cp ../Makefile .Make sure a new directory has the Makefile and that it's committed in CVS. Otherwise, running make will give an error to everyone else trying it.
cvs add Makefile cd .. cvs commit -m "added the intro dir to CVS" intro