diff --git a/.sdkmanrc b/.sdkmanrc index 30a165b..07981d6 100644 --- a/.sdkmanrc +++ b/.sdkmanrc @@ -1,2 +1,2 @@ -java=11.0.20-zulu +java=11.0.25-zulu diff --git a/build.gradle b/build.gradle index 7b8200d..ba48433 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ wrapper { project.ext { argparseVersion = '0.4.4' - cldrengineVersion = '1.2.17' + cldrengineVersion = '1.8.2' diffutilsVersion = '1.3.0' hamcrestVersion = '2.1' jacksonVersion = '2.3.3' diff --git a/core/src/test/java/com/squarespace/template/TestCaseParser.java b/core/src/test/java/com/squarespace/template/TestCaseParser.java index 0af7577..805a51c 100644 --- a/core/src/test/java/com/squarespace/template/TestCaseParser.java +++ b/core/src/test/java/com/squarespace/template/TestCaseParser.java @@ -249,10 +249,10 @@ public static String diff(String expected, String actual) { buf.append("@@ -" + pos1 + "," + lines1.size()); buf.append(" +" + pos2 + "," + lines2.size()).append(" @@\n"); for (String row : lines1) { - buf.append("- ").append(escaped(row)).append('\n'); + buf.append("- ").append(row).append('\n'); } for (String row : lines2) { - buf.append("+ ").append(escaped(row)).append('\n'); + buf.append("+ ").append(row).append('\n'); } } return buf.toString(); diff --git a/core/src/test/java/com/squarespace/template/plugins/PluginDateUtilsTest.java b/core/src/test/java/com/squarespace/template/plugins/PluginDateUtilsTest.java index c7f3f63..bb25996 100644 --- a/core/src/test/java/com/squarespace/template/plugins/PluginDateUtilsTest.java +++ b/core/src/test/java/com/squarespace/template/plugins/PluginDateUtilsTest.java @@ -174,7 +174,7 @@ public void testSingleFields() throws CodeException { // Month of year, short, locale-adjusted assertEquals(formatDate("%h", MAY_13_2013_010000_UTC, TZ_UTC, Locale.GERMANY), "Mai"); - assertEquals(formatDate("%h", MAY_13_2013_010000_UTC, TZ_UTC, MEXICO), "may."); + assertEquals(formatDate("%h", MAY_13_2013_010000_UTC, TZ_UTC, MEXICO), "may"); // Hour of day, 12-hour assertEquals(formatDate("%I", JAN_01_1970_071510_UTC, TZ_NY), "02"); diff --git a/core/src/test/java/com/squarespace/template/plugins/platform/i18n/InternationalFormattersTest.java b/core/src/test/java/com/squarespace/template/plugins/platform/i18n/InternationalFormattersTest.java index b0be1bd..89f7226 100644 --- a/core/src/test/java/com/squarespace/template/plugins/platform/i18n/InternationalFormattersTest.java +++ b/core/src/test/java/com/squarespace/template/plugins/platform/i18n/InternationalFormattersTest.java @@ -79,28 +79,28 @@ public void testDateTimeFormatter() throws Exception { // ENGLISH assertEquals(format(en_US, DATETIME, mk.args(""), json), "November 2, 2017"); - assertEquals(format(en_US, DATETIME, mk.args(" short"), json), "11/2/17, 2:26 PM"); - assertEquals(format(en_US, DATETIME, mk.args(" long"), json), "November 2, 2017 at 2:26:57 PM EDT"); + assertEquals(format(en_US, DATETIME, mk.args(" short"), json), "11/2/17, 2:26 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" long"), json), "November 2, 2017 at 2:26:57 PM EDT"); assertEquals(format(en_US, DATETIME, mk.args(" date"), json), "11/2/17"); assertEquals(format(en_US, DATETIME, mk.args(" date:short"), json), "11/2/17"); - assertEquals(format(en_US, DATETIME, mk.args(" time"), json), "2:26 PM"); - assertEquals(format(en_US, DATETIME, mk.args(" time:medium"), json), "2:26:57 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" time"), json), "2:26 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" time:medium"), json), "2:26:57 PM"); assertEquals(format(en_US, DATETIME, mk.args(" date:full time:short"), json), - "Thursday, November 2, 2017 at 2:26 PM"); + "Thursday, November 2, 2017 at 2:26 PM"); - assertEquals(format(en_US, DATETIME, mk.args(" time:hm date:short"), json), "11/2/17, 2:26 PM"); - assertEquals(format(en_US, DATETIME, mk.args(" date:yMMMd time:hm"), json), "Nov 2, 2017, 2:26 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" time:hm date:short"), json), "11/2/17, 2:26 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" date:yMMMd time:hm"), json), "Nov 2, 2017, 2:26 PM"); assertEquals(format(en_US, DATETIME, mk.args(" date:yMMMd time:medium wrap:short"), json), - "Nov 2, 2017, 2:26:57 PM"); + "Nov 2, 2017, 2:26:57 PM"); assertEquals(format(en_US, DATETIME, mk.args(" time:medium wrap:full date:yMMMd"), json), - "Nov 2, 2017 at 2:26:57 PM"); + "Nov 2, 2017 at 2:26:57 PM"); // Bare skeletons - assertEquals(format(en_US, DATETIME, mk.args(" date:short hm"), json), "11/2/17, 2:26 PM"); - assertEquals(format(en_US, DATETIME, mk.args(" yMMMd hm"), json), "Nov 2, 2017, 2:26 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" date:short hm"), json), "11/2/17, 2:26 PM"); + assertEquals(format(en_US, DATETIME, mk.args(" yMMMd hm"), json), "Nov 2, 2017, 2:26 PM"); // FRENCH @@ -110,8 +110,8 @@ public void testDateTimeFormatter() throws Exception { assertEquals(format(fr, DATETIME, mk.args(" date:full time:short"), json), "jeudi 2 novembre 2017 à 14:26"); - assertEquals(format(fr, DATETIME, mk.args(" time:hm date:short"), json), "02/11/2017 2:26 PM"); - assertEquals(format(fr, DATETIME, mk.args(" date:yMMMd time:hm"), json), "2 nov. 2017 à 2:26 PM"); + assertEquals(format(fr, DATETIME, mk.args(" time:hm date:short"), json), "02/11/2017 2:26 PM"); + assertEquals(format(fr, DATETIME, mk.args(" date:yMMMd time:hm"), json), "2 nov. 2017, 2:26 PM"); assertEquals(format(fr, DATETIME, mk.args(" date:yMMMd time:medium wrap:short"), json), "2 nov. 2017 14:26:57"); diff --git a/core/src/test/java/com/squarespace/template/plugins/platform/i18n/MessageFormatsTest.java b/core/src/test/java/com/squarespace/template/plugins/platform/i18n/MessageFormatsTest.java index 0648203..cbd0591 100644 --- a/core/src/test/java/com/squarespace/template/plugins/platform/i18n/MessageFormatsTest.java +++ b/core/src/test/java/com/squarespace/template/plugins/platform/i18n/MessageFormatsTest.java @@ -183,7 +183,7 @@ public void testDateTime() { long epoch = 1582129775000L; actual = formats.formatter().format(message, args().add(new LongNode(epoch))); - assertEquals(actual, "February 19, 2020 at 11:29:35 AM"); + assertEquals(actual, "February 19, 2020 at 11:29:35 AM"); } @Test @@ -198,7 +198,7 @@ public void testInterval() { long extra = 86400000 + 3600000; MessageArgs args = args().add(new LongNode(epoch)).add(new LongNode(epoch + extra)); actual = formats.formatter().format(message, args); - assertEquals(actual, "Feb 19 – 20, 2020"); + assertEquals(actual, "Feb 19 – 20, 2020"); } private ObjectNode money(String value, String currency) { diff --git a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-datetime-interval-1.html b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-datetime-interval-1.html index 49a9e46..639ac3e 100644 --- a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-datetime-interval-1.html +++ b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-datetime-interval-1.html @@ -15,8 +15,8 @@ {start, end|datetime-interval yMMMd}{.end} :OUTPUT -Nov 2 – 13, 2017 -10:00 AM – 12:00 PM +Nov 2 – 13, 2017 +10:00 AM – 12:00 PM -Nov 2 – 13, 2017 +Nov 2 – 13, 2017 Aug 9, 2017 diff --git a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-en-US.html b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-en-US.html index e6799f0..96b4a48 100644 --- a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-en-US.html +++ b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-en-US.html @@ -10,9 +10,9 @@ } :TEMPLATE -{.repeated section events} +{.repeated section events} {messages.event|message s e}{.end} :OUTPUT -The event will take place May 1 – Jul 15, 2018. -The event will take place 7:00 AM – 1:00 PM. +The event will take place May 1 – Jul 15, 2018. +The event will take place 7:00 AM – 1:00 PM. diff --git a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-fr-FR.html b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-fr-FR.html index 4041c7f..bfc429e 100644 --- a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-fr-FR.html +++ b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-message-datetime-interval-fr-FR.html @@ -13,9 +13,9 @@ } :TEMPLATE -{.repeated section events} +{.repeated section events} {messages.event|message s e}{.end} :OUTPUT -The event will take place 1 mai – 15 juil. 2018. -The event will take place 7:00 AM – 1:00 PM. +The event will take place 1 mai – 15 juil. 2018. +The event will take place 7:00 AM – 1:00 PM. \ No newline at end of file diff --git a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-migrate-datetime-1.html b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-migrate-datetime-1.html index 3085f01..7533667 100644 --- a/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-migrate-datetime-1.html +++ b/core/src/test/resources/com/squarespace/template/plugins/platform/i18n/f-migrate-datetime-1.html @@ -37,12 +37,12 @@ 10 Monday, February 10, 2020 February 10, 2020 -February 10, 2020 at 2:07 PM ET +February 10, 2020 at 2:07 PM ET Feb 10, 2020 2/10/20 Mon, Feb 10, 2020 -2:07 PM +2:07 PM 2020 February 2020 Feb 10, 2020 -Feb 10, 2020, 2:07 PM +Feb 10, 2020, 2:07 PM diff --git a/gradle.properties b/gradle.properties index d4d8f90..abcc4ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=2.9.11-SNAPSHOT +version=2.10.0-SNAPSHOT