[Clirr-devel] message strings in reports
Status: Alpha
Brought to you by:
lkuehne
From: Simon K. <si...@ec...> - 2004-06-23 22:23:23
|
Hi, Currently, when api differences are reported, the check generating the report manually builds the difference "description" string. This has a couple of problems. Firstly, multi-language support can't be done. It would be nice to be able to provide clirr reports in languages other than english (German and French translations shouldn't be too hard to arrange :-). More importantly, the current messages tend to be terse. In many cases, I think it would be desirable for differences to be able to reference a longer description of the problem, eg "for more info, see issue #7 in the clirr docs", where clirr documentation has a couple of paragraphs explaining why issue #7 is a binary incompatibility, or why it is a warning and under what circumstances problems can occur. I propose that some kind of "ReportMessage" class be created that is capable of reading messages from an external resource file. When checks report differences, they indicate just "Message #7" rather than build the exact string. The ApiDifference class can then use the ReportMessage class to build the "short description" (potentially using the standard Java string interpolation syntax of {0} and {1} to insert class and method/field names). The message code can also be used to reference an external doc that describes the problem in more detail. Thoughts? Regards, Simon |