Skip to content

Commit

Permalink
CLDR-17893 Clarify rg validation for unit preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
macchiati authored Sep 13, 2024
1 parent fec39d6 commit 6a16885
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/ldml/tr35-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,13 @@ If any key-values are invalid, then they are ignored. Thus the following constru
| -AA | invalid region 'AA'|

‡ Only the region portion is currently used, so in -rg-usabcdef the "abcdef" is ignored, whether or not it is valid.
The table below shows when the region portion is valid or not.

| Subdivision | Region | Used in -rg? | Comment |
| --- | --- | --- | --- |
| usca | US | Yes | Both the subdivision code (US Texas) and its region portion (US) are valid |
| usabc | US | Yes | The subdivision code is invalid, but its region portion (US) is valid |
| abcdef | AB | No | Both the subdivision code and its region portion (~AB~) are invalid |

The following algorithm is used to compute the override units, regions, and category.
The latter two items are used in the [Unit Preferences Data](#Unit_Preferences_Data).
Expand All @@ -1253,9 +1260,10 @@ If there is no valid -mu value, the following steps are used to determine a regi

1. If there is a valid -ms value then let USM be the corresponding value in column 2 of the table below.
Otherwise FR is not used. In either case continue with step 2.
2. If there is a valid -rg region, let R be that region, and go to Compute the category.
3. If there is a valid region in the locale, let R be that region, and go to Compute the category.
4. Otherwise, compute the likely subtags for the locale.
2. If there is a valid -rg region code as the prefix of its subdivision value, let R be that region, and go to Compute the category.
* See the table above for the examples `usca`, `usabc`, and `abcdef`
4. If there is a valid region in the locale, let R be that region, and go to Compute the category.
5. Otherwise, compute the likely subtags for the locale.
1. If there is a likely region, then let R be that region, and go to Compute the category.
2. Otherwise, let R be 001, and go to Compute the category

Expand Down

0 comments on commit 6a16885

Please sign in to comment.