BSD daemon

NetBSD Developer Documentation:

Translating htdocs

This is intended to become a reference for those wishing to translate htdocs (the CVS repository for the NetBSD web server).

General Notes on translating htdocs

Translating the files

Guidelines and Caveats

Submit your changes

Related documentation


General Notes on translating htdocs


Introduction (top)

This document is intended to serve as a rough guide for the process of translating the NetBSD website. Originally, this document was directed towards people translating into German, but since the general process is the same for other languages as well, this guide was adjusted.

Below you will find several sections that apply to all translations, and a few sections that are language specific. The general parts use the variable <lang> to indicate your language-code (for example, "de" for German, "fr" for French etc.). Note that the language-code (ISO639-1) may differ from the country-code (ISO3166); Swedish is "sv" and is spoken in both Sweden, ("SE") and Finland ("FI"). If you need to be more precise, use "language-country", like "sv-se" for Swedish as spoken in Sweden, which might differ from "sv-fi" - Swedish as spoken in Finland. See also the HTML4 language specification.

If you find any of the information given in this document to be misleading or incorrect, if you have any suggestions, corrections or comments, please don't hesitate to contact <www@NetBSD.org>.

Mailing Lists (top)

We have set up a few Mailing Lists for the translators -- should you wish to initiate the translation into a different language and would like to set up a similar Mailing List, please send an email to <jschauma@NetBSD.org>. Currently, the following lists are available: You probably also want to join the netbsd-docs mailing list.

Who's working on what language? (top)

Here's a list of the people currently coordinating the different translations. See the translation statistics for their progress. If you want to help proofread any particular language, please contact these people:

Name E-Mail Language
Daniel de Kok daniel at NetBSD dot org Dutch
N.N. Estonian
Guillain Seuillot guillain dot seuillot at ign dot fr French
Jan Schaumann jschauma at netmeister dot org German
Thorsten Lindloff tlindloff at t-online dot de German (The NetBSD Guide)
Ofer Waldman the_duke at gnu dot org dot il Hebrew
Marco Cabizza feedback at email dot it Italian
Simas Mockevicius symka at netbsd dot vejas dot lt Lithuanian
Dawid Szymañski dawszy at polnet dot wroc dot pl Polish
Paulo Alexandre Pinto Pires p at ppires dot org Portuguese
Mike M. Volokhov mishka at apk dot od dot ua Russian
Julio M. Merino Vidal jmmv at NetBSD dot org Spanish
Mattias Karlsson keihan at sergei dot cc Swedish

CVS Setup (top)

We maintain the translated documents under subdirectories of the 'htdocs' module on anoncvs.NetBSD.org. The general procedure to translate a page is basically the same. First of all, you will need to check out the ``htdocs'' module. To do so, please set your CVSROOT to :pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot and issue the command:
 $ cvs login

When prompted for a password, simply enter 'anoncvs' and hit <return>. After this, you can check out the module using

 $ cvs checkout htdocs

This will create a directory ``htdocs'' in the current directory and store all the files in this directory. Now change into the directory ``htdocs/<lang>'', which is where the files for your language will live.

Changing existing files (top)

If you have encountered spelling errors or want to change anything else (for example, adjust a link), simply edit the file with your favorite editor.

Translating the files


Translating a new file (top)

To translate a new file, please first make sure that nobody else is working on this file. We usually try to post who's working on which files to http://www.NetBSD.org/~jschauma/. If nobody appears to have claimed the section you intend to translate, please send an email to netbsd-docs-<lang>@cs.stevens-tech.edu to inform the other translators.

