You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/01/23 11:28:00 UTC
[jira] [Work logged] (WW-5112) Add ability (control flag) for TextProviders to prioritize reads from the default resource bundlest.
[ https://issues.apache.org/jira/browse/WW-5112?focusedWorklogId=713325&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-713325 ]
ASF GitHub Bot logged work on WW-5112:
--------------------------------------
Author: ASF GitHub Bot
Created on: 23/Jan/22 11:27
Start Date: 23/Jan/22 11:27
Worklog Time Spent: 10m
Work Description: lukaszlenart opened a new pull request #527:
URL: https://github.com/apache/struts/pull/527
Addresses @gregh3269's comment in [WW-5112](https://issues.apache.org/jira/browse/WW-5112)
--
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: dev-unsubscribe@struts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 713325)
Remaining Estimate: 0h
Time Spent: 10m
> Add ability (control flag) for TextProviders to prioritize reads from the default resource bundlest.
> ----------------------------------------------------------------------------------------------------
>
> Key: WW-5112
> URL: https://issues.apache.org/jira/browse/WW-5112
> Project: Struts 2
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.6
> Reporter: James Chaplin
> Assignee: Lukasz Lenart
> Priority: Minor
> Labels: pull-request-available
> Fix For: 2.6
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> This proposed improvement derives from a discussion on the Struts Developer List, with the general idea introduced by Greg Huber.
> Improvement: Introduce a new STRUTS_I18N_SEARCH_DEFAULTBUNDLES_FIRST control flag constant, and accompanying logic, with the default setting being _false_.
> The new control flag will be used by AbstractLocalizedTextProvider descendants to identify alternative I18N resource bundle lookup logic that prioritizes key lookup in the default resource bundles (in cases where such a distinction makes sense).
> The StrutsLocalizedTextProvider will use the flag to determine whether searches for resources will check the default bundles first (if the flag is _true_) or last (if the flag is _false_) for a match to a lookup key. The GlobalLocalizedTextProvider only searches default bundles, so the flag will have no effect on it.
> The _false_ setting corresponds to the standard lookup logic for the TextProviders in Struts 2, and will be the default, so that there will be no impact to existing applications. Applications that wish to enable the alternate lookup will do so by setting the flag to _true_ in their Struts configuration.
> With a _true_ setting, if a key exists in a default resource bundle (such as the application's default resource bundle), it will supersede any such key in other bundles (such as ones at the package or class level). This will allow for a different resource bundle strategy when using the StrutsLocalizedTextProvider, and may be more efficient for applications that either only use a single global application resource bundle. or that use such a bundle for the vast majority of their I18N resource keys.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)