|
Contribute
|
There are a couple of ways you can contribute to jVLT.
Patches
If there is a feature you are missing and you know how to program in JAVA, you
could implement the feature yourself and send me a patch. Check the
download page for the latest source release
or check out the most recent source code from
CVS.
Language details files
jVLT allows to specify language-specific details, like gender, declension,
etc. You can find out which languages are supported by opening the properties
dialog (Edit -> Properties). You can add files for additional languages
by following these steps:
- Download the source code tarball and unpack it.
- Create a new language details file in the data directory. The name of the
file has the format details_LANGUAGE.xml, where LANGUAGE is the English name
of the language in lower-case letters.
- Edit the new language file. Word classes can be specified via the
<class> tag, attributes via the <attribute> tag. You can use the
German details file shown below as a template. It is recommended to use only
lower-case letters and numbers for the class and attribute names, the names
which are actually shown can be entered in the file i18n/Attributes.properties
(see below).
- Edit the file i18n/Attributes.properties, section "Language specific
attributes", and add the English translation of the class/attribute names.
- Compile jVLT according to the instructions on the
download page.
German details file:
<schema lang="german">
<class name="noun"/>
<class name="verb"/>
<class name="adjective"/>
<class name="adverb"/>
<attribute name="gender" classes="noun">
<choice name="feminine"/>
<choice name="masculine"/>
<choice name="neuter"/>
</attribute>
<attribute name="gensi" classes="noun" group="declension"/>
<attribute name="nompl" classes="noun" group="declension"/>
<attribute name="pret1" classes="verb" group="conjugation"/>
<attribute name="pastp" classes="verb" group="conjugation"/>
</schema>
Translations
Currently, there are two translations for jVLT: English and German.
While the German translation should be OK (I am a native German speaker), the
English one probably is not. If you find spelling errors or weird expressions,
please notify me.
You can also translate jVLT to a new language. Below, the steps to add a
new language are described.
- Download the source code release and unpack it.
- Edit the file ResourceBundleUtils.java in the i18n directory. Find the
line that looks like
String[] languages = new String[]{ "de_DE" };
and add the new locate. For example, if you want to add the French language,
the line would be changed to
String[] languages = new String[]{ "de_DE", "fr_FR" };
- Compile the file ResourceBundleUtils.java using a JAVA compiler and
run the resulting program. This can be done as follows:
$ javac ResourceBundleUtils.java
$ java ResourceBundleUtils
There should be three new files Actions_LOCALE.properties,
Labels_LOCALE.properties and Messages_LOCALE.properties, where LOCALE denotes
the new locale (e.g. fr_FR).
- The newly created files contain lines that look like
% key = Translation
Uncomment them by removing the "%" character and replace the
"Translation" string by a new string in your language. Note that the
files have to be formatted in UTF-8 which may not be supported by all text
editors.
-
Find the lines in the file src/JVLT.java that look similar to the lines
given below:
private static Locale[] _locales = {
Locale.US, Locale.GERMANY };
and change them in the following manner:
private static Locale[] _locales = {
Locale.US, Locale.GERMANY, new Locale("fr", "FR") };
Or like this (without the country information):
private static Locale[] _locales = {
Locale.US, Locale.GERMANY, new Locale("fr", "FR") };
- Compile jVLT according to the instructions on the
download page.
You could also ask the author to create the translation files for you.
Documentation
jVLT currently is only documented in English. There are probably a lot of
spelling and style errors in the documentation.
If you like you can correct some of them
and send them to me.
You can also contact me in case you want to add documentation in another
language.
Dictionaries
If you have created a dictionary which you think might me useful to others,
you could send it to me. I will then make it available on the
download page. You could also add new words
and examples to the existing sample files.
Bug reports
If you find a bug, you can report it
on the project page.
|