mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-14 23:36:27 -04:00
added some comments
This commit is contained in:
parent
fd75a46a02
commit
b7df62895c
@ -2,16 +2,21 @@
|
|||||||
<!--
|
<!--
|
||||||
To add a new language, you can add the language to this file.
|
To add a new language, you can add the language to this file.
|
||||||
Use the name of the language in that language.
|
Use the name of the language in that language.
|
||||||
Then copy the English language file "lang_en.xml", rename
|
Then make a copy of the English language file "lang_en.xml"
|
||||||
it and translate it into the new language.
|
and rename it to "lang_xx_ref.xml". Then create a second
|
||||||
|
copy and rename it to "lang_xx.xml". Then translate the
|
||||||
|
latter file into the new language.
|
||||||
|
|
||||||
|
The file "lang_xx_ref.xml" helps me to keep track of future
|
||||||
|
changes to the language files.
|
||||||
|
|
||||||
If you also want to translate the static part of the documentation,
|
If you also want to translate the static part of the documentation,
|
||||||
you have to translate one of the files "static_xx.xml" from the
|
you have to translate one of the files "static_xx.xml" from the
|
||||||
folder "src/test/Resources/Docu".
|
folder "src/test/Resources/Docu".
|
||||||
|
|
||||||
If you are satisfied with the translation, please send me the
|
If you are satisfied with the translation, please send me the
|
||||||
translated version AND the file "lang_en.xml" you used for the
|
translated version AND the file "lang_xx_ref.xml" you used for the
|
||||||
translation! Both files are required to keep track of changes.
|
translation!
|
||||||
-->
|
-->
|
||||||
<languages>
|
<languages>
|
||||||
<lang name="en">English</lang>
|
<lang name="en">English</lang>
|
||||||
|
@ -15,6 +15,7 @@ import java.io.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Checks the language files to make sure they a consistent.
|
||||||
*/
|
*/
|
||||||
public class TestLang extends TestCase {
|
public class TestLang extends TestCase {
|
||||||
private static final String SOURCEPATH = "/home/hneemann/Dokumente/Java/digital/src/main/java";
|
private static final String SOURCEPATH = "/home/hneemann/Dokumente/Java/digital/src/main/java";
|
||||||
@ -42,7 +43,7 @@ public class TestLang extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds usages of keys which are not present in the language xml files
|
* Finds usages of keys in the code which are not present in the language xml files
|
||||||
*
|
*
|
||||||
* @throws IOException IOException
|
* @throws IOException IOException
|
||||||
*/
|
*/
|
||||||
@ -70,6 +71,10 @@ public class TestLang extends TestCase {
|
|||||||
fail("there are unused language keys: " + sb.toString());
|
fail("there are unused language keys: " + sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outputs all missing or modified language keys in languages which are not
|
||||||
|
* forced to be complete. (all languages except de and en)
|
||||||
|
*/
|
||||||
public void testAdditionalLanguages() {
|
public void testAdditionalLanguages() {
|
||||||
de.neemann.gui.language.Resources master = bundle.getResources("en");
|
de.neemann.gui.language.Resources master = bundle.getResources("en");
|
||||||
for (Language l : bundle.getSupportedLanguages()) {
|
for (Language l : bundle.getSupportedLanguages()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user