[Libreoffice-commits] core.git: i18npool/source svl/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 1 19:36:01 UTC 2018
i18npool/source/localedata/data/en_ZA.xml | 28 +++++++++++++++++++++-------
svl/qa/unit/svl.cxx | 8 ++++----
2 files changed, 25 insertions(+), 11 deletions(-)
New commits:
commit fbc6415b85a855d3658be758efe4684cfd49faa3
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Mon Oct 1 15:57:12 2018 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Mon Oct 1 21:35:39 2018 +0200
Resolves: tdf#119613 [*-ZA] default to ISO 8601 date format
This also made it necessary to adapt the unit tests that checked
for the old default format in output.
Change-Id: Ie7bc78d1e5a17e5cb6f52d5ed1ab42db80f07d2e
Reviewed-on: https://gerrit.libreoffice.org/61200
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/i18npool/source/localedata/data/en_ZA.xml b/i18npool/source/localedata/data/en_ZA.xml
index b0584d8e1966..3807110cda43 100644
--- a/i18npool/source/localedata/data/en_ZA.xml
+++ b/i18npool/source/localedata/data/en_ZA.xml
@@ -52,6 +52,8 @@
<MeasurementSystem>metric</MeasurementSystem>
</LC_CTYPE>
<LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$R-1C09]">
+ <!-- Y-M-D implicit from formatindex="21", Y/M/D implicit from formatindex="21" and DateSeparator -->
+ <DateAcceptancePattern>M-D</DateAcceptancePattern>
<DateAcceptancePattern>M/D</DateAcceptancePattern>
<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
<FormatCode>Standard</FormatCode>
@@ -111,16 +113,16 @@
<FormatCode>[CURRENCY] # ##0,--;[RED][CURRENCY]-# ##0,--</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
- <FormatCode>YY/MM/DD</FormatCode>
+ <FormatCode>YY-MM-DD</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
<FormatCode>DD MMMM YYYY</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
- <FormatCode>YY/MM/DD</FormatCode>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>YY-MM-DD</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
- <FormatCode>YYYY/MM/DD</FormatCode>
+ <FormatElement msgid="DateFormatskey7" default="true" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>YYYY-MM-DD</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
<FormatCode>D MMM YY</FormatCode>
@@ -174,6 +176,12 @@
<FormatElement msgid="DateFormatskey21" default="false" type="medium" usage="DATE" formatindex="38">
<FormatCode>WW</FormatCode>
</FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="medium" usage="DATE" formatindex="60">
+ <FormatCode>YY/MM/DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey23" default="false" type="medium" usage="DATE" formatindex="61">
+ <FormatCode>YYYY/MM/DD</FormatCode>
+ </FormatElement>
<FormatElement msgid="TimeFormatskey1" default="true" type="short" usage="TIME" formatindex="39">
<FormatCode>HH:MM</FormatCode>
</FormatElement>
@@ -195,10 +203,16 @@
<FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
<FormatCode>[HH]:MM:SS,00</FormatCode>
</FormatElement>
- <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatElement msgid="DateTimeFormatskey1" default="false" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>YY-MM-DD HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="true" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>YYYY-MM-DD HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey3" default="false" type="medium" usage="DATE_TIME" formatindex="62">
<FormatCode>YY/MM/DD HH:MM</FormatCode>
</FormatElement>
- <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatElement msgid="DateTimeFormatskey4" default="false" type="medium" usage="DATE_TIME" formatindex="63">
<FormatCode>YYYY/MM/DD HH:MM:SS</FormatCode>
</FormatElement>
</LC_FORMAT>
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 801e5d3fc405..579a336b692c 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1213,14 +1213,14 @@ void Test::testIsNumberFormatSpecific()
}
{
- // en-ZA uses Y/M/D format, test that Y/M/D input leads to Y/M/D output
- // and ISO Y-M-D input leads to Y-M-D output.
+ // en-ZA uses Y-M-D and Y/M/D format, test that either are accepted.
+ // The default format changed from YY/MM/DD to YYYY-MM-DD.
SvNumberFormatter aFormatter(m_xContext, LANGUAGE_ENGLISH_SAFRICA);
std::vector<FormatInputOutput> aIO = {
- { "1999/11/22", true, "99/11/22", 0 }, // if default YY changes to YYYY adapt this
+ { "1999/11/22", true, "1999-11-22", 0 },
{ "1999-11-22", true, "1999-11-22", 0 },
- { "11/2/1", true, "11/02/01", 0 }, // if default YY changes to YYYY adapt this
+ { "11/2/1", true, "2011-02-01", 0 },
{ "99-2-11", true, "1999-02-11", 0 },
{ "22-2-11", true, "2022-02-11", 0 }
};
More information about the Libreoffice-commits
mailing list