diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java
index f4bd61351e..b02bd2b546 100644
--- a/core/src/main/java/hudson/Functions.java
+++ b/core/src/main/java/hudson/Functions.java
@@ -117,6 +117,7 @@ import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.DecimalFormat;
+import java.text.MessageFormat;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
@@ -2505,4 +2506,9 @@ public class Functions {
return keyboardShortcut.replace("CMD", useCmdKey ? "⌘" : "CTRL");
}
+
+ @Restricted(NoExternalUse.class)
+ public static String formatMessage(String format, Object args) {
+ return MessageFormat.format(format, args);
+ }
}
diff --git a/core/src/main/resources/lib/layout/keyboard-shortcut.jelly b/core/src/main/resources/lib/layout/keyboard-shortcut.jelly
index 4445b3d188..bd41355559 100644
--- a/core/src/main/resources/lib/layout/keyboard-shortcut.jelly
+++ b/core/src/main/resources/lib/layout/keyboard-shortcut.jelly
@@ -25,32 +25,19 @@ THE SOFTWARE.
-
- Optional prefix to the shortcut
-
-
- Optional suffix to the shortcut
+
+ Optional message for the shortcut
Displays a keyboard shortcut chip based on the component's body.
CMD will automatically be translated to the user's operating system's appropriate variant.
diff --git a/core/src/main/resources/lib/layout/search-bar.jelly b/core/src/main/resources/lib/layout/search-bar.jelly
index 8dbe681fef..1e77c2be8a 100644
--- a/core/src/main/resources/lib/layout/search-bar.jelly
+++ b/core/src/main/resources/lib/layout/search-bar.jelly
@@ -59,7 +59,7 @@ THE SOFTWARE.
disabled="${attrs.enabled == false ? true : null}" />
-
+
diff --git a/core/src/main/resources/lib/layout/search-bar_pl.properties b/core/src/main/resources/lib/layout/search-bar_pl.properties
index 981d1139e2..b9de372589 100644
--- a/core/src/main/resources/lib/layout/search-bar_pl.properties
+++ b/core/src/main/resources/lib/layout/search-bar_pl.properties
@@ -20,5 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-Press=Naciśnij
-on\ your\ keyboard\ to\ focus=na klawiaturze, aby przesunąć tutaj kursor
+shortcut=Naciśnij '{0}' na klawiaturze, aby przesunąć tutaj kursor
diff --git a/core/src/main/resources/lib/layout/search-bar_pt_BR.properties b/core/src/main/resources/lib/layout/search-bar_pt_BR.properties
index 3f18e2c77e..3d3b237a71 100644
--- a/core/src/main/resources/lib/layout/search-bar_pt_BR.properties
+++ b/core/src/main/resources/lib/layout/search-bar_pt_BR.properties
@@ -21,5 +21,4 @@
# THE SOFTWARE.
Search=Busca
-Press=Digite
-on\ your\ keyboard\ to\ focus=no seu teclado para realçar
+shortcut=Digite '{0}' no seu teclado para realçar