Skip to content

Commit 15a0dcf

Browse files
authored
CLDR-16428 Fix formatting of likely subtags algorithm (#2750)
1 parent 9d57005 commit 15a0dcf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/ldml/tr35.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,20 +2041,20 @@ This operation is performed in the following way.
20412041
2. Replace any deprecated subtags with their canonical values using the `<alias>` data in supplemental metadata. Use the first value in the replacement list, if it exists. Language tag replacements may have multiple parts, such as "sh" ➞ "sr_Latn" or "mo" ➞ "ro_MD". In such a case, the original script and/or region are retained if there is one. Thus "sh_Arab_AQ" ➞ "sr_Arab_AQ", not "sr_Latn_AQ".
20422042
3. If the tag is a legacy language tag (marked as “Type: grandfathered” in BCP 47; see `<variable id="$grandfathered" type="choice">` in the supplemental data), then return it.
20432043
4. Remove the script code 'Zzzz' and the region code 'ZZ' if they occur.
2044-
5. Get the components of the cleaned-up source tag _(languages, scripts,_ and _regions_), plus any variants and extensions.
2044+
5. Get the components of the cleaned-up source tag _(language<sub>s</sub>, script<sub>s</sub>,_ and _region<sub>s</sub>_), plus any variants and extensions.
20452045
2. **Lookup.** Look up each of the following in order, and stop on the first match:
2046-
1. _languages_scripts_regions_
2047-
2. _languages_regions_
2048-
3. _languages_scripts_
2049-
4. __languages__
2050-
5. und\__scripts_
2046+
1. _language<sub>s</sub>\_script<sub>s</sub>\_region<sub>s</sub>_
2047+
2. _language<sub>s</sub>\_region<sub>s</sub>_
2048+
3. _language<sub>s</sub>\_script<sub>s</sub>_
2049+
4. _language<sub>s</sub>_
2050+
5. und\__script<sub>s</sub>_
20512051
3. **Return**
20522052
1. If there is no match, either return
20532053
1. an error value, or
20542054
2. the match for "und" (in APIs where a valid language tag is required).
2055-
2. Otherwise there is a match = _languagem_scriptm_regionm_
2056-
3. Let xr = xs if xs is not empty, and xm otherwise.
2057-
4. Return the language tag composed of _languager _ scriptr _ regionr_ + variants + extensions .
2055+
2. Otherwise there is a match = _language<sub>m</sub>\_script<sub>m</sub>\_region<sub>m</sub>_
2056+
3. Let x<sub>r</sub> = x<sub>s</sub> if x<sub>s</sub> is not empty, and x<sub>m</sub> otherwise.
2057+
4. Return the language tag composed of _language<sub>r</sub>\_script<sub>r</sub>\_region<sub>r</sub>_ + variants + extensions.
20582058

20592059
The lookup can be optimized. For example, if any of the tags in Step 2 are the same as previous ones in that list, they do not need to be tested.
20602060

0 commit comments

Comments
 (0)