>Hm... I think defining struts.custom.i18n.resources should resolve your problem >struts.custom.i18n.resources=ApplicationResources
I already have this, but since I came from a struts 1, I am not motivated to use the class package logic as there would be too much duplication and maintenance of all the .properties files. I do use package files for validation, just not the UI layer, so I still need to do the nifty thing (all though I do get warning messages with the modification doing the default first for these). The package search is just too extensive as it looks at interfaces of the classes etc and is too much of an overhead for busy screens. Just the package where the action class is should be enough? Maybe it would be useful to have a method in DefaultLocalizedTextProvider that only does the search/order so we could override it and implement our own. Cheers Greg On 14 March 2017 at 18:24, Lukasz Lenart <[email protected]> wrote: > 2017-03-14 16:13 GMT+01:00 Greg Huber <[email protected]>: > > I replace: > > > > // search up class hierarchy > > String msg = findMessage(aClass, aTextName, indexedTextName, > > locale, args, null, valueStack); > > > > with: > > > > GetDefaultMessageReturnArg result = null; > > if (indexedTextName == null) { > > // Use a null for the defaultMessage to ensure > > // package check is done if not found. Will get dev messages > if > > // not found in default packages. > > result = getDefaultMessage(aTextName, locale, valueStack, > args, > > null); > > } > > String msg = null; > > if (result == null) { > > // search up class hierarchy > > msg = findMessage(aClass, aTextName, indexedTextName, locale, > > args, > > null, valueStack); > > } else { > > msg = result.message; > > } > > > > Guess I will have to continue this mod unless there is some way to > override > > the default search package nifty thing. > > Hm... I think defining struts.custom.i18n.resources should resolve your > problem > > struts.custom.i18n.resources=ApplicationResources > > Or you can implement your own LocalizedTextProvider and used instead > the one provided by the framework (when my gets merged :) Anyway I > think this is good to merge, we can think about improving it with > another PR. > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
