()
| 169 | return sorted(locales, key=key) |
| 170 | |
| 171 | def 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 | |
| 189 | gen() |
no test coverage detected