You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2005/06/19 00:27:39 UTC
cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/resources messages_zh_TW.properties PackageTest.java messages.properties
sebb 2005/06/18 15:27:39
Modified: src/core/org/apache/jmeter/resources
messages_zh_TW.properties PackageTest.java
messages.properties
Log:
JMeterUtils forces property keys to lower case and replaces spaces with _
Fix one instance of uppercase character in key, and add test for the condition
Add cn_tw and cn_cn keys for the two different Chinese resource files
Revision Changes Path
1.2 +1 -2 jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_zh_TW.properties
Index: messages_zh_TW.properties
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages_zh_TW.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- messages_zh_TW.properties 2 May 2005 11:40:33 -0000 1.1
+++ messages_zh_TW.properties 18 Jun 2005 22:27:38 -0000 1.2
@@ -69,7 +69,6 @@
clear=\u6E05\u9664
clear_all=\u5168\u90E8\u6E05\u9664
clear_cookies_per_iter=\u6BCF\u56DE\u5408\u90FD\u5148\u6E05\u9664 Cookies\uFF1F
-cn=\u4E2D\u6587
column_delete_disallowed=\u6B64\u6B04\u4F4D\u4E0D\u5141\u8A31\u522A\u9664
column_number=Column number of CSV file | next | *alias
compare=\u6BD4\u8F03
@@ -588,7 +587,7 @@
tcp_timeout=\u903E\u6642(\u5FAE\u79D2)
template_field=\u7BC4\u672C
test=\u6E2C\u8A66
-testConfiguration=\u6E2C\u8A66\u914D\u7F6E
+testconfiguration=\u6E2C\u8A66\u914D\u7F6E
test_action_action=\u52D5\u4F5C
test_action_duration=\u671F\u9593
test_action_pause=\u66AB\u505C
1.16 +18 -7 jakarta-jmeter/src/core/org/apache/jmeter/resources/PackageTest.java
Index: PackageTest.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/PackageTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- PackageTest.java 2 May 2005 11:56:42 -0000 1.15
+++ PackageTest.java 18 Jun 2005 22:27:38 -0000 1.16
@@ -78,8 +78,19 @@
String s;
while((s=fileReader.readLine())!=null)
{
- if (s.length() > 0 && !s.startsWith("#")) {
- l.add(s.substring(0,s.indexOf('='))); // Store the key
+ if (s.length() > 0 && !s.startsWith("#") &&!s.startsWith("!")) {
+ int equ = s.indexOf('=');
+ String key = s.substring(0,equ);
+ /*
+ * JMeterUtils.getResString() converts space to _ and lowercases
+ * the key, so make sure all keys pass the test
+ */
+ if ((key.indexOf(' ') >=0) || !key.toLowerCase().equals(key)) {
+ System.out.println("Invalid key for JMeterUtils "+key);
+ fails++;
+ }
+ String val = s.substring(equ+1);
+ l.add(key); // Store the key
/*
* Now check for invalid message format:
* if string contains {0} and ' there may be a problem,
@@ -87,13 +98,13 @@
* is a { in the output.
* A bit crude, but should be enough for now.
*/
- if (s.indexOf("{0}") > 0 && s.indexOf("'") > 0)
+ if (val.indexOf("{0}") > 0 && val.indexOf("'") > 0)
{
- String m = java.text.MessageFormat.format(s,DUMMY_PARAMS);
+ String m = java.text.MessageFormat.format(val,DUMMY_PARAMS);
if (m.indexOf("{") > 0) {
fails++;
System.out.println("Incorrect message format ? (input/output): ");
- System.out.println(s);
+ System.out.println(val);
System.out.println(m);
}
}
1.148 +7 -2 jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties
Index: messages.properties
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/resources/messages.properties,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- messages.properties 30 May 2005 07:52:41 -0000 1.147
+++ messages.properties 18 Jun 2005 22:27:38 -0000 1.148
@@ -1,3 +1,7 @@
+# Warning: JMeterUtils.getResString() replaces space with '_'
+# and converts keys to lowercase before lookup
+# => All keys in this file must also be lower case or they won't match
+#
about=About Apache JMeter
add=Add
add_as_child=Add as Child
@@ -68,7 +72,6 @@
clear=Clear
clear_all=Clear All
clear_cookies_per_iter=Clear cookies each iteration?
-cn=Chinese
column_delete_disallowed=Deleting this column is not permitted
column_number=Column number of CSV file | next | *alias
compare=Compare
@@ -592,7 +595,7 @@
tcp_timeout=Timeout (milliseconds)\:
template_field=Template\:
test=Test
-testConfiguration=Test Configuration
+testconfiguration=Test Configuration
test_action_action=Action
test_action_duration=Duration
test_action_pause=Pause
@@ -698,3 +701,5 @@
xpath_expression=XPath expression to match against
xpath_file_file_name=XML file to get values from
you_must_enter_a_valid_number=You must enter a valid number
+zh_cn=Chinese (Simplified)
+zh_tw=Chinese (Traditional)
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org