Skip to content

Commit

Permalink
Add missing label
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Nov 4, 2023
1 parent fd6db73 commit 0599ca3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/mpo/dayon/assistant/gui/Assistant.java
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ private Action createNetworkAssistantConfigurationAction(Assistant assistant) {
@Override
public void actionPerformed(ActionEvent ev) {
JFrame networkFrame = (JFrame) SwingUtilities.getRoot((Component) ev.getSource());
String upnpActive = String.valueOf(assistant.isUpnpEnabled());

final JPanel pane = new JPanel();
pane.setLayout(new GridLayout(4, 1, 10, -10));
Expand All @@ -321,8 +322,8 @@ public void actionPerformed(ActionEvent ev) {
portNumberLbl.setToolTipText(translate("connection.settings.portNumber.tooltip"));
final JTextField portNumberTextField = new JTextField();
portNumberTextField.setText(valueOf(networkConfiguration.getPort()));
final JLabel upnpStatus = new JLabel(format(translate("connection.settings.upnp." + assistant.isUpnpEnabled()), UPnP.getDefaultGatewayIP()));
final JLabel upnpHint = new JLabel(translate("connection.settings.portforward." + assistant.isUpnpEnabled()));
final JLabel upnpStatus = new JLabel(format(translate(format("connection.settings.upnp.%s", upnpActive)), UPnP.getDefaultGatewayIP()));
final JLabel upnpHint = new JLabel(translate(format("connection.settings.portforward.%s", upnpActive)));
subPane.add(portNumberLbl);
subPane.add(portNumberTextField);
pane.add(upnpStatus);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/Babylon.properties
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ connection.settings.invalidToken = This token is invalid.
connection.settings.upnp.true = UPnP is enabled on this gateway %s
connection.settings.upnp.false = UPnP is disabled in this network.
connection.settings.portforward.true = Port forwarding is configured automatically.
connection.settings.portforward.false = Remember to configure the port forwarding.

# Token
token = Token
Expand Down

0 comments on commit 0599ca3

Please sign in to comment.