@@ -1994,10 +1994,20 @@ <h3>Algorithm</h3>
1994
1994
1995
1995
< ol >
1996
1996
< li > Initialize < var > result</ var > to an empty < a class ="changed "> map</ a > .</ li >
1997
- < li > Initialize < var > default language</ var > to < code > @none</ code > .
1998
- If the < var > active context</ var > has a < a > default language</ a > ,
1999
- set < var > default language</ var > to the < a > default language</ a > from the < var > active context</ var >
2000
- < span class ="changed "> normalized to lower case</ span > .</ li >
1997
+ < li class ="changed "> Initialize < var > default lang dir</ var > as follows:< ul >
1998
+ < li > If the < var > active context</ var > has a < a > default language</ a > and a < a > default base direction</ a > ,
1999
+ set < var > default lang dir</ var > to
2000
+ the concatenation of those < a > default language</ a > and < a > default base direction</ a > ,
2001
+ separated by an underscore (`"_"`),
2002
+ normalized to lower case.</ li >
2003
+ < li > Otherwise, if the < var > active context</ var > has a < a > default language</ a > ,
2004
+ set < var > default lang dir</ var > to that < a > default language</ a >
2005
+ normalized to lower case.</ li >
2006
+ < li > Otherwise, if the < var > active context</ var > has a < a > default base direction</ a > ,
2007
+ set < var > default lang dir</ var > to the < a > default base direction</ a > from the < var > active context</ var >
2008
+ preceded by an underscore (`"_"`).</ li >
2009
+ < li > Otherwise, set < var > default lang dir</ var > to < code > @none</ code > .</ li >
2010
+ </ ul > </ li >
2001
2011
< li > For each key < a > term</ a > and value < a > term definition</ a > in
2002
2012
the < var > active context</ var > , ordered by shortest < a > term</ a >
2003
2013
first (breaking ties by choosing the lexicographically least
@@ -2097,39 +2107,9 @@ <h3>Algorithm</h3>
2097
2107
being processed.</ li >
2098
2108
</ ol >
2099
2109
</ li >
2100
- < li class ="changed "> Otherwise, if < a > term definition</ a > has a
2101
- < a > direction mapping</ a > (might be < code > null</ code > ):
2102
- < ol >
2103
- < li > If the < a > direction mapping</ a > equals < code > null</ code > ,
2104
- set < var > direction</ var > to < code > @none</ code > ; otherwise
2105
- to < a > direction mapping</ a > preceded by an underscore (`"_"`).</ li >
2106
- < li > If < var > language map</ var > does not have a < var > direction</ var > < a > entry</ a > ,
2107
- create one and set its value to the < a > term</ a >
2108
- being processed.</ li >
2109
- </ ol >
2110
- </ li >
2111
- < li class ="changed "> Otherwise, if < var > active context</ var > has a
2112
- < a > default base direction</ a > :
2113
- < ol >
2114
- < li > Initialize a variable < var > lang dir</ var >
2115
- with the concatenation of < var > default language</ var > and < a > default base direction</ a > ,
2116
- separate by an underscore (`"_"`),
2117
- normalized to lower case.</ li >
2118
- < li > If < var > language map</ var > does not have a < var > lang dir</ var > < a > entry</ a > ,
2119
- create one and set its value to the < a > term</ a >
2120
- being processed.</ li >
2121
- < li > If < var > language map</ var > does not have an `@none` < a > entry</ a > ,
2122
- create one and set its value to the < a > term</ a >
2123
- being processed.</ li >
2124
- < li > If < var > type map</ var > does not have an `@none` < a > entry</ a > ,
2125
- create one and set its value to the < a > term</ a >
2126
- being processed.</ li >
2127
- </ ol >
2128
- </ li >
2129
2110
< li > Otherwise:
2130
2111
< ol >
2131
- < li > If < var > language map</ var > does not have a < var > default language</ var > < a > entry</ a >
2132
- < span class ="changed "> (after being normalized to lower case)</ span > ,
2112
+ < li > If < var > language map</ var > does not have a < var > default lang dir</ var > < a > entry</ a > ,
2133
2113
create one and set its value to the < a > term</ a >
2134
2114
being processed.</ li >
2135
2115
< li > If < var > language map</ var > does not have an < code > @none</ code >
0 commit comments