X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Ffunction%2FShowKeysScreen.java;h=0946cf3c61534f0890ee95876942a08a17dcfd5e;hp=98a9fdd04428e42ff65cd85155ae060810fcda13;hb=140e9d165f85c3d4f0435a311e091209313faa2a;hpb=c0387c124840c9407e040600fda88f3c3e8f6aa6 diff --git a/tim/prune/function/ShowKeysScreen.java b/tim/prune/function/ShowKeysScreen.java index 98a9fdd..0946cf3 100644 --- a/tim/prune/function/ShowKeysScreen.java +++ b/tim/prune/function/ShowKeysScreen.java @@ -74,7 +74,16 @@ public class ShowKeysScreen extends GenericFunction introLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); mainPanel.add(introLabel, BorderLayout.NORTH); - JEditorPane kp = new JEditorPane("text/html", I18nManager.getText("dialog.keys.keylist")); + String keyText = I18nManager.getText("dialog.keys.keylist"); + // If running on Mac, do global replace on "Ctrl" (or "Strg") for "Command" (or lang-specific text) + if (System.getProperty("mrj.version") != null) { + String mod = I18nManager.getText("dialog.keys.normalmodifier"); + String macmod = I18nManager.getText("dialog.keys.macmodifier"); + if (mod != null && macmod != null && mod.length() > 1 && macmod.length() > 1) { + keyText = keyText.replaceAll(mod, macmod); + } + } + JEditorPane kp = new JEditorPane("text/html", keyText); kp.setEditable(false); kp.setOpaque(false); kp.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));