Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(3rdparty): update punic to 3.8.1 #39486

Merged
merged 3 commits into from
Jul 27, 2023
Merged

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Jul 19, 2023

Summary

Beware! The Punic and CLDR updates brought some changes to the generated date and time formats. I don't think that's a problem unless we parse those strings somewhere else.

Update punic to 3.8.1.

Major library update. The directory structure changed and thus almost everything is changed.

We are using the Calendar component in lib/private/L10N/L10N.php.

If we make php-intl a required extension, we could use IntlCalendar and drop punic as a dependency.

TODO

Checklist

@kesselb kesselb added this to the Nextcloud 28 milestone Jul 19, 2023
@kesselb kesselb added 3. to review Waiting for reviews dependencies labels Jul 19, 2023
@kesselb kesselb self-assigned this Jul 19, 2023
@kesselb
Copy link
Contributor Author

kesselb commented Jul 19, 2023

There were 15 failures:

1) Test\DateTimeFormatterTest::testFormatDateTime with data set #0 (1350129205, null, 'October 13, 2012 at 11:53:25 AM GMT+0')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'October 13, 2012 at 11:53:25 AM GMT+0'
+'October 13, 2012, 11:53:25 AM UTC'

/drone/src/tests/lib/DateTimeFormatterTest.php:175

2) Test\DateTimeFormatterTest::testFormatDateTime with data set #1 (1350129205, DateTimeZone Object (...), 'October 13, 2012 at 1:53:25 PM GMT+2')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'October 13, 2012 at 1:53:25 PM GMT+2'
+'October 13, 2012, 1:53:25 PM GMT+2'

/drone/src/tests/lib/DateTimeFormatterTest.php:175

3) Test\L10N\L10nTest::testNumericStringLocalization with data set #0 ('February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', '1234567890')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'February 13, 2009 at 11:31:30 PM GMT+0'
+'February 13, 2009, 11:31:30 PM UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

4) Test\L10N\L10nTest::testNumericStringLocalization with data set #1 ('13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', '1234567890')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'13. Februar 2009 um 23:31:30 GMT+0'
+'13. Februar 2009, 23:31:30 UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

5) Test\L10N\L10nTest::testNumericStringLocalization with data set #4 ('11:31:30 PM GMT+0', 'en', 'en_US', 'time', '1234567890')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'11:31:30 PM GMT+0'
+'11:31:30 PM UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

6) Test\L10N\L10nTest::testNumericStringLocalization with data set #5 ('23:31:30 GMT+0', 'de', 'de_DE', 'time', '1234567890')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'23:31:30 GMT+0'
+'23:31:30 UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

7) Test\L10N\L10nTest::testNumericStringLocalization with data set #6 ('February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', 1234567890)
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'February 13, 2009 at 11:31:30 PM GMT+0'
+'February 13, 2009, 11:31:30 PM UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

8) Test\L10N\L10nTest::testNumericStringLocalization with data set #7 ('13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', 1234567890)
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'13. Februar 2009 um 23:31:30 GMT+0'
+'13. Februar 2009, 23:31:30 UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

9) Test\L10N\L10nTest::testNumericStringLocalization with data set #10 ('11:31:30 PM GMT+0', 'en', 'en_US', 'time', 1234567890)
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'11:31:30 PM GMT+0'
+'11:31:30 PM UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

10) Test\L10N\L10nTest::testNumericStringLocalization with data set #11 ('23:31:30 GMT+0', 'de', 'de_DE', 'time', 1234567890)
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'23:31:30 GMT+0'
+'23:31:30 UTC'

/drone/src/tests/lib/L10N/L10nTest.php:159

11) Test\L10N\L10nTest::testNumericStringLocalization with data set #12 ('February 13, 2009 at 11:31:30 PM GMT+0', 'en', 'en_US', 'datetime', DateTime Object (...))
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'February 13, 2009 at 11:31:30 PM GMT+0'
+'February 13, 2009, 11:31:30 PM GMT+0'

/drone/src/tests/lib/L10N/L10nTest.php:159

12) Test\L10N\L10nTest::testNumericStringLocalization with data set #13 ('13. Februar 2009 um 23:31:30 GMT+0', 'de', 'de_DE', 'datetime', DateTime Object (...))
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'13. Februar 2009 um 23:31:30 GMT+0'
+'13. Februar 2009, 23:31:30 GMT+0'

/drone/src/tests/lib/L10N/L10nTest.php:159

13) Test\L10N\L10nTest::testNumericStringLocalization with data set #16 ('11:31:30 PM GMT+0', 'en', 'en_US', 'time', DateTime Object (...))
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'11:31:30 PM GMT+0'
+'11:31:30 PM GMT+0'

/drone/src/tests/lib/L10N/L10nTest.php:159

14) Test\L10N\L10nTest::testNumericStringLocalization with data set #18 ('13 February 2009 at 23:31:30 GMT+0', 'en_GB', 'en_GB', 'datetime', DateTime Object (...))
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'13 February 2009 at 23:31:30 GMT+0'
+'13 February 2009, 23:31:30 GMT+0'

/drone/src/tests/lib/L10N/L10nTest.php:159

15) Test\L10N\L10nTest::testNumericStringLocalization with data set #21 ('13 February 2009 at 23:31:30 GMT+0', 'en-GB', 'en_GB', 'datetime', DateTime Object (...))
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'13 February 2009 at 23:31:30 GMT+0'
+'13 February 2009, 23:31:30 GMT+0'

/drone/src/tests/lib/L10N/L10nTest.php:159

@kesselb kesselb added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jul 19, 2023
@kesselb
Copy link
Contributor Author

kesselb commented Jul 24, 2023

-'11:31:30 PM GMT+0'
+'11:31:30 PM UTC'

punic/punic#140

-'11:31:30 PM GMT+0'
+'11:31:30 PM GMT+0'

image

CLDR 42 added a NARROW NO-BREAK SPACE for some time and date definitions. The idea is to prevent a break between a time definition.

'February 13, 2009 at 11:31:30 PM UTC'
'February 13, 2009, 11:31:30 PM UTC'

Also from upstream punic/cldr: https://github.com/unicode-org/cldr/pull/2367/files

@kesselb kesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 24, 2023
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drone samba failure seems unrelated, test adjustments seem sensible 😊

Punic 3.2.0 added support for timezone translations and returns UTC instead of GMT+0 now.

Signed-off-by: Daniel Kesselberg <[email protected]>
Punic 3.8.0 / CLDR 42 added a narrow no-break space unicode character for the time formats and a new default pattern for datetime.

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb kesselb added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 27, 2023
@AndyScherzinger AndyScherzinger merged commit 767c42f into master Jul 27, 2023
34 of 36 checks passed
@AndyScherzinger AndyScherzinger deleted the 3rdparty-bump-punic branch July 27, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish dependencies
Projects
Development

Successfully merging this pull request may close these issues.

4 participants