Copy the file(s) you wish to translate into place from the english directory tree - you may need to create directories accordingly. For example:

 $ pwd
 /home/you/htdocs/de/
 $ mkdir foo
 $ cp ../foo/* foo
 $ cd foo

When you edit the files, please pay attention if the file has a comment stating that you should be editing not bar.html but rather bar.list and run make afterwards!

If you want, you can use the shell-script translate.sh, which resides in htdocs/, to initiate the translation-process. This script copies the file, which is given as the first and only argument, into the current directory and performs some of the actions described below. In particular, it adjusts the img src tags, the html tag and copies the original CVS tag. However, be careful to check these changes when you start the translation.

As you translate the file, please consult your dictionary of choice frequently. It may be helpful to have http://babelfish.altavista.com walk over the site (remember, the files you're translating are all available at http://www.NetBSD.org). Occasionally, Babelfish comes up with good phrases - however, more often than that, it creates horrible translations, so please be careful!

Run a spell-checker over the document. Re-read it again. View it on a browser and read it carefully again.

Adjust a few tags (top)

Almost every non-english text contains a few characters that are not part of the plain ASCII set, such as the Umlauts (ä, ö, ü, accents and the like). You can choose to represent these using HTML entities, or to enter them directly.

When using HTML entities such as &auml; be careful: I usually tend to forget the next letter, so that I type f&uuml; instead of f&uuml;r.

When entering special characters directly, please remember to add the following tag to the <HEAD>:

     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

Note that you should not use ISO-8859-15 as the charset. Even though this would be the best charset to represent all special characters commonly encountered in German (and other European language based) documents (such as the Euro-symbol), not all browsers are able to handle this charset. Therefore, please use ISO-8859-1 and use numeric entity references when you need to include a character from a different charset.

If you translate into a non-european language, please adjust the charset accordingly.

Finally, adjust the HTML tag to contain your language-code (for example: <HTML lang="de">). Note that the DOCTYPE tag should remain untouched, that is it should end in //EN> rather than //DE>. The reason for this is that the ``EN'' in the DOCTYPE tag does not specify the language used in the document, but the language used in the DTD definition. The language used in the document is then specified in the <HTML> tag as described above.

Adjust the links (top)

You need to adjust the links to other pages! Some of the pages linked to from this page may have been translated, in which case the relative URL should be just fine. However, if the link has not been translated yet, we need to direct the user to the english original. Be careful when adjusting the links, particularly to pages in the same directory that have not been translated yet. For example, if you are in the directory /home/you/htdocs/<lang>/foo and the page contains a link to ../bar/baz.html, you will need to change it to ../../bar/baz.html. If the page contains a link to baz.html (that is, to a file in the current directory, which has not yet been translated), you need to change it to ../../foo/baz.html.

Images can easily be adjusted by simply prepending a ../ to the src="../images/foo.gif".

After you have translated a page it may be necessary to adjust the links to this page - as the page had not been translated before, other pages may still link to the english original. Change into the root directory of the German translation (/home/you/htdocs/<lang>/) and search through all files in this directory tree for links to your page and make the necessary adjustments. One not necessarily terribly efficient way of doing so would be grep -r "dir/doc.html" *

Include the original version (top)

Please always include a comment which explains which exact english version the document is based on. For example:
     $NetBSD: index.html,v 1.6 2002/07/02 21:05:59 jschauma Exp $<br>
     <!-- Based on english version:                                   -->
     <!--   NetBSD: index.html,v 1.611 2001/11/30 19:30:43 dent Exp $ -->
If you are familiar with CVS or RCS, you will recognize the format. NetBSD's CVS server has been configured to use the "$NetBSD: ... $" tag rather than the "$Id: $" tag, so that the proper revision number etc. are substituted when you commit the file - the second tag will remain untouched, as it is not prepended with the "$" sign. Obviously, it's important to remove the "$" from the original tag so that this will not be updated and it remains obvious upon which original version the document is based.

translate.sh (top)

Again, as mentioned above, some of these tasks are performed by the two scripts translate.sh and adjust.sed (which you can also copy over from /htdocs/de). You need to adjust the file adjust.sed to your language.

Example:

 $ ls <lang>
 adjust.sed
 $ cd <lang>/some/dir
 $ sh ../../../translate.sh <lang> ../../../some/dir/file.list

Guidelines and Caveats


The documents linked below discuss a few guidelines and caveats that are specific to a certain language. This generally includes phrases that are difficult to translate, ways to treat certain phrases and proper names, formats and the like.

Some words or phrases can not or should not always be translated. For example, legal phrases such as ``Copyright © 1994-2003 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.'' should only be translated if the correct and legally valid translation is known -- when in doubt, leave it in engish.

In general, if there is a name or a phrase that could not be translated and it is not a common english phrase used in your language, it should be left untranslated, but placed within a <cite lang="en"> or <em lang="en"> tag.


Submit your changes


After you have carefully evaluated your work and find it ready for the world to review, you need to commit the changes. There are two ways:

Creating a diff against CVS (top)

If you are working from within a directory that was originally checked out from anoncvs, and you have only modified files that already are in the CVS repository, then you can create a diff using the following commands:

 $ pwd
 /home/you/htdocs/<lang>/
 $ cvs update -dP
 $ cvs diff -bu > /tmp/htdocs.<lang>.diff

Creating a diff against another directory (top)

If you work from within a copy of the anoncvs tree, and/or if you added files that are not yet in the CVS repository, you can create a diff against a clean anoncvs directory. For example:
 $ ls
 htdocs    myhtdocs
 $ cd myhtdocs/<lang>/
 $ diff -burN -x *CVS* -I'\$NetBSD' ../../htdocs/<lang> . > /tmp/htdocs.<lang>.diff

Please see cvs(1) and http://www.cvshome.org for details of CVS. The generated patch can now be sent via email to either <www@NetBSD.org> or the Mailing-List <netbsd-docs-<lang>@cs.stevens-tech.edu>.

Done (top)

Congratulations, we're done. The changes submitted via email will be made available for review at http://netbsd.netmeister.org/<lang>/ soon after. Announce the changes you made to the mailing-list and other interested people and let them review your work (often, a second pair of eyes finds errors or phrases that slipped through your spellcheck). Finally, after the changes have been approved they will be commited to the original document-tree soon after, so that they show up under http://www.NetBSD.org/<lang>/.

NetBSD Home Page
NetBSD Developer Documentation

(Contact us) $NetBSD: translate.html,v 1.44 2004/03/03 16:35:49 jschauma Exp $
Copyright © 1996-2003 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.