mirror of https://github.com/odrling/Aegisub
Eliminate a pointless check
This commit is contained in:
parent
50d0744e9c
commit
32f5e00bf8
|
@ -78,6 +78,10 @@ wxString AegisubLocale::PickLanguage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
wxArrayString langs = GetTranslations()->GetAvailableTranslations(AEGISUB_CATALOG);
|
wxArrayString langs = GetTranslations()->GetAvailableTranslations(AEGISUB_CATALOG);
|
||||||
|
// No translations available, so don't bother asking the user
|
||||||
|
if (langs.empty() && !active_language)
|
||||||
|
return "en_US";
|
||||||
|
|
||||||
langs.insert(langs.begin(), "en_US");
|
langs.insert(langs.begin(), "en_US");
|
||||||
|
|
||||||
// Check if user local language is available, if so, make it first
|
// Check if user local language is available, if so, make it first
|
||||||
|
@ -88,13 +92,6 @@ wxString AegisubLocale::PickLanguage() {
|
||||||
std::rotate(langs.begin(), it, it + 1);
|
std::rotate(langs.begin(), it, it + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nothing to pick
|
|
||||||
if (langs.empty()) return "";
|
|
||||||
|
|
||||||
// Only one language, so don't bother asking the user
|
|
||||||
if (langs.size() == 1 && !active_language)
|
|
||||||
return langs[0];
|
|
||||||
|
|
||||||
// Generate names
|
// Generate names
|
||||||
wxArrayString langNames;
|
wxArrayString langNames;
|
||||||
for (auto const& lang : langs) {
|
for (auto const& lang : langs) {
|
||||||
|
|
Loading…
Reference in New Issue