Allow deep nested wording
This commit is contained in:
@@ -342,10 +342,12 @@ WORDING : Dict[str, Any] =\
|
|||||||
|
|
||||||
|
|
||||||
def get(key: str) -> Optional[str]:
|
def get(key: str) -> Optional[str]:
|
||||||
if '.' in key:
|
current = WORDING
|
||||||
section, name = key.split('.')
|
|
||||||
if section in WORDING and name in WORDING.get(section):
|
for fragment in key.split('.'):
|
||||||
return WORDING.get(section).get(name)
|
if fragment in current:
|
||||||
if key in WORDING:
|
current = current.get(fragment)
|
||||||
return WORDING.get(key)
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
return current
|
||||||
|
|||||||
Reference in New Issue
Block a user