Bugfix packetlogger internationalization

This commit is contained in:
sirjonasxx 2022-12-27 19:57:27 +01:00
parent df45404a36
commit ea23ed911c
2 changed files with 10 additions and 7 deletions

View File

@ -275,12 +275,15 @@ public class UiLoggerController implements Initializable {
Hexdump.hexdump(packet.toBytes()) :
(chkReprRawHex.isSelected() ? Bytes.wrap(packet.toBytes()).encodeHex() : packet.toString());
String type = isIncoming ? LanguageBundle.get("ext.logger.element.direction.incoming") : LanguageBundle.get("ext.logger.element.direction.outgoing");
String packetType = isIncoming ? "incoming" : "outgoing";
String type = isIncoming ?
LanguageBundle.get("ext.logger.element.direction.incoming") :
LanguageBundle.get("ext.logger.element.direction.outgoing");
if (!chkReprHex.isSelected()) {
elements.add(new Element(String.format("%s[", type), type.toLowerCase()));
elements.add(new Element(String.format("%s[", type), packetType));
elements.add(new Element(String.valueOf(packet.headerId()), ""));
elements.add(new Element("]", type.toLowerCase()));
elements.add(new Element("]", packetType));
elements.add(new Element(" -> ", ""));
}
@ -288,7 +291,7 @@ public class UiLoggerController implements Initializable {
if (isSkipped) {
elements.add(new Element(String.format("<%s>", LanguageBundle.get("ext.logger.element.skipped")), "skipped"));
} else
elements.add(new Element(packetRepresentation, String.format(chkReprHex.isSelected() ? "%sHex": "%s", type.toLowerCase())));
elements.add(new Element(packetRepresentation, String.format(chkReprHex.isSelected() ? "%sHex": "%s", packetType)));
elements.add(new Element("\n", ""));
}

View File

@ -282,7 +282,7 @@ ext.logger.menu.window.ondisconnect.hidewindow=Verberg venster
ext.logger.menu.window.ondisconnect.reset=Reset packetlogger
ext.logger.menu.view=Weergave
ext.logger.menu.view.incoming=Geef binnenkomend weer
ext.logger.menu.view.incoming=Geef inkomend weer
ext.logger.menu.view.outgoing=Geef uitgaand weer
ext.logger.menu.view.autoscroll=Autoscroll
ext.logger.menu.view.cleartext=Wis tekst
@ -317,8 +317,8 @@ ext.logger.state.filtered=Gefilterd
ext.logger.element.timestamp=tijdstempel
ext.logger.element.blocked=Geblokkeerd
ext.logger.element.replaced=Vervangen
ext.logger.element.direction.outgoing=Binnenkomend
ext.logger.element.direction.incoming=Uitgaand
ext.logger.element.direction.outgoing=Uitgaand
ext.logger.element.direction.incoming=Inkomend
ext.logger.element.skipped=packet overgeslagen
ext.logger.state.true=True
ext.logger.state.false=False