We're updating the issue view to help you get more done. 

Fractions in plurals

Description

Deleted Component: other

(Updated after review.)

This is a proposal for additions to plural categories for better support of plurals with fractions. A common issue is that languages seem to work by the visible digits, so 1.0 hours vs 1 hour. That means that client software needs to allow for an additional parameter, which is the number of visible digits.

== Data ==

The patterns we have seen are:

1. All fractions get the same form. (Eg, 'other' for Polish, English).
Can be done now.

2. Go by the base form: that is, 2.x has the same form as 2.
Can be done now.

3. Go by whether there are any visible fraction digits. So 1 gets 'other' but 1.0 gets 'other'.
Can't be done now. This is needed for English.

4. Go by the last visible digit of the fraction. So 1.2 gets 'two' and 2.1 gets 'one'.
Can't be done now.

5. Go by the last two digits of the fraction (if there are 2, otherwise one of 1/2/3). So 1.23 gets the same form as 23 does.
Can't be done now.

== Design Proposal ==

A possibility for handling the above is to extend the rules in the following way.

1. Define:

  • v to be the number of visible fraction digits.

  • f to be the visible fractional digits.

  • i to be the integer digits.

2. Extend the syntax to be:

  • expr = 'n' ('mod' value)?

to

  • expr = ('n' | 'i' | 'f' | 'v') ('mod' value)?

Examples

n

f

v

1.0

0

1

1.00

0

2

1.3

3

1

1.03

3

2

1.23

23

2

== Rule Changes ==

Then the rules can be augmented to use 'f' and 'v'. Examples:

  • For #3, one can have one: n is 1 AND v is 0

  • For #4, one can have "f mod 10 = 3"

  • For #5, "v is 2 AND f mod 10 is 3"

See also:
http://bugs.icu-project.org/trac/ticket/8474

Environment

xpath

None

locale

None

Status

Assignee

Mark Davis

Reporter

Mark Davis

Labels

tracReporter

mark

tracOwner

mark

tracResolution

fixed

tracStatus

closed

Reviewer

Peter Edberg

tracCreated

Apr 13, 2011, 9:15 PM

Fix versions

Priority

major