[rfc][icedtea-web] fixed locales and unittest for them

Adam Domurad adomurad at redhat.com
Wed Jan 30 07:29:46 PST 2013


On 01/29/2013 08:21 AM, Jiri Vanek wrote:
> With (maybe!) possible another localisation of ITW i have synced our 
> current locales and added unittest to cough inconsistent states - 
> empty keys, same values in translations (with exceptions), missing 
> translations and especially redundant translations.
>
>
> J.

You are on your honour to not be swearing at the user in Czech :-)

> diff -r 74a70e0b15ef 
> netx/net/sourceforge/jnlp/resources/Messages.properties
> --- a/netx/net/sourceforge/jnlp/resources/Messages.properties  Mon Jan 
> 28 11:38:34 2013 -0500
> +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties  Tue Jan 
> 29 14:14:11 2013 +0100
> @@ -51,11 +51,11 @@
>  LNullUpdatePolicy=Update policy cannot be null.
>
>  LThreadInterrupted=Thread interrupted while waiting for file to launch.
> -LThreadInterruptedInfo=
> +LThreadInterruptedInfo=This can lead to deadlock or corrupted run, 
> please restart your application/browser
>  LCouldNotLaunch=Could not launch JNLP file.
> -LCouldNotLaunchInfo=
> +LCouldNotLaunchInfo=Application was not initialize, for more 
> information execute javaws/browser from commandline and sent bugreport
>  LCantRead=Could not read or parse the JNLP file.
> -LCantReadInfo=
> +LCantReadInfo=You can try to download this file manually and send it 
> as bugreport to IcedTea-Web team

Nit:     s/bugreport/a bug report/
Adding a period may be more consistent ?

>  LNullLocation=Could not determine .jnlp file location.
>  LNullLocationInfo=An attempt was made to launch a JNLP file in 
> another JVM, but the file could not be located.  In order to launch in 
> an external JVM, the runtime must be able to locate the .jnlp file 
> either in the local filesystem or on a server.
>  LNetxJarMissing=Could not determine location of netx.jar.
> @@ -69,9 +69,9 @@
>  LNoInstallers=Installers not supported.
>  LNoInstallersInfo=JNLP installer files are not yet supported.
>  LInitApplet=Could not initialize applet.
> -LInitAppletInfo=
> +LInitAppletInfo=For ore information click "more information button"
>  LInitApplication=Could not initialize application.
> -LInitApplicationInfo=
> +LInitApplicationInfo=Application was not initialize, for more 
> information execute javaws from commandline

s/initialize/initialized/
Adding a period may be more consistent ?

