[glom] Improve the command-line parse/print locale warnings.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Improve the command-line parse/print locale warnings.
- Date: Thu, 22 Mar 2012 12:21:30 +0000 (UTC)
commit 4f4b52c04b39fe833372942d24da69b2396016ec
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Mar 22 09:27:35 2012 +0100
Improve the command-line parse/print locale warnings.
* glom/libglom/data_structure/glomconversions.cc:
Mention the locale details when complaining that
date parsing or rendering is not working correctly for
a locale.
ChangeLog | 9 +++++++++
glom/libglom/data_structure/glomconversions.cc | 6 ++++--
2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b0028a3..3857776 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-22 Murray Cumming <murrayc murrayc com>
+
+ Improve the command-line parse/print locale warnings.
+
+ * glom/libglom/data_structure/glomconversions.cc:
+ Mention the locale details when complaining that
+ date parsing or rendering is not working correctly for
+ a locale.
+
2012-03-16 Murray Cumming <murrayc murrayc com>
Update GimpRuler from the Gimp source code.
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index 824a0f5..8fe3f3c 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -144,7 +144,7 @@ bool Conversions::sanity_check_date_parsing()
parsed_date.tm_mday != the_c_time.tm_mday)
{
//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_parsing(): Sanity check failed: Glom could not parse a date's text representation that it generated itself, in this locale.") << std::endl;
+ std::cerr << _("ERROR: sanity_check_date_parsing(): Sanity check failed: Glom could not parse a date's text representation that it generated itself, in this locale.") << " (" << std::locale("").name() << ")" << std::endl;
//If translators cannot be relied upon to do this, maybe we should default to "%d/%m/%Y" when "%x" fails this test.
@@ -169,7 +169,9 @@ bool Conversions::sanity_check_date_text_representation_uses_4_digit_years(bool
const Glib::ustring date_text = format_date(the_c_time);
if(debug_output)
- std::cout << "DEBUG: 22nd November 2008 in this locale has this text represention: " << date_text << std::endl;
+ {
+ std::cout << "DEBUG: 22nd November 2008 in this locale (" << std::locale("").name() << ") has this text represention: " << date_text << std::endl;
+ }
//See if the year appears in full in that date.
//There are probably some locales for which this fails.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]