[ 
https://issues.apache.org/jira/browse/DERBY-5885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-5885:
---------------------------------

    Attachment: derby-5885-01-aa-reorderMessageArgs.diff

Attaching derby-5885-01-aa-reorderMessageArgs.diff. This re-orders some arg 
descriptors in messages.xml to agree with the text of the corresponding 
messages. I am running regression tests now.

This patch makes two major changes:

1) Some arg descriptors were re-ordered to agree with the message text.

2) While I was in there I noticed that many arg descriptors were just the 
vacuous term "value". That term doesn't give the reader any information when 
browsing the Reference Guide section on error messages. That term also doesn't 
give translators any information now that message arguments are printed out in 
header comments in the generated English message properties file (see 
DERBY-5878).

Along the way I corrected some other defects in the English messages:

3) I fixed some capitalization and grammar problems.

4) I removed some messages which are no longer referenced by the code.

I also noticed that some message constructors in the code did not agree with 
the number and order of arguments in the actual message text. So...

5) I corrected some message constructors.

In addition, I found I needed more debug information while making these changes:

6) I made MessageBuilder print out a more detailed error when it trips over a 
discrepancy between the number of args in a message and the number of 
corresponding arg descriptors.

7) I made JDBC.assertRSContains() print out the missing rows when running in 
chatty debug mode and comparing actual and expected row sets.

Finally...

8) I corrected some canonized test results.

Touches the following files:

--------------

M       java/engine/org/apache/derby/loc/messages.xml
M       java/shared/org/apache/derby/shared/common/reference/SQLState.java

Items (1) - (4).

--------------

M       java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
M       
java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java
M       
java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
M       java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java
M       java/engine/org/apache/derby/iapi/types/XML.java
M       java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
M       java/client/org/apache/derby/client/am/SectionManager.java

Item (5).

--------------

M       java/build/org/apache/derbyBuild/MessageBuilder.java

Item (6).

--------------

M       java/testing/org/apache/derbyTesting/junit/JDBC.java

Item (7).

--------------

M       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java

Item (8).

                
> The order of argument names in messages.xml is sometimes wrong when the 
> arguments occur in the message out of sequence.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5885
>                 URL: https://issues.apache.org/jira/browse/DERBY-5885
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation, Localization
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5885-01-aa-reorderMessageArgs.diff
>
>
> In most Derby messages, arguments appear in ascending order. That is, {0} 
> occurs in the message first, then {1}, then {2}, and so on. Sometimes, 
> however, arguments occur out of sequence. When this happens, the names in the 
> <arg> sub-elements may not agree with the order that the arguments actually 
> occur in the message. This causes MessageBuilder to garble the dita source 
> for the Reference Guide page titled "SQL error messages and exceptions".
> For instance, here is the messages.xml element for SQLState 22014:
>             <msg>
>                 <name>22014</name>
>                 <text>The start position for LOCATE is invalid; it must be a 
> positive integer. The index  to start the search from is '{2}'.  The string 
> to search for is '{0}'.  The string to search from is '{1}'. </text>
>                 <arg>startIndex</arg>
>                 <arg>searchString</arg>
>                 <arg>fromString</arg>
>             </msg>
> This gives rise to the following garbled text in the generated reference 
> guide page:
> "The start position for LOCATE is invalid; it must be a positive integer. The 
> index to start the search from is '<fromString>'. The string to search for is 
> '<startIndex>'. The string to search from is '<searchString>'. "
> We should re-order the <arg> sub-elements so that the first <arg> sub-lement 
> corresponds to {0}, the second <arg> sub-element corresponds to {1}, and so 
> on.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to