Repository: quarkusio/quarkus
Issue: Bundle message function name generated  when using params is honoured only for the message key having a parameter in it's arguments and not for the other message keys

**Describe the bug**
Bundle message function name generated  when using params is honoured only for the message key having a parameter in it's arguments and not for the other message keys

e.g let's say i have this message bundle 

```java
@MessageBundle(defaultKey = Message.UNDERSCORED_ELEMENT_NAME, value = "i18n")
public interface AppDefaultMsg {
  @Message("hi {name} from Quarkus")
  String helloWithParam(String name);

  @Message("hi from Quarkus")
  String helloWithoutParam();
}
```

In my template 

hello.html

```html
{i18n:hello_with_param('james')}
{i18n:hello_without_param}
```

this will generates an error for the second key saying this

```log
io.quarkus.qute.TemplateException: Found template problems (70):
[1] Incorrect expression: i18n:hello_without_param
	- Message bundle [name=i18n, interface=xxx.AppDefaultMsg] does not define a method for key: hello_without_param
	- found in template [hello.html] 
```

if you change the html to this 

```html
{i18n:hello_with_param('james')}
{i18n:helloWithoutParam}
```
It will work hence confirming that the function name generated when using at least one message bundle key with argument doesn't respect the naming strategy used.

**Expected behavior**
I expect that my naming strategy to be applied to all my bundle keys like the normal case without params.

**Actual behavior**
The naming strategy is only honored for the message key having an argument

