You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/qute-reference.adoc
+8-6
Original file line number
Diff line number
Diff line change
@@ -2498,24 +2498,26 @@ The message bundles can be used at runtime:
2498
2498
2499
2499
The bundle name is defaulted unless it's specified with `@MessageBundle#value()`.
2500
2500
For a top-level class the `msg` value is used by default.
2501
-
For a nested class the name starts with `msg` followed by an underscore, followed by the simple names of all enclosing classes in the hierarchy (top-level class goes first) seperated by underscores.
2501
+
For a nested class the name consists of the simple names of all enclosing classes in the hierarchy (top-level class goes first), followed by the simple name of the message bundle interface.
2502
+
Names are separated by underscores.
2502
2503
2503
-
For example, the name of the following message bundle will be defaulted to `msg_Index`:
2504
+
For example, the name of the following message bundle will be defaulted to `Controller_index`:
2504
2505
2505
2506
[source,java]
2506
2507
----
2507
-
class Index {
2508
+
class Controller {
2508
2509
2509
2510
@MessageBundle
2510
-
interface Bundle {
2511
+
interface index {
2511
2512
2512
2513
@Message("Hello {name}!")
2513
-
String hello(String name);
2514
+
String hello(String name); <1>
2514
2515
}
2515
2516
}
2516
2517
----
2518
+
<1> This message could be used in a template via `{Controller_index:hello(name)}`.
2517
2519
2518
-
NOTE: The bundle name is also used as a part of the name of a localized file, e.g. `msg_Index` in the `msg_Index_de.properties`.
2520
+
NOTE: The bundle name is also used as a part of the name of a localized file, e.g. `Controller_index` in the `Controller_index_de.properties`.
Copy file name to clipboardExpand all lines: extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/MessageBundleDefaultedNameTest.java
+6-6
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,17 @@ public class MessageBundleDefaultedNameTest {
0 commit comments