>  LNotLaunchable=Not a launchable JNLP file.
>  LNotLaunchableInfo=File must be a JNLP application, applet, or 
> installer type.
>  LCantDetermineMainClass=Unknown Main-Class.
> @@ -96,7 +96,7 @@
>  LNotVerified=Jars not verified.
>  LCancelOnUserRequest=Canceled on user request.
>  LFatalVerification=A fatal error occurred while trying to verify jars.
> -LFatalVerificationInfo=
> +LFatalVerificationInfo=We caught an Exception from the 
> JarCertVerifier class. One of these exceptions could be from not being 
> able to read the cacerts or trusted.certs files.
>
>  LNotVerifiedDialog=Not all jars could be verified.
>  LAskToContinue=Would you still like to continue running this application?
> diff -r 74a70e0b15ef 
> netx/net/sourceforge/jnlp/resources/Messages_cs_CZ.properties
> --- a/netx/net/sourceforge/jnlp/resources/Messages_cs_CZ.properties 
>  Mon Jan 28 11:38:34 2013 -0500
> +++ b/netx/net/sourceforge/jnlp/resources/Messages_cs_CZ.properties 
>  Tue Jan 29 14:14:11 2013 +0100
> @@ -51,11 +51,11 @@
>  LNullUpdatePolicy=Pravidla pro aktualizaci nesm\u00ed b\u00fdt 
> pr\u00e1zdn\u00e1.
>
>  LThreadInterrupted=Vl\u00e1kno bylo p\u0159eru\u0161eno p\u0159i 
> \u010dek\u00e1n\u00ed na spu\u0161t\u011bn\u00ed souboru.
> -LThreadInterruptedInfo=
> +LThreadInterruptedInfo=Toto m\u016f\u017ee v\u00e1st k zamrznut\u00ed 
> nebo nedefinovan\u00e9mu chov\u00e1n\u00ed chov\u00e1n\u00ed aplikace. 
> Restartuje apliakci/prohl\u00ed\u017ee\u010d.
>  LCouldNotLaunch=Nelze spustit soubor JNLP.
> -LCouldNotLaunchInfo=
> +LCouldNotLaunchInfo=Apliakce nebyla inicializov\u00e1na, pro 
> v\u00edce informac\u00ed spus\u0165te javaws/prohl\u00ed\u017ee\u010d 
> z p\u0159\u00edkazov\u00e9 \u0159\u00e1dky a za\u0161lete n\u00e1m 
> chybovou zpr\u00e1vu
>  LCantRead=Nelze \u010d\u00edst nebo analyzovat soubor JNLP.
> -LCantReadInfo=
> +LCantReadInfo=Zkuste tento JNLP soubor st\u00e1hnout ru\u010dn\u011b, 
> a posalt z\u00e1rove\u0148 s hl\u00e1\u0161en\u00edm chyby t\u00fdmu 
> IcedTea-Web
>  LNullLocation=Nelze ur\u010dit um\u00edst\u011bn\u00ed souboru JNLP.
>  LNullLocationInfo=Byl u\u010din\u011bn pokus o 
> spu\u0161t\u011bn\u00ed souboru JNLP v jin\u00e9m prost\u0159ed\u00ed 
> JVM, av\u0161ak soubor nebyl nalezen. Chcete-li spustit extern\u00ed 
> prost\u0159ed\u00ed JVM, modul runtime mus\u00ed b\u00fdt schopen 
> nal\u00e9zt soubor .jnlp v lok\u00e1ln\u00edm souborov\u00e9m 
> syst\u00e9mu nebo na serveru.
>  LNetxJarMissing=Nelze ur\u010dit um\u00edst\u011bn\u00ed souboru 
> netx.jar.
> @@ -69,15 +69,17 @@
>  LNoInstallers=Instal\u00e1tory nejsou podporov\u00e1ny.
>  LNoInstallersInfo=Instal\u00e1tory JNLP je\u0161t\u011b nejsou 
> podporov\u00e1ny.
>  LInitApplet=Nelze inicializovat applet.
> -LInitAppletInfo=
> +LInitAppletInfo=Pro v\u00edce informac\u00ed klikn\u011bte na 
> tla\u010d\u00edtko pro v\u00edce informac\u00ed\

Adding a period may be more consistent ?

>  LInitApplication=Nelze inicializovat aplikaci.
> -LInitApplicationInfo=
> +LInitApplicationInfo=Apliakce nebyla inicializov\u00e1na, pro 
> v\u00edce informac\u00ed spus\u0165te javaws z 
> p\u0159\u00edkazov\u00e9 \u0159\u00e1dky

Adding a period may be more consistent ?

