mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
add missing stuff in the dict
This commit is contained in:
@@ -40,8 +40,20 @@ public class TranslatedPanel extends JPanel {
|
||||
if (comp instanceof JLabel) {
|
||||
JLabel button = (JLabel)comp;
|
||||
String name = button.getText();
|
||||
if (name != null)
|
||||
button.setText(LangUtil.translate(name));
|
||||
|
||||
if (name != null) {
|
||||
boolean containsColon = false;
|
||||
if (name.contains(": ")) {
|
||||
containsColon = true;
|
||||
name = name.replace(": ", "");
|
||||
}
|
||||
|
||||
String translated = LangUtil.translate(name);
|
||||
if (containsColon)
|
||||
translated += ": ";
|
||||
|
||||
button.setText(translated);
|
||||
}
|
||||
}
|
||||
return super.add(comp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user