| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The mailing list translations@lilynet.net is dedicated to
LilyPond web site and documentation translation; on this list, you will
get support from the Translations Meister and experienced translators,
and we regularly discuss translation issues common to all languages.
All people interested in LilyPond translations are invited to subscribe
to this list regardless of the amount of their contribution, by sending
an email to translations-request@lilynet.net with subject
subscribe and an empty message body. Unless mentioned explicitly,
or except if a translations coordinator contacts you privately, you
should send questions, remarks and patches to the list
translations@lilynet.net. Please note that traffic is high
on the English-speaking list lilypond-user@gnu.org, so it may
take some time before your request or contribution is handled.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
First, get the sources of branch translation from the
Git repository, see Starting with Git.
| Translation requirements | ||
| Which documentation can be translated | ||
| Starting translation in a new language |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Working on LilyPond documentation translations requires the following pieces of software, in order to make use of dedicated helper tools:
It is not required to build LilyPond and the documentation to translate the documentation. However, if you have enough time and motivation and a suitable system, it can be very useful to build at least the documentation so that you can check the output yourself and more quickly; if you are interested, see Compiling.
Before undertaking any large translation work, contributors are encouraged to contact the Translation Meister.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The makefiles and scripts infrastructure currently supports translation of the following documentation:
Support for translating the following pieces of documentation should be added soon, by decreasing order of priority:
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
At top of the source directory, do
./autogen.sh |
or (if you want to install your self-compiled LilyPond locally)
./autogen.sh --prefix=$HOME |
If you want to compile LilyPond – which is almost required to build
the documentation, but is not required to do translation only – fix
all dependencies and rerun ./configure (with the same
options as for autogen.sh).
Then cd into ‘Documentation/’ and run
make ISOLANG=MY-LANGUAGE new-lang |
where MY-LANGUAGE is the ISO 639 language code.
Finally, add a language definition for your language in ‘python/langdefs.py’, ‘Documentation/lilypond-texi2html-lang.init’ and ‘Documentation/web/server/lilypond.org.htaccess’. Add this language definition and the corresponding section in ‘Documentation/lilypond-texi2html.init’ and ‘scripts/build/create-weblinks-itexi.py’.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Please follow all the instructions with care to ensure quality work.
All files should be encoded in UTF-8.
| Files to be translated | ||
| Translating the Web site and other Texinfo documentation | ||
| Adding a Texinfo manual |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Translation of ‘Documentation/foo/bar’ should be ‘Documentation/LANG/foo/bar’. Unmentioned files should not be translated.
Priorities:
Files of priority 1 should be submitted along all files generated by starting a new language in the same commit and thus a unique patch, and the translation of files marked with priority 2 should be committed to Git at the same time and thus sent in a single patch. Files marked with priority 3 or more may be submitted individually. Word counts (excluding LilyPond snippets) are given for each file. For knowing how to commit your work to Git, then make patches of your new translations as well as corrections and updates, see Basic Git procedures.
-1- Web site 752 web.texi 6073 web/introduction.itexi 1174 web/download.itexi 1139 macros.itexi 9 po/lilypond-doc.pot (translate to po/MY_LANGUAGE.po) 0 search-box.ihtml --- lilypond-texi2html.init (section TRANSLATIONS) 9147 total -2- Tutorial 1279 web/manuals.itexi 124 learning.tely 2536 learning/tutorial.itely 4517 learning/common-notation.itely 8456 total -3- Fundamental Concepts, starting of Usage and Community 11576 learning/fundamental.itely -- Fundamental concepts 135 usage.tely 6877 usage/running.itely 2097 usage/updating.itely 2359 web/community.itexi 23044 total -4- Rest of Learning manual and Suggestions on writing LilyPond files 16582 learning/tweaks.itely -- Tweaking output 1236 learning/templates.itely -- Templates 2793 usage/suggestions.itely -- Suggestions on writing LilyPond files 20611 total -5- Notation reference 361 notation.tely 91 notation/notation.itely -- Musical notation 5513 notation/pitches.itely 7098 notation/rhythms.itely 1907 notation/expressive.itely 1310 notation/repeats.itely 3001 notation/simultaneous.itely 3017 notation/staff.itely 1700 notation/editorial.itely 3572 notation/text.itely 81 notation/specialist.itely -- Specialist notation 5174 notation/vocal.itely 2177 notation/chords.itely 702 notation/piano.itely 1000 notation/percussion.itely 826 notation/guitar.itely 66 notation/strings.itely 242 notation/bagpipes.itely 5468 notation/ancient.itely 13941 notation/input.itely -- Input syntax 2164 notation/non-music.itely -- Non-musical notation 11050 notation/spacing.itely -- Spacing issues 17137 notation/changing-defaults.itely -- Changing defaults 5187 notation/programming-interface.itely -- Interfaces for programmers 3450 notation/notation-appendices.itely -- Notation manual tables 252 notation/cheatsheet.itely -- Cheat sheet 96487 total -6- Rest of Application Usage 4212 usage/lilypond-book.itely -- LilyPond-book 1122 usage/converters.itely -- Converting from other formats 5334 total -7- Appendices whose translation is optional 382 essay/literature.itely 1222 learning/scheme-tutorial.itely (should be revised first) 1604 total |
In addition, not listed above, Snippets’ titles and descriptions should be translated; they are a part of the Notation Reference and therefore their priority is 5.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Every piece of text should be translated in the source file, except
Texinfo comments, text in @lilypond blocks and a few cases
mentioned below.
Node names are translated, but the original node name in English should
be kept as the argument of @translationof put after the section
title; that is, every piece in the original file like
@node Foo bar @section_command Bar baz |
should be translated as
@node translation of Foo bar @section_command translation of Bar baz @translationof Foo bar |
The argument of @rglos commands and the first argument of
@rglosnamed commands must not be translated, as it is the node
name of an entry in Music Glossary.
Every time you translate a node name in a cross-reference, i.e. the
argument of commands @ref, @rprogram, @rlearning, @rlsr,
@ruser or the first argument of their *named variants,
you should make sure the target node is defined in the correct source
file; if you do not intend to translate the target node right now, you
should at least write the node definition (that is, the @node
@section_commmand @translationof trio mentioned above) in the
expected source file and define all its parent nodes; for each node you
have defined this way but have not translated, insert a line that
contains @untranslated. That is, you should end up
for each untranslated node with something like
@node translation of Foo bar @section_command translation of Bar baz @translationof Foo bar @untranslated |
Note: you do not have to translate the node name of a cross-reference to a node that you do not have translated. If you do, you must define an “empty” node like explained just above; this will produce a cross-reference with the translated node name in output, although the target node will still be in English. On the opposite, if all cross-references that refer to an untranslated node use the node name in English, then you do not have to define such an “empty” node, and the cross-reference text will appear in English in the output. The choice between these two strategies implies its particular maintenance requirements and is left to the translators, although the opinion of the Translation meister leans towards not translating these cross-references.
Please think of the fact that it may not make sense translating everything in some Texinfo files, and you may take distance from the original text; for instance, in the translation of the web site section Community, you may take this into account depending on what you know the community in your language is willing to support, which is possible only if you personally assume this support, or there exists a public forum or mailing list listed in Community for LilyPond in your language:
In any case, please mark in your work the sections which do not result
from the direct translation of a piece of English translation, using
comments i.e. lines starting with ‘@c’.
Finally, press in Emacs <C-c C-u C-a> to update or generate
menus. This process should be made easier in the future, when the helper
script texi-langutils.py and the makefile target are updated.
Some pieces of text manipulated by build scripts that appear in the
output are translated in a ‘.po’ file – just like LilyPond output
messages – in ‘Documentation/po’. The Gettext domain is named
lilypond-doc, and unlike lilypond domain it is not managed
through the Free Translation Project.
Take care of using typographic rules for your language, especially in ‘macros.itexi’.
If you wonder whether a word, phrase or larger piece of text should be translated, whether it is an argument of a Texinfo command or a small piece sandwiched between two Texinfo commands, try to track whether and where it appears in PDF and/or HTML output as visible text. This piece of advice is especially useful for translating ‘macros.itexi’.
Please keep verbatim copies of music snippets (in @lilypond
blocs). However, some music snippets containing text that shows in
the rendered music, and sometimes translating this text really helps
the user to understand the documentation; in this case, and only in
this case, you may as an exception translate text in the music
snippet, and then you must add a line immediately before the
@lilypond block, starting with
@c KEEP LY |
Otherwise the music snippet would be reset to the same content as the
English version at next make snippet-update run – see
Updating documentation translation.
When you encounter
@lilypondfile[<number of fragment options>,texidoc]{filename.ly}
|
in the source, open ‘Documentation/snippets/filename.ly’,
translate the texidoc header field it contains, enclose it with
texidocMY-LANGUAGE = " and ", and write it into
‘Documentation/MY-LANGUAGE/texidocs/filename.texidoc’.
Additionally, you may translate the snippet’s title in doctitle
header field, in case doctitle is a fragment option used in
@lilypondfile; you can do this exactly the same way as
texidoc. For instance,
‘Documentation/MY-LANGUAGE/texidocs/filename.texidoc’
may contain
doctitlees = "Spanish title baz" texidoces = " Spanish translation blah " |
@example blocks need not be verbatim copies, e.g. variable
names, file names and comments should be translated.
Finally, please carefully apply every rule exposed in Texinfo introduction and usage policy, and Documentation policy. If one of these rules conflicts with a rule specific to your language, please ask the Translation meister on translations@lilynet.net list and/or the Documentation Editors on lilypond-devel@gnu.org list.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In order to start translating a new manual, simply copy the English files within your language directory and translate them.
For example, if you want to translate the first chapter of the Learning Manual:
cp Documentation/learning.tely Documentation/LANG/learning.tely cp Documentation/learning/tutorial.itely Documentation/LANG/tutorial.itely |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Several tools have been developed to make translations maintenance easier. These helper scripts make use of the power of Git, the version control system used for LilyPond development.
You should use them whenever you would like to update the translation in your language, which you may do at the frequency that fits your and your cotranslators’ respective available times. In the case your translation is up-do-date (which you can discover in the first subsection below), it is enough to check its state every one or two weeks. If you feel overwhelmed by the quantity of documentation to be updated, see Maintaining without updating translations.
| Check state of translation | ||
| Updating documentation translation | ||
| Updating translation committishes |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
First pull from Git – see Pulling and rebasing, but DO NOT rebase
unless you are sure to master the translation state checking and
updating system – then cd into ‘Documentation/’ (or at top of the
source tree, replace make with make -C
Documentation) and run
make ISOLANG=MY_LANGUAGE check-translation |
This presents a diff of the original files since the most recent revision of the translation. To check a single file, cd into ‘Documentation/’ and run
make CHECKED_FILES=MY_LANGUAGE/manual/foo.itely check-translation |
In case this file has been renamed since you last updated the
translation, you should specify both old and new file names, e.g.
CHECKED_FILES=MY_LANGUAGE/{manual,user}/foo.itely.
To see only which files need to be updated, do
make ISOLANG=MY_LANGUAGE check-translation | grep 'diff --git' |
To avoid printing terminal colors control characters, which is often desirable when you redirect output to a file, run
make ISOLANG=MY_LANGUAGE NO_COLOR=1 check-translation |
You can see the diffs generated by the commands above as changes that you should make in your language to the existing translation, in order to make your translation up to date.
Note: do not forget to update the committish in each file you have completely updated, see Updating translation committishes.
Global state of the translation is recorded in ‘Documentation/translations.itexi’, which is used to generate Translations status page. To update that page, do from ‘Documentation/’
make translation-status |
This will also leave ‘out/translations-status.txt’, which contains up-to-dateness percentages for each translated file, and update word counts of documentation files in this Guide.
Maintaining without updating translations.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Instead of running check-translation, you may want to run
update-translation, which will run your favorite text editor to
update files. First, make sure environment variable EDITOR is
set to a text editor command, then run from ‘Documentation/’
make ISOLANG=MY_LANGUAGE update-translation |
or to update a single file
make CHECKED_FILES=MY_LANGUAGE/manual/foo.itely update-translation |
For each file to be updated, update-translation will open your
text editor with this file and a diff of the file in English; if the
diff cannot be generated or is bigger than the file in English itself,
the full file in English will be opened instead.
Note: do not forget to update the committish in each file you have completely updated, see Updating translation committishes.
‘.po’ message catalogs in ‘Documentation/po/’ may be updated by issuing from ‘Documentation/’ or ‘Documentation/po/’
make po-update |
Note: if you run po-update and somebody else does the same and pushes before you push or send a patch to be applied, there will be a conflict when you pull. Therefore, it is better that only the Translation meister runs this command. Furthermore, it has been borken since the GDP: variable names and comments do no longer appear as translated.
Updating music snippets can quickly become cumbersome, as most snippets should be identical in all languages. Fortunately, there is a script that can do this odd job for you (run from ‘Documentation/’):
make ISOLANG=MY_LANGUAGE snippet-update |
This script overwrites music snippets in
‘MY_LANGUAGE/foo/every.itely’ with music snippets from
‘foo/every.itely’. It ignores skeleton files, and keeps
intact music snippets preceded with a line starting with @c
KEEP LY; it reports an error for each ‘.itely’ that has not the
same music snippet count in both languages. Always use this script
with a lot of care, i.e. run it on a clean Git working tree, and check
the changes it made with git diff before committing; if you
don’t do so, some @lilypond snippets might be broken or make
no sense in their context.
Maintaining without updating translations, Adding and editing snippets.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
At the beginning of each translated file except PO files, there is a committish which represents the revision of the sources which you have used to translate this file from the file in English.
When you have pulled and updated a translation, it is very important to update this committish in the files you have completely updated (and only these); to do this, first commit possible changes to any documentation in English which you are sure to have done in your translation as well, then replace in the up-to-date translated files the old committish by the committish of latest commit, which can be obtained by doing
git rev-list HEAD |head -1 |
Most of the changes in the LSR snippets included in the documentation concern
the syntax, not the description inside texidoc="". This implies that
quite often you will have to update only the committish of the matching
.texidoc file. This can be a tedious work if there are many snippets to be
marked as up do date. You can use the following command to update the
committishes at once:
cd Documentation/LANG/texidocs
sed -i -r 's/[0-9a-z]{40}/NEW-COMMITTISH/' *.texidoc
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These policies show the general intent of how the translations should be managed, they aim at helping translators, developers and coordinators work efficiently.
| Maintaining without updating translations | ||
| Managing documentation translation with Git |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Keeping translations up to date under heavy changes in the documentation in English may be almost impossible, especially as during the former Grand Documentation Project (GDP) or the Grand Organization Project (GOP) when a lot of contributors brings changes. In addition, translators may be — and that is a very good thing — involved in these projects too.
it is possible — and even recommended — to perform some maintenance that keeps translated documentation usable and eases future translation updating. The rationale below the tasks list motivates this plan.
The following tasks are listed in decreasing priority order.
make check-translation – you may want to redirect output
to a file because of overwhelming output, or call check-translation.py
on individual files, see Check state of translation.
@node and
@section-command from English docs, and add the marker for
untranslated status @untranslated on a single line. Note that
it is not possible to exactly match subsections or subsubsections of
documentation in English, when contents has been deeply revised; in this
case, keep obsolete (sub)subsections in the translation, marking them
with a line @c obsolete just before the node.
Emacs with Texinfo mode makes this step easier:
*Occur*; to show structure of two files
simultaneously, first split Emacs window in 4 tiles (with <C-x 1>
and <C-x 2>), press <C-c C-s> to show structure of one file
(e.g. the translated file), copy *Occur* contents into
*Scratch*, then press <C-c C-s> for the other file.
If you happen to have installed AucTeX, you can either call the macro by doing <M-x texinfo-show-structure> or create a key binding in your ‘~/.emacs’, by adding the four following lines:
(add-hook 'Texinfo-mode-hook
'(lambda ()
(define-key Texinfo-mode-map "\C-cs"
'texinfo-show-structure)))
|
and then obtain the structure in the *Occur* buffer with <C-c
s>.
@menus when all menu entries are in the same
file, just do <C-c C-u C-a> (“update all menus”) when you have
updated all the rest of the file.
node (or <C-s @node> if the text
contains the word ‘node’) then press <C-s> to move to next node
or <C-r> to move to previous node. Similar operation can be used
to move to the next/previous section. Note that every cursor move
exits incremental search, and hitting <C-s> twice starts
incremental search with the text entered in previous incremental
search.
https://lilypondwiki.tuxfamily.org/index.php?title=Documentation_coordination. |
make ISOLANG=YOUR-LANGUAGE fix-xrefs |
This step requires a successful documentation build (with make
doc). Some cross-references are broken because they point to a node
that exists in the documentation in English, which has not been added
to the translation; in this case, do not fix the cross-reference but
keep it "broken", so that the resulting HTML link will point to an
existing page of documentation in English.
You may wonder if it would not be better to leave translations as-is until you can really start updating translations. There are several reasons to do these maintenance tasks right now.
texi2html and node names are directly translated in source
files.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This policy explains how to manage Git branches and commit translations to Git.
translation branch. This branch is merged on
master once a week, approximately. Then,
master branch is merged on
translation, where the check-translation script (see
Check state of translation) shows changes in English docs which
should be translated, and the cycle starts again.
master only if they do not break compilation of LilyPond and
its documentation. Those changes could be pushed to
translation too, or alternatively translators could wait until
they come from
master the next time it is merged on
translation. Similarly, changes matching
stable/X.Y are preferably made on
X.Ytranslation.
translation Git branch may be merged into
master branch only if LilyPond (make all) and
documentation (make doc) compile successfully.
make and make doc are usually successful in
master Git branch because those tests should have already
succeeded when merging the contained commits.
master branch may be merged into
translation when significant changes had been made in
documentation in English in
master branch.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A number of Python scripts handle a part of the documentation translation process. All scripts used to maintain the translations are located in ‘scripts/auxiliar/’.
Other scripts are used in the build process, in ‘scripts/build/’:
Python modules used by scripts in ‘scripts/auxiliar/’ or ‘scripts/build/’ (but not by installed Python scripts) are located in ‘python/auxiliar/’:
And finally
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by gub on July 13, 2020 using texi2html 1.82.