Community
Participate
Working Groups
Having strings externalized makes support for other languages much easier as only a message bundle needs translating. We should externalize all our strings.
Created attachment 17419 [details] externalized strings from PointcutParser
Hmmm. Some of the tests are failing with the patch applied. After some digging there are two problems: 1. in the patch the message id is PointcutPrimitives.WITHIN_CODE in the bundle but it is referred to in WeaverMessages as WITHINCODE. 2. There are multiple changes to PointcutParser so that it has throws clauses like this: throw new UnsupportedOperationException(WeaverMessages.POINTCUT_ARGS); rather than throwing the hardcoded string. Unfortunately that is merely a reference to the key in the WeaverMessages.java source, the key has to be used as a lookup into the bundle to access the real message. This works: throw new UnsupportedOperationException(WeaverMessages.format(WeaverMessages.POINTCUT_ARGS)); but probably could be further simplified with some changes to WeaverMessages.
i've put in the first proposed changes for PointcutParser - code had moved around a bit, so not so much to externalize.