Skip to content

Commit

Permalink
CLDR-16999 Break apart examples to make it easier to understand.
Browse files Browse the repository at this point in the history
  • Loading branch information
macchiati committed Mar 28, 2024
1 parent 8689ca7 commit fff2f9c
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions docs/ldml/tr35.md
Original file line number Diff line number Diff line change
Expand Up @@ -3850,27 +3850,40 @@ The data from supplementalMetadata is (logically) preprocessed as follows.
5. Order the set of rules using the following comparison logic:
1. For each rule, count the number of items in each field value set (L, S, R, V) and sum the four counts.
If two rules have differing sums, order the rule with the greater sum before the rule with the smaller sum.
* For example, {V={hepburn,heploc}} is tied with {L={en}, R={GB}} (because both have 2 total field value items) and both precede {R={CA}} (which has 1).
* For example:
* {V={hepburn,heploc}} is tied with
* {L={en}, R={GB}} (because both have 2 total field value items) and both precede
* {R={CA}} (which has 1).
2. For rule pairs that are not differentiated by the previous step, consider the value set for each field in the order L, then S, then R, then V.
If one rule has a non-empty value set for that field and the other rule does not,
then order the rule with the non-empty value set for that field before the other rule and disregard all later fields.
Otherwise, consider the next field.
* For example, {L={zh}, S={Hant}, R={CN}} is tied with {L={en}, S={Latn}, R={GB}} (because both have non-empty sets for L, S, and R but not for V),
and both precede {L={zh}, S={Hans}, V={pinyin}} (because it lacks values for R),
which precedes {L={en}, R={GB}, V={scouse}} (because it lacks values for S),
which precedes {V={fonipa,hepburn,heploc}} (because it lacks values for L),
which is tied with {V={hepburn,heploc,simple}} (because both have non-empty sets for V but not for L, S, or R).
* For example:
* {L={zh}, S={Hant}, R={CN}} is tied with
* {L={en}, S={Latn}, R={GB}} (because both have non-empty sets for L, S, and R but not for V),
and both precede
* {L={zh}, S={Hans}, V={pinyin}} (because it lacks values for R),
which precedes
* {L={en}, R={GB}, V={scouse}} (because it lacks values for S),
which precedes
* {V={fonipa,hepburn,heploc}} (because it lacks values for L),
which is tied with
* {V={hepburn,heploc,simple}} (because both have non-empty sets for V but not for L, S, or R).
3. For rule pairs that are not differentiated by the previous step,
consider the value set for each field in the order L, then S, then R, then V as a sequence of subtags.
If those lists for the same field of two rules differ,
then consider the first position of difference in the two lists and order the rules by code-point order
of the field value at that position and disregard all later fields.
Otherwise, consider the next field.
* For example, {L={ja}, V={hepburn, heploc}} precedes {L={zh}, V={1996, pinyin}}
* For example,
* {L={ja}, V={hepburn, heploc}} precedes
* {L={zh}, V={1996, pinyin}}
(because it has a different field value set for L and "ja" precedes "zh" at the first position of difference),
which precedes {L={zh}, V={hepburn, heploc}}
which precedes
* {L={zh}, V={hepburn, heploc}}
(because it has the same field value set for L and a different field value set for V in which "1996" precedes "hepburn" at the first position of difference),
which precedes {L={zh}, V={hepburn, simple}}
which precedes
* {L={zh}, V={hepburn, simple}}
(because it has the same field value set for L and a different field value set for V in which "heploc" precedes "simple" at the first position of difference).
6. The result is the set of **Alias Rules**

Expand Down

0 comments on commit fff2f9c

Please sign in to comment.