-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qute I18N should support standard Java resource bundle filenames #30382
Comments
/cc @mkouba (qute) |
Yes, this is documented in https://quarkus.io/guides/qute-reference#localization: "The file name consists of the relevant bundle name (e.g. msg) and underscore followed by the |
@vagelis-savvas In fact, we don't require/validate the IETF language tag. I've just verified What kind of error did you get in your application? |
@mkouba Hello, I've created a MCVE here https://github.com/vagelis-savvas/code-with-qute-mcve which I bootstrapped from code.quarkus.io I've only added an I18N 'greet' key: I use a @MessageBundle interface, some resource bundle files and edited the page.qute.html template to have a {msg:greet} instead of the hardcoded 'Hello' |
Hm, so the build fails because In any case, we can just convert the locale info from the file to the expected language tag, i.e. replace |
Describe the bug
The I18N part of Qute does not allow someone to use the standard filename convention of Java resource bundle files, meaning we can't have e.g. msg.properties, msg_en.properties and msg_en_US.properties files. I believe it is related to the fact that quarkus.default-locale accepts values in IETF BCP 47 such as en-US, where a hyphen separates the locale components instead of an underscore.
Expected behavior
Qute should take into account standard Java resource bundle filenames, i.e. ones that separate the locale components with an underscore.
Actual behavior
Qute only considers resource bundle filenames where the locale components are separated with hyphens.
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: