MCPcopy Create free account
hub / github.com/Julow/Unexpected-Keyboard / gen

Function gen

gen_method_xml.py:171–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 return sorted(locales, key=key)
170
171def gen():
172 locales = sort_locales(compute_attrs())
173 check_locales_for_dictionaries(locales)
174 root = ET.Element("input-method", attrib={
175 "xmlns:android": "http://schemas.android.com/apk/res/android",
176 "android:settingsActivity": "juloo.keyboard2.SettingsActivity",
177 "android:supportsSwitchingToNextInputMethod": "true",
178 })
179 root.append(ET.Comment(text=""" This file is automatically generated. DO NOT EDIT.
180 Locales definitions should go into 'gen_method_xml.py'.
181 Update this file with 'gradle test'.
182
183 """))
184 for loc in locales:
185 subtype_elem(root, loc)
186 ET.indent(root)
187 print(ET.tostring(root, encoding="utf-8", xml_declaration=True).decode("UTF-8"))
188
189gen()

Callers 1

gen_method_xml.pyFile · 0.85

Calls 4

sort_localesFunction · 0.85
compute_attrsFunction · 0.85
subtype_elemFunction · 0.85

Tested by

no test coverage detected