From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127587 invoked by alias); 13 Jan 2016 21:20:09 -0000 Mailing-List: contact libc-locales-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-locales-owner@sourceware.org Received: (qmail 109134 invoked by uid 48); 13 Jan 2016 19:07:14 -0000 From: "van.de.bugger at gmail dot com" To: libc-locales@sourceware.org Subject: [Bug localedata/10871] ru_RU: 'mon' array should contain both nominative and genitive cases Date: Wed, 13 Jan 2016 21:20:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: localedata X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: van.de.bugger at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: libc-locales at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016-q1/txt/msg00024.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D10871 --- Comment #19 from van.de.bugger at gmail dot com --- (In reply to Rafal Luzynski from comment #7) Thanks for a good analysis. However, I do not agree with your approach.=20 > 1. Do not change the API, implement an internal algorithm which would > analyze a full format string and determine whether %B should format the > month name in a nominative or genitive case.=20 This is a bad idea. You left programmer with no control over the result. For example: someone used format string like "This is %B" (I used English, but imagine another language, like Polish). Later his decided to include day number: "This is %B, today is day #%e." Since %B remains intact, programmer would assume the first part of the message remains intact too, but "artific= ial intelligence" may have own opinion and change case of month name depending = on presence or absence of %e or whatever else. To me this is not acceptable. Also, month name is not the only name in strftime. Look at %A =E2=80=94 it'= s weekday name, which also has multiple forms/cases. > 2. Follow the specification already used in *BSD family (which also inclu= des > OS X and iOS): https://www.freebsd.org/cgi/man.cgi?query=3Dstrftime&sekti= on=3D3. This is not *BSD but POSIX: http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html Description of strftime is not very clear what "alternative representation"= and "alternative numeric symbols", but=20 http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html adds some details. Both of %O and %E are not for changing case of month nam= e. Thus, I will propose an extension, dedicated for the problem. Current conversion specifier looks like: "%" flag width [ modifier ] format where "%" and "." are literal strings; flag =E2=80=94 one of GNU flags: "-"= , "_", "0", "^" (see "info strftime"), width is a positive integer, modifier is either= "E" or "O", format =E2=80=94 one of documented letters (a, b, B, c, C, ...). Extension may utilize syntax of "precision" used in "printf", e. g.: "%" flag width [ "." precision ] [ modifier ] format in "strftime" precision =3D grammatic case number. In case of Russian "prec= ision" would be in range 1..6 (since in Russian language nouns have 6 cases): %.1B =E2=80=94 month name in nominative case %.2B =E2=80=94 month name in accusative case %.3B =E2=80=94 month name in genitive case %.4B =E2=80=94 month name in dative case %.5B =E2=80=94 month name in instrumental case %.6B =E2=80=94 month name in prepositional case Note that this is universal and can be used with week day names too: %.1A, %.2A, etc. "Precision" zero (".0") is used as default (when case is not specified) and= as fallback (when specified "precision" is out of range for current locale). "Precision" can be combined with width: %20.1B. In such a case strftime maintains compatibility =E2=80=94 behaviour of exis= ting programs is not affected, but in new (versions of the) programs developers = are free to specify case of names precisely. --=20 You are receiving this mail because: You are the assignee for the bug.