[glom/glom-1-18] date test: Set LANGUAGE too, which seems to be necessary on Ubuntu.



commit a704565d96e07d1ac19a02ced748eb68f69f7893
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Nov 17 11:04:21 2011 +0100

    date test: Set LANGUAGE too, which seems to be necessary on Ubuntu.
    
    * tests/test_glom_date_in_locales.sh: Also add some locales that
    are available on Ubuntu.
    
    Conflicts:
    
    	tests/test_glom_date_in_locales.sh

 ChangeLog                                      |    7 +++++++
 glom/libglom/data_structure/glomconversions.cc |    3 +++
 tests/test_glom_date_in_locales.sh             |   14 ++++++++++----
 3 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index baf5665..da70415 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-17  Murray Cumming  <murrayc murrayc com>
+
+	date test: Set LANGUAGE too, which seems to be necessary on Ubuntu.
+
+	* tests/test_glom_date_in_locales.sh: Also add some locales that 
+	are available on Ubuntu.
+
 2011-11-16  Murray Cumming  <murrayc murrayc com>
 
 	Add a test for date presentation and parsing in various locales.
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index 356a249..7d29b70 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -106,6 +106,7 @@ static inline const char* glom_get_locale_date_format()
     c_locale_date_format = _("%x");
   }
 
+  //std::cout << G_STRFUNC << ": c_locale_date_format=" << c_locale_date_format << std::endl;
   return c_locale_date_format;
 }
 
@@ -186,6 +187,8 @@ bool Conversions::sanity_check_date_text_representation_uses_4_digit_years(bool
     //Note to translators: If you see this error in the terminal at startup then you need to translate the %x elsewhere.
     std::cerr << _("ERROR: sanity_check_date_text_representation_uses_4_digit_year(): Sanity check failed: Glom does not seem to use 4 digits to display years in a date's text representation, in this locale. Defaulting to dd/mm/yyyy though this might be incorrect for your locale. This needs attention from a translator. Please file a bug - see http://www.glom.org";) << std::endl;
 
+    //std::cout << "  Unexpected date text: " << date_text << std::endl;
+
     //Do not depend on translators to do what we ask.
     //Default to a common format, though this would be incorrect in some 
     //locales, such as German.
diff --git a/tests/test_glom_date_in_locales.sh b/tests/test_glom_date_in_locales.sh
index d0a64f7..e4e2468 100755
--- a/tests/test_glom_date_in_locales.sh
+++ b/tests/test_glom_date_in_locales.sh
@@ -9,13 +9,19 @@
 #
 # These are chosen based on problems found previously,
 # and the ones with good translations shown here: http://l10n.gnome.org/module/glom/
-#TODO: Get a list from po/*.po ?
-#These are apparently not available on Fedora:  "da_DA.UTF-8" "cs_CZ.UTF-8" "nb_NO.UTF-8" "sv_SE.UTF-8"
-locales=("en_US.UTF-8" "en_GB.UTF-8" "en_CA.UTF-8" "de_DE.UTF-8" "es_ES.UTF-8" "fi_FI.UTF-8" "fr_FR.UTF-8" "hu_HU.UTF-8" "it_IT.UTF-8" "pt_PT.UTF-8" "pt_BR.UTF-8" "sl_SI.UTF-8")
+#
+# TODO: Get a list from po/*.po ?
+#
+# On debian/Ubuntu do this: 
+#  sudo apt-get install language-pack-de language-pack-es language-pack-fi language-pack-fr language-pack-hu language-pack-it language-pack-pt language-pack-sl language-pack-da language-pack-cz language-pack-nb language-pack-se
+#
+# These are apparently not available on Fedora:  "da_DK.UTF-8" "cs_CZ.UTF-8" "nb_NO.UTF-8" "sv_SE.UTF-8"
+locales=("en_US.UTF-8" "en_GB.UTF-8" "en_CA.UTF-8" "de_DE.UTF-8" "es_ES.UTF-8" "fi_FI.UTF-8" "fr_FR.UTF-8" "hu_HU.UTF-8" "it_IT.UTF-8" "pt_PT.UTF-8" "pt_BR.UTF-8" "sl_SI.UTF-8" "da_DK.UTF-8" "cs_CZ.UTF-8" "nb_NO.UTF-8" "sv_SE.UTF-8")
 
 for x in "${locales[ ]}"
 do
-  echo testing with LANG="$x"
+  echo testing with LANG and LANGUAGE="$x"
   export LANG="$x"
+  export LANGUAGE="$x"
   ${buildir}glom --debug-date-check || exit 1
 done



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]