geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cabrera, Alan" <Alan.Cabr...@reuters.com>
Subject RE: [i18n] Hardcoded message strings
Date Wed, 20 Aug 2003 13:48:39 GMT


> -----Original Message-----
> From: Alex.Blewitt@ioshq.com [mailto:Alex.Blewitt@ioshq.com] 
> 
> Perhaps I should have made myself a bit clearer; it wasn't 
> necessarily calling the log method of the logger. Rather, I 
> should have said that the logger can do a println statement, 
> instead of building a temporary StringBuffer (which is in 
> effect what the java.text format does)
> 
> class Logger {
>   Writer out;
>   logString pattern, int i) {
>     //parsepattern
>     StringBuffer buffer = new StringBuffer();
>     buffer.add(firstPartOfPattern);
>     buffer.add(String.valueOf(i));
>     buffer.add(secondPartOfPattern);
>     out.write(buffer.toString());
>     out.writeln();
>   }
> }
> 
> class Logger {
>   Writer out;
>   logString pattern, int i) {
>     //parsepattern
>     out.write(firstPartOfPattern);
>     out.write(String.valueOf(i));
>     out.write(secondPartOfPattern);
>     out.writeln();
>   }
> }

The devil is in the details, here "parsepattern".  How is that better than
using the existing i18n formatter?


Regards,
Alan


---------------------------------------------------------------- 
      Visit our Internet site at http://www.reuters.com 

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit <http://www.reuters.com/messaging> 

Any views expressed in this message are those of  the  individual sender,
except  where  the sender specifically states them to be the views of The
Reuters Group.

Mime
View raw message