Taack opened a new issue, #14815:
URL: https://github.com/apache/grails-core/issues/14815

   ### Expected Behavior
   
   When creating new message bundle, like `message_action.properties`, 
`messageSource` should find translations defined in this bundle.
   
   
   
   ### Actual Behaviour
   
   Here, a `NoSuchMessageException` exception is raised after `hello.label` 
which is translated in `message_action.properties` and 
`message_action_fr.properties`.
   
   ```bash
   ❯ curl http://localhost:8080/test/testTrOk
   Edit⏎                                                                        
                                                                                
                                   
   ~
   ❯ curl http://localhost:8080/test/testTrKo
   <!doctype html>
   <html>
       <head>
           <title>Grails Runtime Exception</title>
   
   ```
   
   ```groovy
   @GrailsCompileStatic
   class TestController {
       TestTrService testTrService
   
       def testTrKo() {
           // defined in message_action.properties bundle
           render testTrService.tr('hello.label')
       }
   
       def testTrOk() {
           // defined in message.properties (the default bundle)
           render testTrService.tr('default.button.edit.label')
       }
   }
   
   ```
   
   
   ### Steps To Reproduce
   
   1. `./gradlew server:bootRun`
   2. `curl http://localhost:8080/test/testTrOk` => returns the tranlation
   3. `curl http://localhost:8080/test/testTrKo` => raise an exxception
   
   
   
   ### Environment Information
   
   ```bash
   ❯ .jdks/openjdk-24.0.1/bin/java -fullversion
   openjdk full version "24.0.1+9-30"
   
   ❯ uname -a
   Linux cachyos-x8664 6.15.2-2-cachyos #1 SMP PREEMPT_DYNAMIC Tue, 10 Jun 2025 
13:25:03 +0000 x86_64 GNU/Linux
   
   ```
   
   ### Example Application
   
   _No response_
   
   ### Version
   
   7.0.0-M4


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to