[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 4 commits - i18npool/CustomTarget_localedata.mk i18npool/source

Eike Rathke erack at redhat.com
Wed Jun 3 06:54:19 PDT 2015


 i18npool/CustomTarget_localedata.mk        |    2 +-
 i18npool/source/localedata/LocaleNode.cxx  |   16 ++++++++++++++++
 i18npool/source/localedata/data/bg_BG.xml  |    1 +
 i18npool/source/localedata/data/locale.dtd |    6 ++++--
 i18npool/source/localedata/data/tt_RU.xml  |    1 +
 5 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 7695e2eb2e4f62cb09e06512ffc44796dc975fe4
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jun 3 15:43:01 2015 +0200

    reflect requirement of one abbreviated DateAcceptancePattern in documentation
    
    Change-Id: I2593606f3c82eeb9e04be469c20ffb4132cc4f2c
    (cherry picked from commit 8fbb45c978327a3047a84c59978a07bdc19a66dd)

diff --git a/i18npool/source/localedata/data/locale.dtd b/i18npool/source/localedata/data/locale.dtd
index f0f90ac..99f0778 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -172,8 +172,10 @@
 
      For each locale one pattern that matches a full date is automatically
      generated from FormatElement formatIndex="21" and does not need to be
-     defined, for example "M/D/Y" or "D.M.Y", so only if you want abbreviations
-     to be in effect add some patterns.
+     defined, for example "M/D/Y" or "D.M.Y".
+
+     At least one pattern for abbreviated date input must be defined, i.e.
+     contain D and M but not Y.
 
      NOTE: use only single letter D,M,Y. Multiple patterns can be defined.
 -->
commit acf8946a5eea8bfb44817709b37dee171abb67e3
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jun 3 15:37:59 2015 +0200

    ensure that at least one abbreviated DateAcceptancePattern is present
    
    Change-Id: I30619fc9f894dda89cd1c84153abcb21214a5fbc
    (cherry picked from commit 6df46d63e4397a0eb799149dab56a4c38b940e99)

diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 07f7d10..8ef4149 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -896,6 +896,22 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
     // LC_FORMAT, not in optional LC_FORMAT_1
     if (mnSection == 0)
     {
+        // At least one abbreviated date acceptance pattern must be present.
+        if (theDateAcceptancePatterns.empty())
+            incError( "No DateAcceptancePattern present.\n");
+        else
+        {
+            bool bHaveAbbr = false;
+            for (::std::vector< OUString >::const_iterator it( theDateAcceptancePatterns.begin());
+                    !bHaveAbbr && it != theDateAcceptancePatterns.end(); ++it)
+            {
+                if ((*it).indexOf('D') > -1 && (*it).indexOf('M') > -1 && (*it).indexOf('Y') <= -1)
+                    bHaveAbbr = true;
+            }
+            if (!bHaveAbbr)
+                incError( "No abbreviated DateAcceptancePattern present. For example M/D or D.M.\n");
+        }
+
         // 0..47 MUST be present, 48,49 MUST NOT be present
         ValueSet::const_iterator aIter( aFormatIndexSet.begin());
         for (sal_Int16 nNext = cssi::NumberFormatIndex::NUMBER_START;
commit 12a5ed16718365fb9328ac4b399a41f219d4f3d2
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jun 3 15:35:47 2015 +0200

    add missing DateAcceptancePattern for abbreviated date input
    
    Change-Id: I5ac712604204c4cbbce4d1ec3a591fb9f158c6f8
    (cherry picked from commit c681c4ca956bfa4a3235c5ae97a745a107f4e4ce)

diff --git a/i18npool/source/localedata/data/bg_BG.xml b/i18npool/source/localedata/data/bg_BG.xml
index b66fdf3..926876f 100644
--- a/i18npool/source/localedata/data/bg_BG.xml
+++ b/i18npool/source/localedata/data/bg_BG.xml
@@ -56,6 +56,7 @@
     <DateAcceptancePattern>D.M.Y г.</DateAcceptancePattern>
     <DateAcceptancePattern>D.M.Y Г.</DateAcceptancePattern>
     <DateAcceptancePattern>D.M.Y Г.</DateAcceptancePattern>
+    <DateAcceptancePattern>D.M.</DateAcceptancePattern>
     <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
       <FormatCode>General</FormatCode>
     </FormatElement>
diff --git a/i18npool/source/localedata/data/tt_RU.xml b/i18npool/source/localedata/data/tt_RU.xml
index 74bdc10..488e11c 100644
--- a/i18npool/source/localedata/data/tt_RU.xml
+++ b/i18npool/source/localedata/data/tt_RU.xml
@@ -52,6 +52,7 @@
         <MeasurementSystem>metric</MeasurementSystem>
     </LC_CTYPE>
     <LC_FORMAT>
+      <DateAcceptancePattern>D.M.</DateAcceptancePattern>
         <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
             <FormatCode>Standard</FormatCode>
         </FormatElement>
commit 95c567d926647b7fd71e34d3435f01cd759d4e51
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jun 3 15:19:00 2015 +0200

    Revert "make saxparser deps order-only"
    
    This reverts commit 49d8bc1dcce4c662d85d894567501205f94f678d.
    
    If saxparser changed, specifically if
    i18npool/source/localedata/LocaleNode.cxx was modified, we actually want
    all .cxx regenerated from locale data and not silently skip all.
    
    Conflicts:
    	i18npool/CustomTarget_localedata.mk
    
    Change-Id: I3a1b0ed0dab12148ee34653cdfac593001d2ecf7
    (cherry picked from commit 657524656fdc381ff217011ff025d3d24b79d026)

diff --git a/i18npool/CustomTarget_localedata.mk b/i18npool/CustomTarget_localedata.mk
index f455fd5..481b3ee 100644
--- a/i18npool/CustomTarget_localedata.mk
+++ b/i18npool/CustomTarget_localedata.mk
@@ -18,7 +18,7 @@ $(eval $(call gb_CustomTarget_register_targets,i18npool/localedata,\
 define i18npool_LD_RULE
 $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_$(1).cxx : \
 		$(SRCDIR)/i18npool/source/localedata/data/$(1).xml \
-		| $(call gb_Executable_get_runtime_dependencies,saxparser)
+		$(call gb_Executable_get_runtime_dependencies,saxparser)
 	$$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),$(true),SAX,1)
 	$$(call gb_Helper_abbreviate_dirs, \
 		$$(call gb_Helper_execute,saxparser) $(1) $$< $$@.tmp \


More information about the Libreoffice-commits mailing list