Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 1 | Fix the last few remaining bugs in glib's date/locale code. |
| 2 | |
| 3 | Upstream-Status: Backport |
| 4 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 5 | |
| 6 | From 93d8482384ebc5c7d1f3d92b0190db0371269663 Mon Sep 17 00:00:00 2001 |
| 7 | From: Rafal Luzynski <digitalfreak@lingonborough.com> |
| 8 | Date: Fri, 10 May 2019 00:40:27 +0200 |
| 9 | Subject: [PATCH] build: Fix a typo in the test whether _NL_ABALTMON_n is |
| 10 | supported |
| 11 | |
| 12 | The correct spelling is "_NL_ABALTMON_n" rather than "_NL_ALTMON_n". |
| 13 | The typo made Meson build think that _NL_ABALTMON_n constants are |
| 14 | not supported which was totally wrong. This made g_date_time_format() |
| 15 | output incorrect abbreviated month names in some languages. |
| 16 | The old configure.ac script was correct here. |
| 17 | |
| 18 | Bug introduced in commit be4f96b6502c01d2a51d60b7a669c8ef82e22a4d. |
| 19 | |
| 20 | Closes: #1759 |
| 21 | --- |
| 22 | meson.build | 26 +++++++++++++------------- |
| 23 | 1 file changed, 13 insertions(+), 13 deletions(-) |
| 24 | |
| 25 | diff --git a/meson.build b/meson.build |
| 26 | index c5d2ce5f8..08fa40ac5 100644 |
| 27 | --- a/meson.build |
| 28 | +++ b/meson.build |
| 29 | @@ -1002,20 +1002,20 @@ if cc.links('''#ifndef _GNU_SOURCE |
| 30 | #include <langinfo.h> |
| 31 | int main (int argc, char ** argv) { |
| 32 | char *str; |
| 33 | - str = nl_langinfo (_NL_ALTMON_1); |
| 34 | - str = nl_langinfo (_NL_ALTMON_2); |
| 35 | - str = nl_langinfo (_NL_ALTMON_3); |
| 36 | - str = nl_langinfo (_NL_ALTMON_4); |
| 37 | - str = nl_langinfo (_NL_ALTMON_5); |
| 38 | - str = nl_langinfo (_NL_ALTMON_6); |
| 39 | - str = nl_langinfo (_NL_ALTMON_7); |
| 40 | - str = nl_langinfo (_NL_ALTMON_8); |
| 41 | - str = nl_langinfo (_NL_ALTMON_9); |
| 42 | - str = nl_langinfo (_NL_ALTMON_10); |
| 43 | - str = nl_langinfo (_NL_ALTMON_11); |
| 44 | - str = nl_langinfo (_NL_ALTMON_12); |
| 45 | + str = nl_langinfo (_NL_ABALTMON_1); |
| 46 | + str = nl_langinfo (_NL_ABALTMON_2); |
| 47 | + str = nl_langinfo (_NL_ABALTMON_3); |
| 48 | + str = nl_langinfo (_NL_ABALTMON_4); |
| 49 | + str = nl_langinfo (_NL_ABALTMON_5); |
| 50 | + str = nl_langinfo (_NL_ABALTMON_6); |
| 51 | + str = nl_langinfo (_NL_ABALTMON_7); |
| 52 | + str = nl_langinfo (_NL_ABALTMON_8); |
| 53 | + str = nl_langinfo (_NL_ABALTMON_9); |
| 54 | + str = nl_langinfo (_NL_ABALTMON_10); |
| 55 | + str = nl_langinfo (_NL_ABALTMON_11); |
| 56 | + str = nl_langinfo (_NL_ABALTMON_12); |
| 57 | return 0; |
| 58 | - }''', name : 'nl_langinfo (_NL_ALTMON_n)') |
| 59 | + }''', name : 'nl_langinfo (_NL_ABALTMON_n)') |
| 60 | glib_conf.set('HAVE_LANGINFO_ABALTMON', 1) |
| 61 | endif |
| 62 | |
| 63 | -- |
| 64 | 2.18.1 |
| 65 | |
| 66 | From 35c28be32762d5af6b93cb6a3420c5977f7bf599 Mon Sep 17 00:00:00 2001 |
| 67 | From: Rafal Luzynski <digitalfreak@lingonborough.com> |
| 68 | Date: Mon, 13 May 2019 23:11:28 +0200 |
| 69 | Subject: [PATCH] tests: Update month name check for Greek locale |
| 70 | MIME-Version: 1.0 |
| 71 | Content-Type: text/plain; charset=UTF-8 |
| 72 | Content-Transfer-Encoding: 8bit |
| 73 | |
| 74 | Update the abbreviated month name in the test to match the actual |
| 75 | translation. Otherwise the test fails with false positive. |
| 76 | |
| 77 | Vocabulary: |
| 78 | |
| 79 | July (nominative) - Greek: Ιούλιος (abbreviated: Ιούλ) |
| 80 | Of July (genitive) - Greek: Ιουλίου (abbreviated: Ιουλ) |
| 81 | |
| 82 | This is similar to commit 4d215e006ee69bd7a993bf853722993433adbf9a |
| 83 | and commit 7fe793e125c316ac34edd8158df5a132cb044bc1. |
| 84 | |
| 85 | Closes #1776 |
| 86 | --- |
| 87 | glib/tests/date.c | 2 +- |
| 88 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 89 | |
| 90 | diff --git a/glib/tests/date.c b/glib/tests/date.c |
| 91 | index 8eb28712b..ff13ad101 100644 |
| 92 | --- a/glib/tests/date.c |
| 93 | +++ b/glib/tests/date.c |
| 94 | @@ -388,7 +388,7 @@ test_month_names (void) |
| 95 | TEST_DATE ( 1, 4, 2018, "%OB %Y", "Απρίλιος 2018"); |
| 96 | TEST_DATE ( 1, 5, 2018, "%OB %Y", "Μάιος 2018"); |
| 97 | TEST_DATE ( 1, 6, 2018, "%OB %Y", "Ιούνιος 2018"); |
| 98 | - TEST_DATE (16, 7, 2018, "%e %b %Y", "16 Ιούλ 2018"); |
| 99 | + TEST_DATE (16, 7, 2018, "%e %b %Y", "16 Ιουλ 2018"); |
| 100 | TEST_DATE ( 1, 8, 2018, "%Ob %Y", "Αύγ 2018"); |
| 101 | } |
| 102 | else |
| 103 | -- |
| 104 | 2.18.1 |