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).
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>.
Name | 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 |
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.
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.
When using HTML entities such as ä
be careful: I usually tend to
forget the next letter, so that I type fü
instead of
fü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.
/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" *
$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.
Example:
$ ls <lang> adjust.sed $ cd <lang>/some/dir $ sh ../../../translate.sh <lang> ../../../some/dir/file.list
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.
$ pwd /home/you/htdocs/<lang>/ $ cvs update -dP $ cvs diff -bu > /tmp/htdocs.<lang>.diff
$ 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>.
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>/
.
|
|