[
https://issues.apache.org/jira/browse/OWB-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul J. Reder updated OWB-191:
------------------------------
Attachment: ResourceBundlePort.patch
This patch adds two new files:
webbeans-impl/src/main/resources/javax/openwebbeans/Messages_en.properties
and
webbeans-impl/src/main/java/org/apache/webbeans/config/OWBLogConst.java
adds ResourceBundle support to:
webbeans-impl/src/main/java/org/apache/webbeans/logger/WebBeansLogger.java
and updates most of the OWB code to use const-based keys to reference the
bundle instead of using hard-coded strings. The bundled strings now support
formatting substitutions using Object[] args in the log calls.
This patch will still allow non-keyed values to be logged as they were before,
but supports keyed references to bundled strings with formatting.
This patch contains a first pass at constant and key values. Those values can
easily be changed to suit any standardized const/key format.
The properties and constants files have been located in what I think is the
right place, but can certainly be moved elsewhere.
Please let me know if there is anything else I can do to make it easier to
commit this.
> Convert logging to use keyed, formatted strings from a ResourceBundle to
> allow for translation.
> -----------------------------------------------------------------------------------------------
>
> Key: OWB-191
> URL: https://issues.apache.org/jira/browse/OWB-191
> Project: OpenWebBeans
> Issue Type: Improvement
> Components: Core
> Environment: All.
> Reporter: Paul J. Reder
> Assignee: Gurkan Erdogdu
> Attachments: ResourceBundlePort.patch
>
>
> Currently all logs and exceptions use hard coded strings that are embedded
> throughout the source. The attached patch converts the code to use key-based
> strings from a ResourceBundle so that all strings are collected in one place
> to enable translation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.