[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #5879(closed defect: fixed)

Opened 5 years ago

Last modified 3 years ago

Spellout error for thousands in locale PL

Reported by: pedberg Owned by: grhoten
Component: data-other Data Locale:
Phase: rc Review: emmons
Weeks: Data Xpath:
Xref:

ticket:6775

Description

This was originally filed as ICU ticket http://bugs.icu-project.org/trac/ticket/10087

See the unit test attached to that ticket.
org.junit.ComparisonFailure: expected:<...wadzieścia trzy tysi[ące]> but was:<...wadzieścia trzy tysi[ęcy]>

Attachments

Change History

comment:1 Changed 5 years ago by kent.karlsson14@…

The rules below seem to give the correct output. However, they do not produce the correct value back when parsing (with the current implementation of RBNF). The current rules are a compromise, giving almost the correct spelling (in this regard), i.e. for 1,2-4,5-... but not the repeat, and still allow (with current RBNF implementation) correct read back. Most, maybe all, of the Slavic languages have this problem.

%%ecy:

0: ęcy;
1: ąc;
2: ące;
5: ęcy;
20: >>;
100: >>;


%%xthousand:

0: =%spellout-cardinal-masculine= tysi=%%ecy=;

%%ow:

0: ów;
1: ;
2: y;
5: ów;
20: >>;
100: >>;

%%xmillion:

0: =%spellout-cardinal-masculine= milion=%%ow=;

%%xmilliard:

0: =%spellout-cardinal-masculine= miliard=%%ow=;

%%xbillion:

0: =%spellout-cardinal-masculine= bilion=%%ow=;

%%xbilliard:

0: =%spellout-cardinal-masculine= biliard=%%ow=;

%spellout-cardinal-masculine:

-x: minus >>;
x.x: << przecinek >>;

0: zero;
1: jeden;
2: dwa;
3: trzy;
4: cztery;
5: pięć;
6: sześć;
7: siedem;
8: osiem;
9: dziewięć;

10: dziesięć;
11: jedenaście;
12: dwanaście;
13: trzynaście;
14: czternaście;
15: piętnaście;
16: szesnaście;
17: siedemnaście;
18: osiemnaście;
19: dziewiętnaście;

20: dwadzieścia[ >>];
30: trzydzieści[ >>];
40: czterdzieści[ >>];
50: <<dziesiat[ >>];

100: sto[ >>];
200: <%spellout-cardinal-feminine<ście[ >>];
300: <%spellout-cardinal-feminine<sta[ >>];
500: <%spellout-cardinal-feminine<set[ >>];

1000: <%%xthousand<[ >>];
1000000: <%%xmillion<[ >>];
1000000000: <%%xmilliard<[ >>];
1000000000000: <%%xbillion<[ >>];
1000000000000000: <%%xbilliard<[ >>];

1000000000000000000: =#,##0=;

%spellout-cardinal-neutre:

-x: minus >>;
x.x: << przecinek >>;

0: zero;
1: jedno;
2: =%spellout-cardinal-masculine=;

20: dwadzieścia[ >>];
30: trzydzieści[ >>];
40: czterdzieści[ >>];
50: <<dziesiat[ >>];

100: sto[ >>];
200: <%spellout-cardinal-feminine<ście[ >>];
300: <%spellout-cardinal-feminine<sta[ >>];
500: <%spellout-cardinal-feminine<set[ >>];

1000: <%%xthousand<[ >>];
1000000: <%%xmillion<[ >>];
1000000000: <%%xmilliard<[ >>];
1000000000000: <%%xbillion<[ >>];
1000000000000000: <%%xbilliard<[ >>];

1000000000000000000: =#,##0=;

%spellout-cardinal-feminine:

-x: minus >>;
x.x: << przecinek >>;

0: zero;
1: jedna;
2: dwie;
3: =%spellout-cardinal-masculine=;

20: dwadzieścia[ >>];
30: trzydzieści[ >>];
40: czterdzieści[ >>];
50: <<dziesiat[ >>];

100: sto[ >>];
200: <%spellout-cardinal-feminine<ście[ >>];
300: <%spellout-cardinal-feminine<sta[ >>];
500: <%spellout-cardinal-feminine<set[ >>];

1000: <%%xthousand<[ >>];
1000000: <%%xmillion<[ >>];
1000000000: <%%xmilliard<[ >>];
1000000000000: <%%xbillion<[ >>];
1000000000000000: <%%xbilliard<[ >>];

1000000000000000000: =#,##0=;

comment:2 Changed 5 years ago by emmons

  • Owner changed from anybody to grhoten
  • Priority changed from assess to medium
  • Status changed from new to assigned
  • Milestone changed from UNSCH to 24rc

comment:3 Changed 5 years ago by grhoten

The structure reminds me of Ukrainian and Russian. I'll have to look at those too.

comment:4 Changed 5 years ago by grhoten

Also there are no ordinals. It looks like a round of vetting with the online Number Format Tester is required.

http://st.unicode.org/cldr-apps/numbers.jsp?locale=pl

comment:5 Changed 4 years ago by kuba.bochenski@…

Hi, I reported this bug to ICU.

Sorry for a slight off-topic, but what is the fastest way to apply the above patch to ICU4J?

Do I have to download and build sources for both CLDR and ICU4J, or is there an easier way, like replacing a resource file somewhere?

comment:6 Changed 4 years ago by grhoten

The following rules roundtrip, but the spellout-cardinal-feminine type comes out wrong. I can't quite get all types to roundtrip and be correct. I'm attaching these rules as an intermediate step while the correct fix is being worked on.

%spellout-numbering-year:
x.x: =#,###0.#=;
0: =%spellout-numbering=;
%spellout-numbering:
0: =%spellout-cardinal-masculine=;
%spellout-cardinal-masculine:
-x: minus >>;
x.x: << przecinek >>;
0: zero;
1: jeden;
2: dwa;
3: trzy;
4: cztery;
5: pięć;
6: sześć;
7: siedem;
8: osiem;
9: dziewięć;
10: dziesięć;
11: jedenaście;
12: dwanaście;
13: trzynaście;
14: czternaście;
15: piętnaście;
16: szesnaście;
17: siedemnaście;
18: osiemnaście;
19: dziewiętnaście;
20: dwadzieścia[ >>];
30: trzydzieści[ >>];
40: czterdzieści[ >>];
50: <<dziesiąt[ >>];
100: sto[ >>];
200: dwieście[ >>];
300: <<sta[ >>];
500: <<set[ >>];
1000: <%%tysi<[ >>];
1000000: <%%milion<[ >>];
1000000000: <%%miliard<[ >>];
1000000000000: <%%bilion<[ >>];
1000000000000000: <%%biliard<[ >>];
1000000000000000000: =#,##0=;
%spellout-cardinal-neuter:
-x: minus >>;
x.x: << przecinek >%%spellout-fraction>;
0: zero;
1: jedno;
2: =%%spellout-cardinal-neuter-priv=;
%%spellout-cardinal-neuter-priv:
1: jeden;
2: =%spellout-cardinal-masculine=;
20: dwadzieścia[ >>];
30: trzydzieści[ >>];
40: czterdzieści[ >>];
50: <<dziesiąt[ >>];
100: sto[ >>];
200: dwieście[ >>];
300: <%spellout-cardinal-masculine<sta[ >>];
500: <%spellout-cardinal-masculine<set[ >>];
1000: <%%tysi<[ >>];
1000000: <%%milion<[ >>];
1000000000: <%%miliard<[ >>];
1000000000000: <%%bilion<[ >>];
1000000000000000: <%%biliard<[ >>];
1000000000000000000: =#,##0=;
%spellout-cardinal-feminine:
-x: minus >>;
x.x: << przecinek >%%spellout-fraction>;
0: zero;
1: jedna;
2: =%%spellout-cardinal-feminine-priv=;
%%spellout-cardinal-feminine-priv:
1: jeden;
2: dwie;
3: =%spellout-cardinal-masculine=;
20: dwadzieścia[ >>];
30: trzydzieści[ >>];
40: czterdzieści[ >>];
50: <<dziesiąt[ >>];
100: sto[ >>];
200: dwieście[ >>];
300: <<sta[ >>];
500: <<set[ >>];
1000: <%spellout-cardinal-masculine< tysiąc[ >>];
2000: <%spellout-cardinal-masculine< tysiące[ >>];
5000: <%spellout-cardinal-masculine< tysięcy[ >>];
1000000: <%spellout-cardinal-masculine< milion[ >>];
2000000: <%spellout-cardinal-masculine< miliony[ >>];
5000000: <%spellout-cardinal-masculine< milionów[ >>];
1000000000: <%spellout-cardinal-masculine< miliard[ >>];
2000000000: <%spellout-cardinal-masculine< miliardy[ >>];
5000000000: <%spellout-cardinal-masculine< miliardów[ >>];
1000000000000: <%spellout-cardinal-masculine< bilion[ >>];
2000000000000: <%spellout-cardinal-masculine< biliony[ >>];
5000000000000: <%spellout-cardinal-masculine< bilionów[ >>];
1000000000000000: <%spellout-cardinal-masculine< biliard[ >>];
2000000000000000: <%spellout-cardinal-masculine< biliardy[ >>];
5000000000000000: <%spellout-cardinal-masculine< biliardów[ >>];
1000000000000000000: =#,##0=;
%%ecy:
0: ęcy;
1: ąc;
2: ące;
5: ęcy;
20: >>;
100: >>;
%%tysi:
0: =%spellout-cardinal-masculine= tysi=%%ecy=;
%%ow:
0: ów;
1: ;
2: y;
5: ów;
20: >>;
100: >>;
%%milion:
0: =%spellout-cardinal-masculine= milion=%%ow=;
%%miliard:
0: =%spellout-cardinal-masculine= miliard=%%ow=;
%%bilion:
0: =%spellout-cardinal-masculine= bilion=%%ow=;
%%biliard:
0: =%spellout-cardinal-masculine= biliard=%%ow=;
%%spellout-fraction:
10: <%%spellout-fraction-digits<<;
100: <%%spellout-fraction-digits<<;
1000: <%%spellout-fraction-digits<<;
10000: <%%spellout-fraction-digits<<;
100000: <%%spellout-fraction-digits<<;
1000000: <%%spellout-fraction-digits<<;
10000000: <%%spellout-fraction-digits<<;
100000000: <%%spellout-fraction-digits<<;
1000000000: <%%spellout-fraction-digits<<;
10000000000: <0<;
%%spellout-fraction-digits:
0: =%spellout-cardinal-masculine=;
10: << >>;

comment:7 Changed 4 years ago by grhoten

There seems to be some sort of rule order problem that is causing this issue.

comment:8 Changed 4 years ago by grhoten

There might be a bug in ICU that is preventing this from working correctly.

comment:9 Changed 4 years ago by grhoten

  • Milestone changed from 24rc to 25dsub

I need to debug ICU to investigate this issue. I can't make the CLDR 24 release.

comment:10 Changed 4 years ago by emmons

  • Milestone changed from 25dsub to 25rc

Moving all 25dsub and 25design tickets to 25rc. If you plan to complete items in the 25M1 time frame, please move those tickets to 25M1.

comment:11 Changed 4 years ago by grhoten

  • Xref set to 6775

comment:12 Changed 4 years ago by emmons

  • Milestone changed from 25rc to 26rc

comment:13 Changed 3 years ago by grhoten

  • Status changed from assigned to reviewing
  • Review set to emmons

I've submitted icubug:10880 to track the rule parsing issue. I think all I can do is fix the masculine and neuter forms. The feminine form just isn't working.

comment:14 Changed 3 years ago by emmons

  • Status changed from reviewing to closed
  • Resolution set to fixed

comment:15 Changed 3 years ago by markus

  • Phase set to rc
  • Milestone changed from 26rc to 26

comment:16 Changed 3 years ago by pedberg

  • Component changed from data-main to data-other
View

Add a comment

Modify Ticket

Action
as closed
Next status will be 'new'
Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.