| 150 | }; |
| 151 | |
| 152 | struct app_language final : public Command { |
| 153 | CMD_NAME("app/language") |
| 154 | CMD_ICON(languages_menu) |
| 155 | STR_MENU("&Language...") |
| 156 | STR_DISP("Language") |
| 157 | STR_HELP("Select Aegisub interface language") |
| 158 | |
| 159 | void operator()(agi::Context *c) override { |
| 160 | // Get language |
| 161 | auto new_language = wxGetApp().locale.PickLanguage(); |
| 162 | if (new_language.empty()) return; |
| 163 | |
| 164 | OPT_SET("App/Language")->SetString(new_language); |
| 165 | |
| 166 | // Ask to restart program |
| 167 | int result = wxMessageBox("Aegisub needs to be restarted so that the new language can be applied. Restart now?", "Restart Aegisub?", wxYES_NO | wxICON_QUESTION | wxCENTER); |
| 168 | if (result == wxYES) { |
| 169 | // Restart Aegisub |
| 170 | if (c->frame->Close()) { |
| 171 | RestartAegisub(); |
| 172 | } |
| 173 | } |
| 174 | } |
| 175 | }; |
| 176 | |
| 177 | struct app_log final : public Command { |
| 178 | CMD_NAME("app/log") |
nothing calls this directly
no test coverage detected