Step 0 — pick interface language. Returns 'en' or 'zh'.
(prompter: TerminalPrompter)
| 927 | |
| 928 | |
| 929 | def _pick_init_language(prompter: TerminalPrompter) -> str: |
| 930 | """Step 0 — pick interface language. Returns 'en' or 'zh'.""" |
| 931 | from uncommon_route.tui.i18n import t as translate |
| 932 | |
| 933 | choice = prompter.choose( |
| 934 | translate("cli.lang_picker", "en"), |
| 935 | [ |
| 936 | MenuOption("en", translate("cli.lang.en_label", "en")), |
| 937 | MenuOption("zh", translate("cli.lang.zh_label", "en")), |
| 938 | ], |
| 939 | ) |
| 940 | return choice.value |
| 941 | |
| 942 | |
| 943 | def _cmd_init(args: list[str]) -> None: |
no test coverage detected