This document is a guide for the file style which is used in Project Looking Glass Japanese Translation subproject.
Translated files should be located in lg3d-core/www/<language name>. The <language name> is 2 letter language codes which is defined in ISO-639. For precise information, see http://www.w3.org/WAI/ER/IG/ert/iso639.htm.
Basically tree structure of English document under lg3d-core/www is duplicated under this directory. So you can also translate image files. Note that there is a few exception which you should not translate (e.g. License file etc.)
Use the same file name as the original document.
File format should be XHTML 1.0. Don't write documents in HTML. On CollabNet which hosts LG3D project, all response is returned in XHTML.
XHTML 1.0 DOCTYPE definition which CollabNet uses is:
<!DOCTYPE html PUBLIC "-//Tigris//DTD XHTML 1.0 Transitional//EN" "http://style.tigris.org/tigris_transitional.dtd"> |
You should add this declaration to the beginning of your translation. Basically, most of english documents have already had it and there is no need to add it.
Encode your translation in UTF-8. The CollabNet system which is used in java.net returns HTTP responses in UTF-8 and display problem may occur with other character encoding.
For preview on your local file system, the following META element is used for specifying charset:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
It should be placed in <head> ... </head>
Use LF (0x0A) for line separators, even on Windows or MacOS.
Don't use HTML editors to prevent XHTML files from unexpected modifications or redundant XHTML elements. It is suitable to use a text editor.
In future times, we will consider the use of a HTML editor if we will be able to confirm that there is no problem in it. And we have a plan to develop a plug-in for IDE (e.g. Eclipse etc.) to support translation works.
For the preview on your local file system, you can use the following stylesheet in order to get the same look as it on java.net:
<style type="text/css"> /* <![CDATA[ */ @import "preview.css"; /* ]]> */</style> |
On the CollabNet system, this declaration is removed and other stylesheets are used.
Note: This example assumes that your translation file is located in lg3d-core/www/ja. If you locate it in anothor directory, you should change the location by using relative URI.
It should be placed in <head> ... </head>. And "preview.css" is located in lg3d-core/www/ja directory on CVS, you can download and use it.
Write URIs under https://lg3d-core.dev.java.net/ in relative URI to reduce maintenance costs in rewrite them.
Note: Original English documents should be written in the same way.
To avoid HTTP 404 error (i.e. Not found), you can use the following dummy page to redirect it to the original document:
<meta http-equiv="Refresh" content="1; URL=https://lg3d-core.dev.java.net/foo.html" /> |
A Translator name are written in the following META element:
<meta name="Translator" content="Yuichi SAKURABA" /> |
It should be placed in <head> ... </head>.
You should include only translated sentences in your files but not original sentences. It means that we don't include multiple language sentences in a file.
We have a plan to display an original document and its translation in the same page for proofreading.
When you commit your translation to CVS for the first time, you should reset CVS revision number and add the original revision number in the following format:
$Revision: 1.1 $ $Date: 2004/10/21 08:02:47 $ (English Version Revision: x.y) |
This shows whether it is the newest translation or not and it helps other translator to update existing translation by using CVS diff on CollabNet.
Note: When you updates a translation, update its original's revision number by hand.
Write commit messages to CVS in English. The reason is:
LG3D documentations are written in XHTML. And they should be validated before committing them to CVS. For example, you can use W3C Markup Validation Service.
$Revision: 1.1 $ $Date: 2004/10/21 08:02:47 $ (Japanese Version Revision: 1.2)