Ordinal Numbers Auto-Formatting Localization

OpenOffice.org

Document - ID	Specification Owner	Last Change	Status
	Éric Savary	2004-02-27	Final
Conforms to	N/a
Applies to defines	Writer, Calc, Impress, Draw
Task ID(s)	I20348,107004
Category	Feature and bug fix

Abstract

The AutoFormat of ordinal numbers suffixes (Ex: 1st ) formats accordingly to the character language and follows the grammatical rules and exceptions of the current language. This function will be localized and its behavior and user interface will be improved.

i-Team Members (The specification Owner is part of the i-Team)

	Name	E-mail Address
User Experience	Falko Tesch	Falko.Tesch@Sun.COM
Development	Oliver Specht	Oliver.Specht@Sun.COM
Quality Assurance	Éric Savary	Eric.Savary@Sun.COM
Documentation	Yvonne Jacoby	yvonne.jacoby@sun.com

Approved for Implementation

	Approved by	Date
User Experience defines	Falko Tesch	2004-05-05
Development	Andreas Martens Oliver Specht	2004-05-05
Quality Assurance	Éric Savary	2004-05-04
Documentation	Yvonne Jacoby	2004-05-04
String Review	Elizabeth Matthis	

Document Change History

Rev. Level	Change	Initials	Date
1.0	First draft		2004-02-27

Contents

Glossary	1

1	Motivation	1

2	User Scenarios	1

2.1	Scenario A: missing localization	1

2.2	Scenario B: wrong replacement	1

3	Goals	1

4	Requirements and Dependencies	1

4.1	Requirements	1

4.2	Technical Dependencies	2

5	Competitive Analyses	2

6	Detailed Specification	2

6.1	General behavior	2

6.2	Localization of the ordinal numbers AutoFormat	2

6.6	Improvement of the AutoFormat of English ordinal numbers	3

6.7	G11n	5

6.8	Error Conditions	5

7	Future Tasks	5

8	Notes	5

9	References	5

Glossary

Term	Description
Ordinal number	A number designating the place (as first, second, or third) occupied by an item in an ordered sequence.
AutoFormat of ordinal numbers	In some languages, the short written form of those numbers is : <number><ordinal_suffix_superscript> The function “Replace ordinals (1st) with superscript” recognizes and formats the suffix accordingly.

Motivation

The ordinals AutoFormat needed to be localized to ensure Microsoft interoperability and general usability.

User Scenarios

Scenario A: missing localization

Brigitte is writing a letter to French customer. As she writes the date in French (1er avril 2005 – 1st April 2005) she notices that the suffix “er” is not automatically formatted as superscript. She checks that under “Tools – AutoCorrect/AutoFormat – [Options]”, the option (in a French OOo) “Remplacer 1er par 1^er” (“Replace 1st with 1^st”) is activated. Yes it is but this function does not work for any other language than English.

Scenario B: wrong replacement

Danila is writing a letter to an English customer. Instead of writing “1st”, he accidentally types “11st”. Though this would be wrong, the AutoFormat function replaces “11st” by “11st”. He also notices that the AutoFormat transforms correctly 12th and 13th but also accepts 12nd,. 13Rd, 22th or 33th...

Goals

This specification describes the localization needs of the ordinal numbers AutoFormat function (See Scenario A). It also defines improvements in the replacement algorithm (Scenario B).

Requirements and Dependencies

Requirements

Technical Dependencies

none

Competitive Analyses

MS-Word 2002/2003

Microsoft Word has a localized AutoFormating function which formats the accurate suffix depending on the language of the current character.

- For instance: in a paragraph formatted for Spanish, “1o” will be replaced with “1o” but “1st” will remain “1st”.

The replacement algorithm does not only considers the last digit of the ordinal number but includes exceptions such as “12th” (and not “12nd”) or “13th” (and not “13rd ”)

Word Perfect 11

Word Perfect seems to provide only support for English ordinals (at least in their English version of WordPerfect 11).

This feature can be found under “Tools – QuickCorrect – Format-As-You-Go”.

Detailed Specification

General behavior

The auto superscript of ordinal numbers only works if the language set under “Format – Character” knows this formatting.

Ex: “1st”, “1er” will remain unformatted if the character language is German or Spanish for German does not know suffixes for ordinal numbers and because “1st” and “1er” are not Spanish suffixes.

Here is a sum up of the behavior of this function depending on which languages are installed/active:

1. “Is the language set to the current character installed”?

a) YES: go to 2.

b) NO: go to 2.b)

2. “Does the current character language supports ordinal numbers formatting?”

a) YES: apply replacement algorithm

b) NO: do nothing

A not installed language has the same impact on this feature then let's say German: nothing happens.

Localization of the ordinal numbers AutoFormat

This specification considers three languages other than English: French, Italian, Spanish.

Localized strings and algorithm for French

Rule:

Accept superscript of “e” and “es” after any number

Exceptions:

After “1” (as number! Not as last digit of another number!), accept to superscript only: “er”, “ers”, “re”, “res”

Particularity:

- Accept to superscript “ième” and “ièmes” after the letters “n” and “x”. (can be done using the replacement table of the AutoCorrection)

So replace:

Typed	Formatted
nième	nième
nièmes	nièmes
xième	xième
xièmes	xièmes

Localized strings and algorithm for Italian

Rules:

Accept superscript of “a”, “e”, “i”, “o” from 1 to 10

Accept following superscripts AND transformations for any number after 10:

Example:

Typed	Formatted
11esimo	11o
11esima	11a
11esimi	11i
11esime	11e

Exceptions:

No grammatical check or exception depending on the digit(s) preceding the ordinal notation.

Localized strings and algorithm for Spanish

Rule:

Accept superscript of “a”, “as”, “er”, “o”, “os”

Exceptions:

No grammatical check or exception depending on the digit(s) preceding the ordinal notation.

Particularity:

Accept superscript also “er” for 1 and 3 (as number! Not as digit)

Improvement of the AutoFormat of English ordinal numbers

Rule:

Accept superscript of “th”only, for all numbers

Exceptions ('~' stands for 'any other digit'):

Typed	Formatted
~1st	~1st
~2nd	~2nd
~3rd	~3rd

Exceptions to the above exceptions:

Typed	Formatted
11th	11th
12th	12th
13th	13th

Illustration 1The new denomination of the ordinal AutoFormat

String List

Item	English	German	Comments
Checkbox	Replace ordinals (1st) with superscript	Ordnungszahlen (z.B.: 1st) hochstellen	ES: in German (and any language which won't use this feature) it would be more correct to write “Ordnungszahlen (z.B.: 1st) hochstellen” for this replacement does not only apply to English. FT: I agree! I think that the affected languages should use their very own format example in this string. And the in languages where it does not apply a “z.B.” seems appropiate (I vote for English as standard for this example)

Tab Order

doesn't apply

Key Board Shortcuts

doesn't apply

G11n

The whole purpose of this specification is too improve the globalization.

Error Conditions

doesn't apply

Future Tasks

Maybe find a better place for this option. This function is locale dependent but the tab page it is placed on is not (language list box disabled)

Notes

References

Required - Give references to related documentation, such as engineering designs, technical specs, and other sources for related units. Also include links to documents that other sections in this spec need to refer to, such as user opinions usability test reports.

Ordinal Numbers Auto-Formatting Localization

Page 5

http://specs.openoffice.org/i18n/ordinal_numbers/ordinal_numbers.sxw

Éric Savary

2003-11-24T15:22:14