* more resilient error handling in case of illegal user locale
This commit is contained in:
parent
b509f108d0
commit
f7c2d8eb69
|
@ -67,7 +67,7 @@ public class Language {
|
|||
try {
|
||||
return new Language(code, bundle.getString(code + ".name"));
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
return new Language(code, new Locale(code).getDisplayLanguage(Locale.ROOT));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -235,7 +235,9 @@ public class RenamePanel extends JComponent {
|
|||
@Override
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
||||
if (value != null) {
|
||||
setIcon(ResourceManager.getFlagIcon(((Language) value).getCode()));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue