This page describes precise methods to translate the LeActiveMath content.
See also other pages about translation.
The internationalization of ActiveMath is the result of the deliverable 13 of the LeActiveMath project which can give a good conceptual overview. We provide here detailed concrete instructions.
We wish review of the München team for this page
We centralize the work on a subversion repository. For this purpose the LeAM-calculus subversion repository has been opened, http://svn.activemath.org/LeAM-calculus/LeAM_calculus/ This directory needs to be checked out in the contents directory.
For now, so as to avoid text-merge conflicts, we would have wished
to make use of the svn lock function so that as to ensure
to be alone at work on this file. However, this breaks because of a too old version.
This means that currently translators may, at time of committing their translation,
encounter a lack of up-to-dateness followed by a conflict at update indicating
that svn could not merge your local changes with changes of others.
This will leave visible trace in the source files, in the form of “<<<”, “===”, and “>>>” lines
which need to be removed,
inferring correctly how to mix the conflicting updates.
Each translator runs its own ActiveMath, in its own language, and checks the translations on his own machine. Please avoid comitting files that have errors in it or that you cannot preview. Ask for assistance instead.
In order to obtain comitter-rights for this repository, please register (or re-enter password) on eds.activemath.org and drop me a mail which will enable me to copy your credential to the repository.
In order to test completely, one needs to start translating ActiveMath,
at least adding this language as a choice
(mostly, a change in the ActiveMath.properties).
Explanations for this are in webapps/ActiveMath/i18n/I18n-Readme.txt.
Once logged in and having chosen the new language, the content should appear.
Further refinements of the translation of ActiveMath will be indicated, in particular wrt
to mathematical notations and the names of mathematical symbols (work on
the OMDoc files in omdoc1/cd).
The OQMath files of LeAM_calculus are more or less OMDoc files, and obey its DTD, modifications to the files should be made according to the DTD, jEditOQMath or another XML editing tool will provide you indication when the file is not well-formed or DTD-valid.
OMDoc allows each containers of text to be annotated with an xml:lang
attribute indicating the language encoded according to (ISO-693-2, currently only the two letter form as per XML spec).
OMDoc allows these elements to be repeated in one or different languages.
ActiveMath will try to find a compatible language within the list of available languages.
An exception to this list is the usage of the language x-all which indicates
that the given fragment is considered multi-language.
Elements that can contain text in particular languages include:
CMP elements, children of each items and exercise nodes, supposed to contain the textTitle elements, children of the metadata elements, representing
the title of an item or a nodecommonname elements, children of the symbol elements,
representing the ‘short name’ of the symbolThese elements have the ‘CMP model’ which means a mix of plain-text, mathematical formulae and a few elements which, themselves have the same model, but not carrying a language attribute anymore. The whole content should be translated. A menu-item in jEditOQMath is being worked on to add all these elements needing to be translated.
Do note that the mathematical formulæ,
generally enclosed betweeen two dollar signs as in $gcd(6,4)$,
are considered multinational which means that the formulae should not be changed
but should be copied.
Translation of the formulae presentation is, mostly, an advanced topic of the ActiveMath
translation. Indeed, the expression above will be presented as as ggT(6,4) in German,
similarly, $3.14159$ is input as such but is
presented as 3,14159 is several european languages.
Once translated, saved, and validated, the proofing work can start.
Translators are expected to request the OQMath compilation and the remaining
publishing routines as run by the collection’s build.xml then
to proof the result by previewing in ActiveMath. These previews should be done
in at least the HTML, XHTML+MathML, and PDF medias.
Once ready, a commit of the OQMath and OMDoc files followed by an unlock can be done.
ActiveMath also internationalizes the delivery of pictures and other static resources.
When it receives a request for a given resource,
ActiveMath will look into the file-system whether translations of this resource exist.
A file, say file.png, is considered to be translated if variants postfixed with a
language code exist, e.g. this picture would be considered translated to French if the file
file_fr.png exists.
If there is no translation, i.e. only file.png exists,
it will simply serve the file’s content;
if there are translations it will take in account the user’s language,
as defined in its profile, the surrounding language (e.g. of a containing item),
the browser’s language, or the default language of the server.
It is the decision of the translator to consider the requirement to translate a picture or not.
The applets of LeActiveMath-calculus are internationalized using the simple properties file mechanism. Each applet embedding, in the content, transmits the surrounding language to the applet, hence it is important that the language of the user is a supported language of the applet.
In order to translate applets, similarly to the ActiveMath translation, one needs to duplicate the properties files to files with appropriate names and translate each of the phrases there.
The properties files of the applets are split in a few phrases packs, named
from LeAM_applet_xx_1.properties to LeAM_applet_xx_4.properties
and are stored in the directory applets_src/properties.
For example, if introducing hungarian, one needs to create files
LeAM_applets_hu_1.properties
(and similarly with 2,3, and 4) in applets_src/properties/ as a copy of the source
of translation then translate the messages.
To preview these applets, the applet java-archives need to be re-generated
running the JarApplets target of build.xml in the root directory
of the collection.
Since browsers perfrom very strong caching of applets’ code it is important to restart the browser
then empty cache for each test of the applets. Or to use the appletviewer tool.
Once your previews appear satisfactory, it would be wise to cut a snapshot of it and feed-it
as part of the directory applets/snapshot/. This picture wil be within the pages
and within the print version instead of the applets which are only shown in a new window when
clicked.
For example the applet Trig_funct_Circle, used and declard in
trigonometry.oqmath
has an associated snapshot
applets/snapshot/Trig_funct_Circle.png for English and has translations
applets/snapshot/Trig_funct_Circle.png,
applets/snapshot/Trig_funct_Circle_de.png, and
applets/snapshot/Trig_funct_Circle_zh.png.