quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Allow to define Qute i18n default values as properties

Open ia3andy opened this issue 8 months ago • 2 comments

Description

Following on https://github.com/quarkusio/quarkus/pull/46280, it would be nice to allow defining default values as properties. This is meant for libraries which could define multiple languages messages that can be overridden in the user app.

Implementation ideas

We could probably put them in another directory? messages/defaults/...

ia3andy avatar Apr 29 '25 08:04 ia3andy

/cc @mkouba (qute)

quarkus-bot[bot] avatar Apr 29 '25 10:04 quarkus-bot[bot]

we could also have the same system you added on templates with priorities

ia3andy avatar Apr 29 '25 13:04 ia3andy

we could also have the same system you added on templates with priorities

Yes, we could apply the same defaults, i.e. root archive message files take precedence. The logic for duplicit message files can be found in the MessageBundleProcessor#findMessageFiles() method.

mkouba avatar May 27 '25 09:05 mkouba

So one of the solutions would be to:

  1. support duplicit message files with different priorities
  2. application root will be the highest priority, e.g. 10
  3. other application archives have lower priority, e.g. 0
  4. we will read both message files and merge them (higher priority wins)
  5. then the merged message file will be merged with message bundle interface (if needed)

mkouba avatar Oct 31 '25 15:10 mkouba