Move special-case LDML value to a module global
Giving it a symbolic name is clearer (and saves me the need to duplicate the comment when I add some more references to it). This amends commit bcdd51cfae24731a73d008add23d3c1e85bbd8d0 Task-number: QTBUG-115158 Change-Id: I7577e0cde783fcda840009c7aea46934964c6e4c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
This commit is contained in:
parent
c8b70f4e51
commit
0f770b0b34
@ -21,6 +21,9 @@ See individual classes for further detail.
|
||||
from localetools import Error
|
||||
from dateconverter import convert_date
|
||||
|
||||
# The github version of CLDR uses '↑↑↑' to indicate "inherit"
|
||||
INHERIT = '↑↑↑'
|
||||
|
||||
def _attrsFromDom(dom):
|
||||
return { k: (v if isinstance(v, str) else v.nodeValue)
|
||||
for k, v in dom.attributes.items() }
|
||||
@ -210,8 +213,7 @@ class LocaleScanner (object):
|
||||
try:
|
||||
if draft is None or elt.draft <= draft:
|
||||
value = elt.dom.firstChild.nodeValue
|
||||
# The github version of CLDR uses '↑↑↑' to indicate "inherit"
|
||||
if value != '↑↑↑':
|
||||
if value != INHERIT:
|
||||
return value
|
||||
except (AttributeError, KeyError):
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user