jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1647368 - /jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java
Date Mon, 22 Dec 2014 18:36:45 GMT
Author: sebb
Date: Mon Dec 22 18:36:44 2014
New Revision: 1647368

URL: http://svn.apache.org/r1647368
Log:
Improve check for strings that don't need translation

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java?rev=1647368&r1=1647367&r2=1647368&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/resources/PackageTest.java Mon Dec 22 18:36:44
2014
@@ -368,14 +368,20 @@ public class PackageTest extends TestCas
         for (Iterator<Map.Entry<Object,Object>> iterator =  messages.entrySet().iterator();
iterator.hasNext();) {
             Map.Entry<Object,Object> entry = iterator.next();
             String key = (String)entry.getKey();
+            final String I18NString = "[\\d% ]+";// numeric, space and % don't need translation
             if(!messagesFr.containsKey(key)) {
                 String value = (String) entry.getValue();
                 // TODO improve check of values that don't need translation
-                if (value.matches("[\\d%]+")) {// numeric and % don't need translation
-                    System.out.println("Ignoring missing "+key+"="+value+" in "+languageBundle);
// TODO convert to list and display at end
+                if (value.matches(I18NString)) {
+                    // System.out.println("Ignoring missing "+key+"="+value+" in "+languageBundle);
// TODO convert to list and display at end
                 } else {
                     missingLabels.put(key,(String) entry.getValue());
                 }
+            } else {
+                String value = (String) entry.getValue();
+                if (value.matches(I18NString)) {
+                    System.out.println("Unnecessary entry "+key+"="+value+" in "+languageBundle);
+                }
             }
         }
         if(!missingLabels.isEmpty()) {



Mime
View raw message