>  LNotLaunchable=Nejedn\u00e1 se o spustiteln\u00fd soubor JNLP.
>  LNotLaunchableInfo=Soubor mus\u00ed b\u00fdt aplikac\u00ed, appletem 
> nebo instal\u00e1torem JNLP.
>  LCantDetermineMainClass=Nezn\u00e1m\u00e1 t\u0159\u00edda Main-Class.
>  LCantDetermineMainClassInfo=Nelze ur\u010dit t\u0159\u00eddu main 
> class pro tuto aplikaci.
>  LUnsignedJarWithSecurity=Nelze ud\u011blit opr\u00e1vn\u011bn\u00ed 
> nepodepsan\u00fdm soubor\u016fm JAR.
>  LUnsignedJarWithSecurityInfo=Aplikace po\u017e\u00e1dala o 
> bezpe\u010dnostn\u00ed opr\u00e1vn\u011bn\u00ed, av\u0161ak soubory 
> JAR nejsou podeps\u00e1ny.
> +LSignedJNLPAppDifferentCerts=JNLP aplikace nen\u00ed pln\u011b 
> podeps\u00e1na jedin\u00fdm cectifik\u00e1tem
> +LSignedJNLPAppDifferentCertsInfo=JNLP aplikace m\u00e1 podeps\u00e1ny 
> v\u0161echny komponenty, ale jednotliv\u00e9 certifik\u00e1ty se 
> li\u0161\u00ed.
>  LSignedAppJarUsingUnsignedJar=Podepsan\u00e1 aplikace 
> pou\u017e\u00edvaj\u00edc\u00ed nepodepsan\u00e9 soubory JAR.
>  LSignedAppJarUsingUnsignedJarInfo=Hlavn\u00ed soubor JAR aplikace je 
> podepsan\u00fd, av\u0161ak n\u011bkter\u00e9 z dal\u0161\u00edch 
> pou\u017e\u00edvan\u00fdch soubor\u016f JAR nejsou podeps\u00e1ny.
>  LSignedJNLPFileDidNotMatch=Podepsan\u00fd soubor JNLP se neshoduje se 
> spou\u0161t\u011bn\u00fdm souborem JNLP.
> @@ -94,7 +96,7 @@
>  LNotVerified=Soubory JAR nebyly ov\u011b\u0159eny.
>  LCancelOnUserRequest=Zru\u0161eno u\u017eivatelem.
>  LFatalVerification=P\u0159i ov\u011b\u0159ov\u00e1n\u00ed 
> soubor\u016f JAR do\u0161lo k z\u00e1va\u017en\u00e9 chyb\u011b.
> -LFatalVerificationInfo=
> +LFatalVerificationInfo=Byla odchycena v\u00fdjimka z mechanismu 
> ov\u011b\u0159ov\u00e1n\u00ed certifik\u00e1t\u016f. Mo\u017en\u00fd 
> zdroj m\u016f\u017ee b\u00fdt nemo\u017enost p\u0159e\u010d\u00edst 
> cacerts nebi trusted.certs soubory.
>
>  LNotVerifiedDialog=Nemohly b\u00fdt ov\u011b\u0159eny v\u0161echny 
> soubory JAR.
>  LAskToContinue=Chcete p\u0159esto pokra\u010dovat ve 
> spou\u0161t\u011bn\u00ed t\u00e9to aplikace?
> @@ -228,7 +230,6 @@
>  SBadKeyUsage=Zdroj obsahuje polo\u017eky, u nich\u017e 
> roz\u0161\u00ed\u0159en\u00ed pou\u017eit\u00ed kl\u00ed\u010de 
> KeyUsage certifik\u00e1tu podepisovatele nedovoluje 
> podeps\u00e1n\u00ed k\u00f3du.
>  SBadExtendedKeyUsage=Zdroj obsahuje polo\u017eky, u nich\u017e 
> roz\u0161\u00ed\u0159en\u00ed pou\u017eit\u00ed kl\u00ed\u010de 
> ExtendedKeyUsage certifik\u00e1tu podepisovatele nedovoluje 
> podeps\u00e1n\u00ed k\u00f3du.
>  SBadNetscapeCertType=Zdroj obsahuje polo\u017eky, u nich\u017e 
> roz\u0161\u00ed\u0159en\u00ed pou\u017eit\u00ed kl\u00ed\u010de 
> NetscapeCertType certifik\u00e1tu podepisovatele nedovoluje 
> podeps\u00e1n\u00ed k\u00f3du.
> -SHasUnsignedEntry=Zdroje obsahuj\u00ed nepodepsan\u00e9 polo\u017eky, 
> jejich\u017e integrita nebyla zkontrolov\u00e1na.
>  SHasExpiredCert=Platnost digit\u00e1ln\u00edho podpisu vypr\u0161ela.
>  SHasExpiringCert=Zdroje obsahuj\u00ed polo\u017eky, u nich\u017e 
> vypr\u0161\u00ed platnost certifik\u00e1tu jejich podepisovatele do 
> \u0161esti m\u011bs\u00edc\u016f.
>  SNotYetValidCert=Zdroje obsahuj\u00ed polo\u017eky, u nich\u017e 
> je\u0161t\u011b nen\u00ed platn\u00fd certifik\u00e1t podepisovatele.
> @@ -299,6 +300,7 @@
>  CPSecurityDescription=Konfigurace nastaven\u00ed zabezpe\u010den\u00ed
>  CPDebuggingDescription=Zapnut\u00ed mo\u017enost\u00ed 
> pom\u00e1haj\u00edc\u00edch p\u0159i lad\u011bn\u00ed
>  CPDesktopIntegrationDescription=Nastaven\u00ed, zda m\u00e1 b\u00fdt 
> povoleno vytvo\u0159en\u00ed z\u00e1stupce na plo\u0161e
> +CPJVMPluginArguments = Nastavit argumenty JVM pro plugin.
>
>  # Control Panel - Buttons
>  CPButAbout=O aplikaci IcedTea-Web
> @@ -317,6 +319,7 @@
>  CPHeadDebugging=Nastaven\u00ed lad\u011bn\u00ed
>  CPHeadDesktopIntegration=Integrace s pracovn\u00ed plochou
>  CPHeadSecurity=Nastaven\u00ed zabezpe\u010den\u00ed
> +CPHeadJVMSettings=Nastaven\u00ed JVM
>
>  # Control Panel - Tabs
>  CPTabAbout=O aplikaci IcedTea-Web
> @@ -328,6 +331,7 @@
>  CPTabNetwork=S\u00ed\u0165
>  CPTabRuntimes=Moduly runtime
>  CPTabSecurity=Zabezpe\u010den\u00ed
> +CPTabJVMSettings=Nastaven\u00ed JVM
>
>  # Control Panel - AboutPanel
>  CPAboutInfo=Toto je ovl\u00e1dac\u00ed panel 
> umo\u017e\u0148uj\u00edc\u00ed nastavit 
> deployment.properties.<br/>Dokud nebudou implementov\u00e1ny 
> v\u0161echny funkce, n\u011bkter\u00e9 z nich nebudou 
> \u00fa\u010dinn\u00e9.<br/>V sou\u010dasnosti nen\u00ed 
> podporov\u00e1no pou\u017e\u00edv\u00e1n\u00ed v\u00edce 
> prost\u0159ed\u00ed JRE.<br/>
> diff -r 74a70e0b15ef 
> tests/netx/unit/net/sourceforge/jnlp/resources/MessagesPropertiesTest.java
> --- /dev/null    Thu Jan 01 00:00:00 1970 +0000
> +++ 
> b/tests/netx/unit/net/sourceforge/jnlp/resources/MessagesPropertiesTest.java 
>  Tue Jan 29 14:14:11 2013 +0100
> @@ -0,0 +1,245 @@
> +/* Copyright (C) 2012 Red Hat, Inc.
> +
> + This file is part of IcedTea.
> +
> + IcedTea is free software; you can redistribute it and/or modify
> + it under the terms of the GNU General Public License as published by
> + the Free Software Foundation; either version 2, or (at your option)
> + any later version.
> +
> + IcedTea is distributed in the hope that it will be useful, but
> + WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + General Public License for more details.
> +
> + You should have received a copy of the GNU General Public License
> + along with IcedTea; see the file COPYING.  If not, write to the
> + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
> Boston, MA
> + 02110-1301 USA.
> +
> + Linking this library statically or dynamically with other modules is
> + making a combined work based on this library.  Thus, the terms and
> + conditions of the GNU General Public License cover the whole
> + combination.
> +
> + As a special exception, the copyright holders of this library give you
> + permission to link this library with independent modules to produce an
> + executable, regardless of the license terms of these independent
> + modules, and to copy and distribute the resulting executable under
> + terms of your choice, provided that you also meet, for each linked
> + independent module, the terms and conditions of the license of that
> + module.  An independent module is a module which is not derived from
> + or based on this library.  If you modify this library, you may extend
> + this exception to your version of the library, but you are not
> + obligated to do so.  If you do not wish to do so, delete this
> + exception statement from your version. */
> +package net.sourceforge.jnlp.resources;
> +
> +import java.util.ArrayList;
> +import java.util.Enumeration;
> +import java.util.List;
> +import java.util.Locale;
> +import java.util.MissingResourceException;
> +import java.util.ResourceBundle;
> +import net.sourceforge.jnlp.ServerAccess;
> +import net.sourceforge.jnlp.annotations.KnownToFail;
> +import static org.junit.Assert.assertNotNull;
> +import static org.junit.Assert.assertTrue;
> +import org.junit.BeforeClass;
> +import org.junit.Test;
> +
> +public class MessagesPropertiesTest {
> +
> +    public static final String mainFile = "Messages";
> +    public static final String[] secondaryCountries = new String[]{"cs"};
> +    public static final String[] secondaryLanguages = new String[]{"CZ"};
> +    public static ResourceBundle main;
> +    public static ResourceBundle[] secondary = new 
> ResourceBundle[secondaryCountries.length];
> +
> +    @BeforeClass
> +    public static void loadResourceBoundels() {
> +        assertTrue("lenght of countries and languages must be same", 
> secondaryCountries.length == secondaryLanguages.length);

s/lenght/length/

> +        //get default by non existing language and country
> +        main = 
> ResourceBundle.getBundle("net.sourceforge.jnlp.resources." + mainFile, 
> new Locale("dfgdfg", "gvff"));
> +        secondary = new ResourceBundle[secondaryCountries.length];
> +        assertNotNull(main);
> +        for (int i = 0; i < secondaryCountries.length; i++) {
> +            String country = secondaryCountries[i];
> +            String language = secondaryLanguages[i];
> +            secondary[i] = 
> ResourceBundle.getBundle("net.sourceforge.jnlp.resources." + mainFile, 
> new Locale(country, language));
> +            assertNotNull(secondary[i]);
> +        }
> +    }
> +
> +    @Test
> +    public void allResourcesAreReallyDifferent() {
> +        List<String> ids = new ArrayList<String>(secondary.length + 1);
> +        ids.add("default");
> +        List<ResourceBundle> boundles = new 
> ArrayList<ResourceBundle>(secondary.length + 1);
> +        boundles.add(main);
> +        int errors = 0;
> +        for (int i = 0; i < secondaryCountries.length; i++) {
> +            String country = secondaryCountries[i];
> +            String language = secondaryLanguages[i];
> +            ids.add(country + "_" + language);
> +            boundles.add(secondary[i]);
> +
> +        }
> +        for (int i = 0; i < boundles.size(); i++) {
> +            ResourceBundle resourceBundle1 = boundles.get(i);
> +            String id1 = ids.get(i);
> +            Enumeration<String> keys1 = resourceBundle1.getKeys();
> +            for (int j = 0; j < boundles.size(); j++) {
> +                if (i == j) {
> +                    break;
> +                }
> +                ResourceBundle resourceBundle2 = boundles.get(j);
> +                String id2 = ids.get(j);
> +                outLog("Checking for same items between " + 
> resourceBundle1.getLocale() + " x " + resourceBundle2.getLocale() + " 
> (should be " + id1 + " x " + id2 + ")");
> +                errLog("Checking for same items between " + 
> resourceBundle1.getLocale() + " x " + resourceBundle2.getLocale() + " 
> (should be " + id1 + " x " + id2 + ")");
> +                int localErrors=0;
> +                while (keys1.hasMoreElements()) {
> +                    String key = (String) keys1.nextElement();
> +                    String val1 = 
> getMissingResourceAsEmpty(resourceBundle1, key);
> +                    String val2 = 
> getMissingResourceAsEmpty(resourceBundle2, key);
> +                    outLog("\""+val1+"\" x \""+val2);
> +                    if (val1.trim().equalsIgnoreCase(val2.trim())) {
> +                        if (val1.trim().length() <= 5 /*"ok", "", 
> ...*/ || val1.toLowerCase().contains("://") /*urls...*/) {
> +                            errLog("Warning! Items equals for: " + 
> key + " = " + val1 + " but are in allowed subset");
> +                        } else {
> +                            errors++;
> +                            localErrors++;
> +                            errLog("Error! Items equals for: " + key 
> + " = " + val1);
> +                        }
> +                    }
> +                }
> +                errLog(localErrors+" errors 
> allResourcesAreReallyDifferent fo "+id2+" x "+id1);
> +
> +            }
> +        }
> +        assertTrue("Several - " + errors + " - items are same in 
> boundles. See error logs for details", errors == 0);

s/boundles/bundles/
Eclipse has a spell-checker for comments + strings y'know :-D

> +    }
> +
> +    private String getMissingResourceAsEmpty(ResourceBundle res, 
> String key) {
> +        try {
> +            return res.getString(key);
> +        } catch (MissingResourceException ex) {
> +            return "";
> +        }
> +    }
> +
> +    @Test
> +    @KnownToFail//it is not critical that some localisations are 
> missing, however good to know

Reminder to remove this @KTF as we have discussed

> +    public void warnForNotLocalisedStrings() {
> +        int errors = 0;
> +        Enumeration<String> keys = main.getKeys();
> +        for (int i = 0; i < secondary.length; i++) {
> +            int localErrors = 0;
> +            ResourceBundle sec = secondary[i];
> +            String country = secondaryCountries[i];
> +            String language = secondaryLanguages[i];
> +            String id = country + "_" + language;
> +            outLog("Checking for missing  strings in " + 
> sec.getLocale() + " (should be " + id + ") compared with default");
> +            errLog("Checking for missing  strings in " + 
> sec.getLocale() + " (should be " + id + ") compared with default");
> +            while (keys.hasMoreElements()) {
> +                String key = (String) keys.nextElement();
> +                String val1 = getMissingResourceAsEmpty(main, key);
> +                String val2 = getMissingResourceAsEmpty(sec, key);
> +                outLog("\""+val1+"\" x \""+val2);
> +                if (val1.trim().isEmpty()) {
> +                } else {
> +                    if (val2.trim().isEmpty()){
> +                    errors++;
> +                    localErrors++;
> +                    errLog("Error! There is value for default: " + 
> key + ", but for " + id+" is missing");
> +                    }
> +
> +                }
> +            }
> +            errLog(localErrors+" warnForNotLocalisedStrings errors 
> for "+id);
> +
> +        }
> +        assertTrue("Several - " + errors + " - items have missing 
> localisations. See error logs for details", errors == 0);
> +    }
> +
> +
> +
> +    @Test
> +    public void noEmptyResources() {
> +        List<String> ids = new ArrayList<String>(secondary.length + 1);
> +        ids.add("default");
> +        List<ResourceBundle> boundles = new 
> ArrayList<ResourceBundle>(secondary.length + 1);
> +        boundles.add(main);
> +        int errors = 0;
> +        for (int i = 0; i < secondaryCountries.length; i++) {
> +            String country = secondaryCountries[i];
> +            String language = secondaryLanguages[i];
> +            ids.add(country + "_" + language);
> +            boundles.add(secondary[i]);
> +
> +        }
> +        for (int i = 0; i < boundles.size(); i++) {
> +            ResourceBundle resourceBundle = boundles.get(i);
> +            String id = ids.get(i);
> +            Enumeration<String> keys = resourceBundle.getKeys();
> +                outLog("Checking for empty items in " + 
> resourceBundle.getLocale() + "  (should be " + id + ")");
> +                errLog("Checking for empty items in " + 
> resourceBundle.getLocale() + "  (should be " + id + ")");
> +                int localErrors=0;
> +                while (keys.hasMoreElements()) {
> +                    String key = (String) keys.nextElement();
> +                    String val = 
> getMissingResourceAsEmpty(resourceBundle, key);
> +                    outLog("\""+key+"\" = \""+val);
> +                        if (val.trim().isEmpty()) {
> +                            errors++;
> +                            localErrors++;
> +                            errLog("Error! Key: " + key + " have no 
> vlue");
> +                        }
> +
> +                }
> +                errLog(localErrors+" noEmptyResources errors for "+id);
> +
> +        }
> +        assertTrue("Several - " + errors + " - items  have no 
> values", errors == 0);

Maybe a bit better is "Several items (" + errors + ")...

> +    }
> +
> +
> +    @Test
> +    public void findKeysWhichAreInLoclisedButNotInDefault() {

s/Loclised/Localised/

> +        int errors = 0;
> +        for (int i = 0; i < secondary.length; i++) {
> +            int localErrors = 0;
> +            ResourceBundle sec = secondary[i];
> +            Enumeration<String> keys = sec.getKeys();
> +            String country = secondaryCountries[i];
> +            String language = secondaryLanguages[i];
> +            String id = country + "_" + language;
> +            outLog("Checking for redundant keys in " + 
> sec.getLocale() + " (should be " + id + ") compared with default");
> +            errLog("Checking for redundant keys in " + 
> sec.getLocale() + " (should be " + id + ") compared with default");
> +            while (keys.hasMoreElements()) {
> +                String key = (String) keys.nextElement();
> +                String val2 = getMissingResourceAsEmpty(main, key);
> +                String val1 = getMissingResourceAsEmpty(sec, key);
> +                outLog("\""+val1+"\" x \""+val2);
> +                    if (val2.trim().isEmpty() && !val1.trim().isEmpty()){
> +                    errors++;
> +                    localErrors++;
> +                    errLog("Error! There is value for "+id+", key " + 
> key + ", but for default is missing");
> +                    }
> +
> +            }
> +            errLog(localErrors+" 
> findKeysWhichAreInLoclisedButNotInDefault errors for "+id);

s/Loclised/Localised/

> +
> +        }
> +        assertTrue("Several - " + errors + " - items  have value in 
> localised version but not in default one", errors == 0);
> +    }
> +
> +
> +
> +    private void errLog(String string) {
> +        ServerAccess.logErrorReprint(string);
> +    }
> +
> +    private void outLog(String string) {
> +        ServerAccess.logOutputReprint(string);
> +    }
> +}

OK for HEAD, fixes optional and can be done without repost (although 
typo fixes would be nice :-)
-Adam



More information about the distro-pkg-dev mailing list