There is bad formatting in UTS #35 Annex C "LocaleId Canonicalization"

Description

This particularly impacts the example in subsection 4 “Replacement”, https://unicode.org/reports/tr35/#4.-replacement :

source=ja-Latn-fonipa-hepburn-heploc

rule ="<languageAlias type="und-hepburn-heploc"

replacement="und-alalc97">"

result="ja-Latn-alalc97-fonipa" // note that CLDR canonical order of variants is alphabetical

Above that, XML excerpts and source/type examples are presented in monospace, so the example should instead look more like this:

source="ja-Latn-fonipa-hepburn-heploc"

rule="<languageAlias type="und-hepburn-heploc" replacement="und-alalc97">"

result="ja-Latn-alalc97-fonipa"

(note that CLDR canonical order of variants is alphabetical)

This could obviously benefit further from non-" quoting that better accommodates XML contents, but this issue does not require it. Narrowly, I would propose a change to docs/ldml/tr35.md like

--- docs/ldml/tr35.md +++ docs/ldml/tr35.md @@ -3806,7 +3806,7 -> source=ja-Latn-fonipa-hepburn-heploc +> `source="ja-Latn-fonipa-hepburn-heploc"` > -> rule ="\<languageAlias type="und-hepburn-heploc" -> -> replacement="und-alalc97">" +> `rule="<languageAlias type="und-hepburn-heploc" replacement="und-alalc97">"` > -> result="ja-Latn-alalc97-fonipa" // note that CLDR canonical order of variants is alphabetical +> `result="ja-Latn-alalc97-fonipa"` +> +> (note that CLDR canonical order of variants is alphabetical)

 

There is also text in e.g. “Key And Type Definitions” https://unicode.org/reports/tr35/#Key_And_Type_Definitions_ / Lateral Inheritance https://unicode.org/reports/tr35/#Lateral_Inheritance / etc. that might be formatted in monospace as part of fixing this issue.

Activity

Show:

Mark Davis 
March 28, 2024 at 8:48 PM

When doing the ticket, I made two changes from the description.

  1. The “Key And Type Definitions” https://unicode.org/reports/tr35/#Key_And_Type_Definitions was more complicated, and would benefit less, so that wasn't done.

  2. The strings were not changed in the listed example, just the XML. Eg, source="ja-Latn-fonipa-hepburn-heploc" was left alone.

Mark Davis 
August 19, 2023 at 10:16 PM

These look like good changes.

Fixed

Details

Priority

Assignee

Reporter

Reviewer

Fix versions

Components

Created August 16, 2023 at 5:53 PM
Updated April 27, 2024 at 6:42 PM
Resolved April 3, 2024 at 6:30 AM