do not show language dialog until there are some translations

pull/53/head
Zlatin Balevsky 2020-10-05 06:58:38 +01:00
parent a8c91d4a3c
commit 341275c8a3
No known key found for this signature in database
GPG Key ID: A72832072D525E41
3 changed files with 2 additions and 3 deletions

View File

@ -1 +0,0 @@
EXIT=Изход

View File

@ -205,6 +205,8 @@ class Initialize extends AbstractLifecycleHandler {
}
private String showLanguageDialog() {
if (Translator.SUPPORTED_LOCALES.size() == 1)
return Locale.US.toLanguageTag()
def builder = new SwingBuilder()
def languageComboBox
def chooseButton

View File

@ -1,6 +1,5 @@
package com.muwire.gui;
import java.text.ChoiceFormat;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.LinkedHashSet;
@ -16,7 +15,6 @@ public class Translator {
public static final Set<Locale> SUPPORTED_LOCALES = new LinkedHashSet<>();
static {
SUPPORTED_LOCALES.add(Locale.US);
SUPPORTED_LOCALES.add(Locale.forLanguageTag("bg"));
// add more as they get translated
}