1 |
/* MessageFormat.java - Localized message formatting. |
/* MessageFormat.java - Localized message formatting. |
2 |
Copyright (C) 1999, 2001 Free Software Foundation, Inc. |
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
373 |
if (formatter instanceof ChoiceFormat) |
if (formatter instanceof ChoiceFormat) |
374 |
{ |
{ |
375 |
StringBuffer buf = new StringBuffer (); |
StringBuffer buf = new StringBuffer (); |
|
// FIXME: don't actually know what is correct here. |
|
|
// Can a sub-format refer to any argument, or just |
|
|
// the single argument passed to it? Must test |
|
|
// against JDK. |
|
376 |
formatter.format(thisArg, buf, ignore); |
formatter.format(thisArg, buf, ignore); |
377 |
MessageFormat mf = new MessageFormat (); |
MessageFormat mf = new MessageFormat (); |
378 |
mf.setLocale(locale); |
mf.setLocale(locale); |
379 |
mf.applyPattern(buf.toString()); |
mf.applyPattern(buf.toString()); |
380 |
formatter = mf; |
mf.format(arguments, appendBuf, ignore); |
381 |
} |
} |
382 |
formatter.format(thisArg, appendBuf, ignore); |
else |
383 |
|
formatter.format(thisArg, appendBuf, ignore); |
384 |
} |
} |
385 |
|
|
386 |
appendBuf.append(elements[i].trailer); |
appendBuf.append(elements[i].trailer); |