<i18n dev> RFR: 8041488: Locale-Dependent List Patterns [v14]
    Roger Riggs 
    rriggs at openjdk.org
       
    Thu Sep  7 17:50:42 UTC 2023
    
    
  
On Tue, 5 Sep 2023 22:47:01 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Introducing a new formatting class for locale-dependent list patterns. The class is to provide the functionality from the Unicode Consortium's LDML specification for [list patterns](https://www.unicode.org/reports/tr35/tr35-general.html#ListPatterns). For example, given a list of String as "Monday", "Wednesday", "Friday", its `format` method would produce "Monday, Wednesday, and Friday" in US English. A CSR has also been drafted, and its draft javadoc can be viewed here: https://cr.openjdk.org/~naoto/JDK-8041488-ListPatterns-PR/api.00/java.base/java/text/ListFormat.html
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Incorporating suggested changes
Looking very good.
src/java.base/share/classes/java/text/ListFormat.java line 95:
> 93:  * On parsing, if some ambiguity is found in the input string, such as delimiting
> 94:  * sequences being found in the input string, may produce the result that when formatted is not a
> 95:  * round-trip with the corresponding formatting. For example, a two element String list
Suggestion:
 * On parsing, if some ambiguity is found in the input string, such as delimiting
 * sequences in the input string, the result, when formatted with the same formatting, does not 
 * re-produce the input string . For example, a two element String list
src/java.base/share/classes/java/text/ListFormat.java line 345:
> 343:      *               of Object.
> 344:      * @param toAppendTo    where the text is to be appended
> 345:      * @param pos    Ignored. Not used in ListFormat. May be null
Curious, why not used? 
I could see a use to identity the string inserted to enable highlighting or other markup around the new string.
-------------
Marked as reviewed by rriggs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15130#pullrequestreview-1615880405
PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1318891558
PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1318935751
    
    
More information about the i18n-dev
mailing list