[glom] main: Break the date check into two possible error messages.



commit af57736d25ba4352b9ec24fec926778d695d79cd
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Nov 17 10:23:27 2011 +0100

    main: Break the date check into two possible error messages.
    
    	* glom/main.cc: This simplifies debugging a bit.

 ChangeLog    |    6 ++++++
 glom/main.cc |   10 ++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9d83427..c908aea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2011-11-16  Murray Cumming  <murrayc murrayc com>
 
 	Enable the test for dates in various locales.
diff --git a/glom/main.cc b/glom/main.cc
index e6ba545..16b84a7 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -596,10 +596,16 @@ main(int argc, char* argv[])
     bool date_check_ok = true;
     const bool test1 =
       Glom::Conversions::sanity_check_date_text_representation_uses_4_digit_years(group.m_arg_debug_date_check /* show debug output */);
+    if(!test1)
+    {
+      std::cerr << "Glom: ERROR: Date presentation sanity checks failed. Glom will not display dates correctly. This needs attention from a translator. Please file a bug. See http://www.glom.org."; << std::endl;
+      date_check_ok = false;
+    }
+
     const bool test2 = Glom::Conversions::sanity_check_date_parsing();
-    if(!test1 || !test2)
+    if(!test2)
     {
-      std::cerr << "Glom: ERROR: Date parsing sanity checks failed. Glom will not display dates correctly or interpret entered dates correctly. This needs attention from a translator. Please file a bug. See http://www.glom.org."; << std::endl;
+      std::cerr << "Glom: ERROR: Date parsing sanity checks failed. Glom will not interpret dates correctly. This needs attention from a translator. Please file a bug. See http://www.glom.org."; << std::endl;
       date_check_ok = false;
     }
 



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