**To Reproduce**
Steps to reproduce the behavior:
1. Create a message bundle with two keys/values one having an argument and the other without argument
2. Set the naming strategy to something different than the default strategy (underscor or hyphen)
3. Create a qute template and try to display both values

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`: 
`Darwin ***-MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul  5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64`
 - Output of `java -version`: 
java version "11.0.7" 2020-04-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode
 - Quarkus version or git rev: 1.7.0.CR2
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): Gradle 6.5.1

Changed files:
extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/AlphaMessages.java
extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java
extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/MessageBundleTest.java
extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleMethodBuildItem.java

diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleMethodBuildItem.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleMethodBuildItem.java
index 000c287eb0c..ec39f4ad5e2 100644
--- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleMethodBuildItem.java
+++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleMethodBuildItem.java
@@ -5,7 +5,7 @@
 import io.quarkus.builder.item.MultiBuildItem;
 
 /**
- * Represents a message bundle method that has a template that needs to be validated.
+ * Represents a message bundle method.
  * <p>
  * Note that templates that contain no expressions don't need to be validated.
  */
@@ -45,4 +45,13 @@ public String getTemplate() {
         return template;
     }
 
+    /**
+     * A bundle method that does not need to be validated has {@code null} template id.
+     * 
+     * @return {@code true} if the template needs to be validated
+     */
+    public boolean isValidatable() {
+        return templateId != null;
+    }
+
 }
diff --git a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java
index 88734fdf924..1aea4304f45 100644
--- a/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java
+++ b/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java
@@ -270,8 +270,10 @@ void initBundleContext(MessageBundleRecorder recorder,
             bundleInterfaces.put(bundle.getName(), localeToInterface);
         }
 
-        Map<String, String> templateIdToContent = messageBundleMethods.stream().collect(
-                Collectors.toMap(MessageBundleMethodBuildItem::getTemplateId, MessageBundleMethodBuildItem::getTemplate));
+        Map<String, String> templateIdToContent = messageBundleMethods.stream()
+                .filter(MessageBundleMethodBuildItem::isValidatable).collect(
+                        Collectors.toMap(MessageBundleMethodBuildItem::getTemplateId,
+                                MessageBundleMethodBuildItem::getTemplate));
 
         syntheticBeans.produce(SyntheticBeanBuildItem.configure(MessageBundleRecorder.BundleContext.class)
                 .supplier(recorder.createContext(templateIdToContent, bundleInterfaces)).done());
@@ -283,6 +285,7 @@ void validateMessageBundleMethods(TemplatesAnalysisBuildItem templatesAnalysis,
             BuildProducer<IncorrectExpressionBuildItem> incorrectExpressions) {
 
         Map<String, MessageBundleMethodBuildItem> bundleMethods = messageBundleMethods.stream()
+                .filter(MessageBundleMethodBuildItem::isValidatable)
                 .collect(Collectors.toMap(MessageBundleMethodBuildItem::getTemplateId, Function.identity()));
 
         for (TemplateAnalysis analysis : templatesAnalysis.getAnalysis()) {
@@ -588,13 +591,9 @@ private String generateImplementation(ClassInfo defaultBundleInterface, String d
             if (messageTemplate == null) {
                 messageTemplate = messageAnnotation.value().asString();
             }
-            if (!messageTemplate.contains("}")) {
-                // No expression/tag - no need to use qute
-                bundleMethod.returnValue(bundleMethod.load(messageTemplate));
-            } else {
-                // Obtain the template, e.g. msg_hello_name
-                String templateId;
 
+            String templateId = null;
+            if (messageTemplate.contains("}")) {
                 if (defaultBundleInterface != null) {
                     if (locale == null) {
                         AnnotationInstance localizedAnnotation = bundleInterface.classAnnotation(LOCALIZED);
@@ -604,10 +603,18 @@ private String generateImplementation(ClassInfo defaultBundleInterface, String d
                 } else {
                     templateId = bundleName + "_" + key;
                 }
+            }
 
-                messageTemplateMethods
-                        .produce(new MessageBundleMethodBuildItem(bundleName, key, templateId, method, messageTemplate));
+            MessageBundleMethodBuildItem messageBundleMethod = new MessageBundleMethodBuildItem(bundleName, key, templateId,
+                    method, messageTemplate);
+            messageTemplateMethods
+                    .produce(messageBundleMethod);
 
+            if (!messageBundleMethod.isValidatable()) {
+                // No expression/tag - no need to use qute
+                bundleMethod.returnValue(bundleMethod.load(messageTemplate));
+            } else {
+                // Obtain the template, e.g. msg_hello_name
                 ResultHandle template = bundleMethod.invokeStaticMethod(BUNDLES_GET_TEMPLATE,
                         bundleMethod.load(templateId));
                 // Create a template instance
diff --git a/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/AlphaMessages.java b/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/AlphaMessages.java
index e973f3dedc4..c405d5fd7f1 100644
--- a/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/AlphaMessages.java
+++ b/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/AlphaMessages.java
@@ -12,4 +12,7 @@ public interface AlphaMessages {
     @Message(value = "Hello!", key = "hello_alpha")
     String hello();
 
+    @Message("Hello {name} from alpha!")
+    String helloWithParam(String name);
+
 }
diff --git a/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/MessageBundleTest.java b/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/MessageBundleTest.java
index 441296a36f9..cee340f1ba1 100644
--- a/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/MessageBundleTest.java
+++ b/extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/i18n/MessageBundleTest.java
@@ -25,7 +25,7 @@ public class MessageBundleTest {
             .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
                     .addClasses(AppMessages.class, OtherMessages.class, AlphaMessages.class, Item.class)
                     .addAsResource(new StringAsset(
-                            "{msg:hello} {msg:hello_name('Jachym')} {msg:hello_with_if_section(3)} {alpha:hello-alpha} {alpha:hello_alpha}"),
+                            "{msg:hello} {msg:hello_name('Jachym')} {msg:hello_with_if_section(3)} {alpha:hello-alpha} {alpha:hello_alpha} {alpha:hello-with-param('foo')}"),
                             "templates/foo.html")
                     .addAsResource(new StringAsset(
                             "hello=Hallo Welt!\\nhello_name=Hallo {name}!"),
@@ -64,10 +64,11 @@ public void testBeans() {
 
     @Test
     public void testResolvers() {
-        assertEquals("Hello world! Hello Jachym! Hello you guys! Hello alpha! Hello!", foo.instance().render());
-        assertEquals("Hello world! Ahoj Jachym! Hello you guys! Hello alpha! Hello!",
+        assertEquals("Hello world! Hello Jachym! Hello you guys! Hello alpha! Hello! Hello foo from alpha!",
+                foo.instance().render());
+        assertEquals("Hello world! Ahoj Jachym! Hello you guys! Hello alpha! Hello! Hello foo from alpha!",
                 foo.instance().setAttribute(MessageBundles.ATTRIBUTE_LOCALE, Locale.forLanguageTag("cs")).render());
-        assertEquals("Hallo Welt! Hallo Jachym! Hello you guys! Hello alpha! Hello!",
+        assertEquals("Hallo Welt! Hallo Jachym! Hello you guys! Hello alpha! Hello! Hello foo from alpha!",
                 foo.instance().setAttribute(MessageBundles.ATTRIBUTE_LOCALE, Locale.GERMAN).render());
         assertEquals("Dot test!", engine.parse("{msg:['dot.test']}").render());
     }