For ICU 4.8, we want to tackle some of the MessageFormat (and related) work that has piled up. For more ideas and things to do see the Message Formatting Redesign page and the common parent page.
StatusImplemented in ICU 4.8. For a summary of benefits and incompatible changes, see the ICU 4.8 download page. (That page refers back here and to subpages for details.) DemoSee the MessagePatternDemo class and the MiniMessageFormatter it calls. DocsMessageFormat syntax currently in the API docsMessageFormat in the User Guide Proposals & discussionsSee also the Questions & Decisions sub-page. icu-design 2010-08-19 23:24: need stronger form of MessageFormat.autoQuoteApostrophe() icu-design 2010-08-24 00:26: ICU API proposal: MessageFormat with autoQuoteApostrophe() behavior by default ... branched here ... including on 2010-08-25 19:24: We discussed this in the ICU team meeting today, and reached the following consensus: - Change the default parsing behavior but implement both variants. - In Java, the old behavior can be chosen via an ICUConfig class backed by a .properties file. (Essentially at build time.) - In C++, the old behavior can be chosen via a #define to uconfig.h . (Also at build time.) icu-design 2010-08-27 00:28: modify MessageFormat.autoQuoteApostrophe()? icu-design 2010-08-26 21:25: ICU PluralFormat: not possible to have # in fragment? icu-design 2010-07-27 20:23: proposal: extend plural format syntax setFormat() etc.If we could get rid of MessageFormat.setFormat() & siblings (deprecate, and throw UnsupportedOperationException), then we need to fix or replace several internal uses... which proved non-trivial, especially because such MessageFormat objects are used not only for formatting (where a preformatted string could have been passed in rather than using a custom Format object) but also for parsing. We decided that we needed to implement setFormat() etc., and it was not too hard. We did remove one feature that already did not work well: We dropped support for toPattern() when custom formats have been set, because there is no good way in general to construct a pattern string. See the following ideas for some discussion. If we had to implement setFormat() etc. with toPattern() support, then here are some ideas:
TicketsUmbrella ticket: #8319: MessageFormat 2011q1 #2322: Add string ids to Message Format (this got done in 2007, but review the API ideas here)
#5904: Implement PluralFormat#formatToCharacterIterator
#6306: C wrapper for PluralRules and PluralFormat.
#6466: PluralFormat special case for "zero" (superseded by #7858)
#6563: ICU4J MessageFormat allocates a big int[] on the first call
#6858: Use of PluralFormat is poorly documented
#6881: Issue: PluralFormat interoperability with NumberFormat (MessageFormat)
#6985: PluralFormat should return error if any mismatch between pattern and locale.
#7048: Named arguments feature in MessageFormat is not well documented
#7165: introduce MessageFormat base class: only string substitution
#7181: autoQuoteApostrophe doesn't work in nested subformats
#7457: move LocaleDisplayNames class (C++) to the common library once we have MessageFormatBase there
#7510: Fix remaining problems in MessageFormat (getFormats(), setFormat(), setFormatByArgumentIndex(), setFormatByArgumentName(), getFormatsByArgumentIndex(), named vs. numeric arguments, ease of calling with named arguments)
#7575: selectFormat docs should move to userguide
#7618: Use of Simple MessageFormat alternative in ICU implementation in ICU4J
#7682: MessageFormat::format and argument inconsistency
#7691: add Format method to describe itself for MessageFormat::toPattern()
#7858: Extend PluralFormat syntax with offset and explicit values
#7860: ideas for better PluralFormat/MessageFormat performance
#7904: MessageFormat should allow and trim whitespace around argument number/name
#7905: MessageFormat.applyPattern() can fail on a Turkish system
#7917: PluralFormat replaces quoted # signs
#7918: ICU4J MessageFormat should not use java.text.ChoiceFormat
#7938: umsg.h documentation out of sync with class MessageFormat
#8095: MessageFormat class provide method to get argument names
#8106: ICU4J MessageFormat needs performance improvement
#8191: getArgTypeList should have same behavior with named/numbered argument pattern.
#8245: getFormatNames should get the name but not
#8325: bug in the MessageFormat::getFormat(const UnicodeString& formatName, UErrorCode& status)
|