Is the problem still actual?
If yes, check that your messages are located in src/main/resources/<my.java.
package>/MyBuildStep/config.properties . Only this file is being included 
by default


четверг, 12 ноября 2015 г., 18:48:00 UTC+3 пользователь Kirill написал:
>
> Hi folks,
>
> This is probably something very simple, but I cannot get this working.
>
> I have Messages.properties in the src/main/resources/<my.java.package>. 
> mvn compile creates a <my.java.package>.Messages class that contains all 
> getter methods that return the messages I have put to Messages.properties. 
> So far so good.
> I have an entry "scheduleIsAvailable=Schedule is available" in this 
> property file. So that's exposed as Messages.scheduleIsAvailable(). Peachy.
>
> Next thing I do is I refer to this constant in Jelly as advised in 
> https://wiki.jenkins-ci.org/display/JENKINS/Internationalization:
>
> ${%scheduleIsAvailable}
>
>
> Guess what? It's rendered as "scheduleIsAvailable" :(
>
> The Jelly is config.jelly (build step config) sitting in 
> src/main/resources/<my.java.package>/MyBuildStep 
> (src/main/resources/<my.java.package>/MyBuildStep/config.jelly). 
>
> I would do a workaround exposing smth like getMessage(key) in Descriptor, 
> and would call ${descriptor.getMessage('scheduleIsAvailable')}, but 
> Messages class doesn't provide any way to get message by key...
>
> Please help!
>
> Regards,
> Kirill.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/18a7fe5e-1caa-4131-aacb-7b664ad4be44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to