From patchwork Sat Jan 27 08:11:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rafal Luzynski X-Patchwork-Id: 25611 Received: (qmail 62129 invoked by alias); 27 Jan 2018 08:12:05 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 62108 invoked by uid 89); 27 Jan 2018 08:12:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-20.2 required=5.0 tests=AWL, BAYES_50, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, UNWANTED_LANGUAGE_BODY autolearn=ham version=3.3.2 spammy=u0410, U043C, u0412, U041E X-HELO: ano163.rev.netart.pl X-Spam-Score: 0 Date: Sat, 27 Jan 2018 09:11:58 +0100 (CET) From: Rafal Luzynski Reply-To: Rafal Luzynski To: libc-alpha@sourceware.org Message-ID: <2008726506.198867.1517040718613@poczta.nazwa.pl> In-Reply-To: <876375399.198823.1517040488039@poczta.nazwa.pl> References: <876375399.198823.1517040488039@poczta.nazwa.pl> Subject: [PATCH 1/2] ru_RU, ru_UA: Add alternative month names (bug 10871). MIME-Version: 1.0 X-Originating-Client: com.openexchange.ox.gui.dhtml [BZ #10871] * localedata/locales/ru_RU (mon): Rename to... (alt_mon): This. (abmon): Rename to... (ab_alt_mon): This. (mon): Import from CLDR (genitive case). (abmon): Copy from the old content except the 5th month which is now in the genitive case, even when abbreviated. * localedata/locales/ru_UA: Likewise. * time/tst-strptime.c (day_tests): Add an actual example of a difference between %b and %Ob in Russian. --- localedata/locales/ru_RU | 28 ++++++++++++++++++++++++++-- localedata/locales/ru_UA | 28 ++++++++++++++++++++++++++-- time/tst-strptime.c | 12 +++++++----- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/localedata/locales/ru_RU b/localedata/locales/ru_RU index d7ba374..0149ffc 100644 --- a/localedata/locales/ru_RU +++ b/localedata/locales/ru_RU @@ -122,7 +122,7 @@ abday "";/ "";/ "";/ "" -mon "";/ +alt_mon "";/ "";/ "";/ "";/ @@ -134,7 +134,19 @@ mon "";/ "";/ "";/ "" -abmon "";/ +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +ab_alt_mon "";/ "";/ "";/ "";/ @@ -146,6 +158,18 @@ abmon "";/ "";/ "";/ "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" d_t_fmt "%a %d %b %Y %T" d_fmt "%d.%m.%Y" t_fmt "%T" diff --git a/localedata/locales/ru_UA b/localedata/locales/ru_UA index 3a8d9eb..f8d7a12 100644 --- a/localedata/locales/ru_UA +++ b/localedata/locales/ru_UA @@ -111,7 +111,7 @@ abday "";/ "";/ "";/ "" -mon "";/ +alt_mon "";/ "";/ "";/ "";/ @@ -123,7 +123,19 @@ mon "";/ "";/ "";/ "" -abmon "";/ +mon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" +ab_alt_mon "";/ "";/ "";/ "";/ @@ -135,6 +147,18 @@ abmon "";/ "";/ "";/ "" +abmon "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "";/ + "" d_t_fmt "%a %d %b %Y %T" d_fmt "%d.%m.%Y" t_fmt "%T" diff --git a/time/tst-strptime.c b/time/tst-strptime.c index 49dfbe9..441e04b 100644 --- a/time/tst-strptime.c +++ b/time/tst-strptime.c @@ -66,11 +66,13 @@ static const struct { "pl_PL.UTF-8", "25 lis 2017", "%d %Ob %Y", 6, 328, 10, 25 }, /* ноя - pronounce: 'noya' - "Nov" (abbreviated "November") in Russian. */ { "ru_RU.UTF-8", "26 ноя 2017", "%d %b %Y", 0, 329, 10, 26 }, - /* TODO: Add an example of "may"/"maya" (5th month, May) using %Ob in - Russian when the localedata is updated. Without the genitive forms - in localedata the word "maya" is ambiguous and may be mistaken for - "mart" (March). - */ + /* мая - pronounce: 'maya' - "of May" (the genitive case, both full and + abbreviated) in Russian. */ + { "ru_RU.UTF-8", "19 мая 2018", "%d %b %Y", 6, 138, 4, 19 }, + /* май - pronounce: 'may' - "May" (the nominative case, both full and + abbreviated) in Russian. + The nominative case is incorrect here but it is parseable. */ + { "ru_RU.UTF-8", "20 май 2018", "%d %Ob %Y", 0, 139, 4, 20 }, };