[glom] date test: Set LANGUAGE too, which seems to be necessary on Ubuntu.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] date test: Set LANGUAGE too, which seems to be necessary on Ubuntu.
- Date: Thu, 17 Nov 2011 10:04:42 +0000 (UTC)
commit 75611ce2cd83d400287bca1be8ed271d09d77cd2
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.
ChangeLog | 7 +++++++
glom/libglom/data_structure/glomconversions.cc | 3 +++
tests/test_glom_date_in_locales.sh | 9 +++++----
3 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c908aea..763da5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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-17 Murray Cumming <murrayc murrayc com>
+
main: Break the date check into two possible error messages.
* glom/main.cc: This simplifies debugging a bit.
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index b11c70f..9f223d1 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -99,6 +99,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;
}
@@ -179,6 +180,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 9d2d3b7..819a3fa 100755
--- a/tests/test_glom_date_in_locales.sh
+++ b/tests/test_glom_date_in_locales.sh
@@ -12,14 +12,15 @@
# 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
+# 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_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")
+# 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]