trans howto
[[trans_howto]] last edit on Aug 24, 2006 9:14 PM by musicovore

topmenu


LilyPond translations


Translating LilyPond website and documentation is a good way to help
both developers and new users. The first thing people will see is LilyPond website.
Reading the pages translated in his language will help him quickly understand why Lily
is good for him.

Website translation

Involvement


Translating the website means also maintaining it. The web pages are sometimes
changed, rewritten or updated. This changes have to be checked by the
maintainer, to get the translated pages up to date.

Begin the translation


The first thing to do is to retrieve the website sources. They are standing
on a cvs repository. So, first install cvs on your computer, then run:

export CVS_RSH=ssh
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/lilypond co newweb

A newweb directory will be created, containing the sources. Move into
this directory and run:

make new LANG=yourLangage

yourLangage must be replaced by your langage code (i.e. pt for portugal);
refer to gettext manual for a correct coding
directory, containing the new langage structure for the website.
You are now ready to start the translation.

What should I translate first?


First, read the newweb/TRANSLATION file. The pages you need to translate
first are the ones with a delivery priority set to 1. Copy the english pages
(in the site/ directory) in your langage directory. Then you can translate them.
You'll have to translate the po/yourLangage.po file too, to display the
translated menu items, and some stuff on the download page site/install.html.

Technical aspects


You have to take care about a few things:
  • keep the headers of the html pages unchanged, except the $ signs around
the version number: do not forget to remove them!
  • the version number of the translated page has to be the same that the
corresponding english page.
  • use UTF-8 encoding. LilyPond server uses this encoding.
  • be careful that special (i.e., non-ascii) characters may be messed up by email
transfers, so it may be a good idea to replace them by their corresponding html code (codes with &).

Once you have translated all the pages, gzip or bzip the language directory into a tarball
langage directory, and send it to the lilypond-devel mailing list
- don't forget to suscribe to this list.

(Of course, if you have CVS write access, you can directly add the new files and commit.)

Next steps


  • You can now translate the other pages (always refer to the TRANSLATION file
for priority rules). It's better to send your work when all the pages within
a same directory are translated.
  • The check-translation script included in the sources can look for you if a new
version of a translated file exists. To run it do:

cd /path/to/newweb
cvs up ## to update your sources directory
make LANG=yourLangage check-translation


The applied changes will be shown, just make updates and send a patch to the
devel list (see the patch section on this page).

Team work


Don't hesitate to discuss about your translation plans on LilyPond's lists.
Working with other people will make the translations better, faster and easier.
Each translator can read the work from each other, and make useful changes.
Patches are very useful to send small corrections.

How to make patches

There are two type of patches: patches against the cvs sources, and patches
against your personnal work.

cvs patches
Once you have made the corrections in the newweb directory, move inside
this directory and run:

cvs diff -u > file

The changes will be written in file.
To apply a patch, run in the newweb directory:

patch -p0 < file

local patches
To create a patch between two local files, run:

diff -u origFile modifFile > file.patch

To apply the patch, just run:

patch -p0 < file

Related links


cvs documentation

copyright