added some comments

This commit is contained in:
hneemann 2019-02-02 15:19:49 +01:00
parent fd75a46a02
commit b7df62895c
2 changed files with 15 additions and 5 deletions

View File

@ -2,16 +2,21 @@
<!--
To add a new language, you can add the language to this file.
Use the name of the language in that language.
Then copy the English language file "lang_en.xml", rename
it and translate it into the new language.
Then make a copy of the English language file "lang_en.xml"
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,
you have to translate one of the files "static_xx.xml" from the
folder "src/test/Resources/Docu".
If you are satisfied with the translation, please send me the
translated version AND the file "lang_en.xml" you used for the
translation! Both files are required to keep track of changes.
translated version AND the file "lang_xx_ref.xml" you used for the
translation!
-->
<languages>
<lang name="en">English</lang>

View File

@ -15,6 +15,7 @@ import java.io.*;
import java.util.*;
/**
* Checks the language files to make sure they a consistent.
*/
public class TestLang extends TestCase {
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
*/
@ -70,6 +71,10 @@ public class TestLang extends TestCase {
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() {
de.neemann.gui.language.Resources master = bundle.getResources("en");
for (Language l : bundle.getSupportedLanguages()) {