ABin-Huang opened a new pull request, #1064:
URL: https://github.com/apache/tomcat/pull/1064

   This PR addresses the "WebXml Internationalization Support" item from 
TODO.md and implements internationalization support for the `description` and 
`display-name` elements in `web.xml` / `web-fragment.xml`. Per the deployment 
descriptor specification, these elements may be repeated with different 
`xml:lang` attributes to provide multi-language metadata.
   
   ## Summary of changes
   
   - New `LocaleElement` class holding the element content and its optional 
`xml:lang` value
   - `ResourceBase`, `FilterDef`, `ServletDef`, `SecurityRoleRef`, 
`SecurityConstraint`, `SecurityCollection`, `MessageDestination`, 
`ContextService` and `WebXml` now store `description` / `display-name` as lists 
of `LocaleElement`
   - Existing String-based getters/setters are preserved for backwards 
compatibility; the default (language-less) element is returned when present
   - `WebXml.merge()` combines elements from different languages and detects 
conflicts when two fragments define the same language with different content
   - `WebRuleSet` parses the `xml:lang` attribute (with namespace URI fallback) 
and populates the new structures via a new `LocaleElementRule`
   - `toXml()` serializes all locale aware elements, including the `xml:lang` 
attribute
   
   ## Testing
   
   - New `TestWebXmlI18n` with 11 test cases covering parsing, round-trip 
serialization, setter semantics and merge behaviour
   - Existing descriptor tests remain green (`TestWebXml`, `TestWebRuleSet`, 
`TestWebXmlParser`, `TestSecurityConstraint`, `TestFilterDef`, 
`TestServletDef`, `TestWebXmlOrdering`)
   - `ant validate -Dexecute.validate=true` (checkstyle) passes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to