jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Support "language" in user.properties?
Date Sun, 14 Oct 2012 13:54:09 GMT
Currently the language property is not supported in user.properties, 
because the locale gets initialized before user.properties is read. I 
guess that's because the logging is then also started and localization 
support is needed.

Nevertheless it seems to work well to switch locale later after 
user.properties and command line flags have been read. I tested the 
following patch:

Index: src/core/org/apache/jmeter/JMeter.java
===================================================================
--- src/core/org/apache/jmeter/JMeter.java      (revision 1398057)
+++ src/core/org/apache/jmeter/JMeter.java      (working copy)
@@ -679,6 +679,9 @@
              remoteProps.put(SampleEvent.SAMPLE_VARIABLES, 
sample_variables);
          }
          jmeterProps.put("jmeter.version", JMeterUtils.getJMeterVersion());
+        // Initialize locale again in case it was overwritten by
+        // user.properties or command line flags
+        JMeterUtils.initLocale();
      }

      /*


WDYT?

Regards,

Rainer

Mime
View raw message