When one is typing 1st the 'st' is transformed to super script. This was only done for english text. Then when typing 1er in a french text, nothing happened, but typing 1st in a french text was running as fine as for an english text. I wanted to fix that issue for a long time... and I finally took some time to do it when I learned that ICU could help me on that point.

To fix this bug, I changed the implementation of:

I found out that the RuleBasedNumberFormat class from ICU4C was correctly providing the localized suffix only for english locale with the current version of ICU used by OOo (4.0.x). As this behaviour has been improved in ICU 4.2, I then have added the patch in the Experimental section of patches/dev300/apply. The patch can be found on the go-oo git repo:

http://cgit.freedesktop.org/ooo-build/ooo-build/tree/patches/dev300/svx-i18n-ordinal-autocorr.diff

There are several related issues upstream, but the main one is: i#20348. Even thought the patch doesn't implement Sun's specifications related to that issue, this is better than nothing...

Here is a screenshot of the autocorrection with that patch.

Screenshot of the new autocorrection for ordinal suffixes

Screenshot of the new autocorrection for ordinal suffixes

I can start here a small list of what I know which could be improved, but this could certainly be extended:

  • ICU formatting is providing only one suffix: there are cases where this suffix has be be changed according to the genre/number, eg: 1er can be also 1ère or 1ers or 1ères in french...
  • ICU provides a default suffix for some locales which may have variations due to users habits, eg: 2e can also be written 2ème in french and it only depends on the local habits.