[GRASS-SVN] r60829 - grass/branches/releasebranch_7_0/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 14 05:14:49 PDT 2014


Author: neteler
Date: 2014-06-14 05:14:49 -0700 (Sat, 14 Jun 2014)
New Revision: 60829

Modified:
   grass/branches/releasebranch_7_0/lib/python/temporal/core.py
   grass/branches/releasebranch_7_0/lib/python/temporal/datetime_math.py
   grass/branches/releasebranch_7_0/lib/python/temporal/extract.py
   grass/branches/releasebranch_7_0/lib/python/temporal/list_stds.py
   grass/branches/releasebranch_7_0/lib/python/temporal/mapcalc.py
   grass/branches/releasebranch_7_0/lib/python/temporal/open_stds.py
   grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py
Log:
temporal: minor msg cosmetics

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/core.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/core.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/core.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -578,7 +578,7 @@
         metadata = get_tgis_metadata(dbif)
         dbif.close()
         if metadata is None:
-            msgr.fatal(_("Unable to receiving temporal database metadata.\n"
+            msgr.fatal(_("Unable to receive temporal database metadata.\n"
                          "Current temporal database info:%(info)s")%({"info":get_database_info_string()}))
         for entry in metadata:
             if "tgis_version" in entry and entry[1] != str(get_tgis_version()):
@@ -672,7 +672,7 @@
     stvds_tables_sql = stds_tables_template_sql.replace("STDS", "stvds")
     str3ds_tables_sql = stds_tables_template_sql.replace("STDS", "str3ds")
 
-    msgr.message(_("Create temporal database: %s" % (tgis_database_string)))
+    msgr.message(_("Creating temporal database: %s" % (tgis_database_string)))
 
     if tgis_backend == "sqlite":
         # We need to create the sqlite3 database path if it does not exists
@@ -681,7 +681,7 @@
             try:
                 os.makedirs(tgis_dir)
             except Exception as e:
-                msgr.fatal(_("Unable to create sqlite temporal database\n"
+                msgr.fatal(_("Unable to create SQLite temporal database\n"
                                      "Exception: %s\nPlease use t.connect to set a "
                                      "read- and writable temporal database path"%(e)))
                 

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/datetime_math.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/datetime_math.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/datetime_math.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -734,7 +734,7 @@
         
     # BC is not supported
     if time_string.find("bc") > 0:
-        return _("Dates Before Christ are not supported")
+        return _("Dates Before Christ (BC) are not supported")
 
     # BC is not supported
     if time_string.find("+") > 0:

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/extract.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/extract.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/extract.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -116,17 +116,17 @@
 
                 # Add process to the process list
                 if type == "raster":
-                    msgr.verbose(_("Apply r.mapcalc expression: \"%s\"")
+                    msgr.verbose(_("Applying r.mapcalc expression: \"%s\"")
                                  % expr)
                     proc_list.append(Process(target=run_mapcalc2d,
                                              args=(expr,)))
                 elif type == "raster3d":
-                    msgr.verbose(_("Apply r3.mapcalc expression: \"%s\"")
+                    msgr.verbose(_("Applying r3.mapcalc expression: \"%s\"")
                                  % expr)
                     proc_list.append(Process(target=run_mapcalc3d,
                                              args=(expr,)))
                 elif type == "vector":
-                    msgr.verbose(_("Apply v.extract where statement: \"%s\"")
+                    msgr.verbose(_("Applying v.extract where statement: \"%s\"")
                                  % expression)
                     if row["layer"]:
                         proc_list.append(Process(target=run_vector_extraction,
@@ -154,7 +154,7 @@
                         exitcodes += proc.exitcode
                     if exitcodes != 0:
                         dbif.close()
-                        msgr.fatal(_("Error while computation"))
+                        msgr.fatal(_("Error in computation process"))
 
                     # Empty process list
                     proc_list = []

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/list_stds.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/list_stds.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/list_stds.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -175,7 +175,7 @@
                 if len(maps[0]) > 0:
                     first_time, dummy = maps[0][0].get_temporal_extent_as_tuple()
                 else:
-                    msgr.warning(_("Empty map list."))
+                    msgr.warning(_("Empty map list"))
                     return
             else:
                 first_time, dummy = maps[0].get_temporal_extent_as_tuple()
@@ -186,7 +186,7 @@
                     if len(mymap) > 0:
                         map = mymap[0]
                     else:
-                        msgr.fatal(_("Empty entry in map list, this should not happen."))
+                        msgr.fatal(_("Empty entry in map list, this should not happen"))
                 else:
                     map = mymap
 

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/mapcalc.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/mapcalc.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/mapcalc.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -427,55 +427,55 @@
 
     if expr.find("start_year()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_year()", str(start.year))
 
     if expr.find("start_month()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_month()", str(start.month))
 
     if expr.find("start_week()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_week()", str(start.isocalendar()[1]))
 
     if expr.find("start_day()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_day()", str(start.day))
 
     if expr.find("start_hour()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_hour()", str(start.hour))
 
     if expr.find("start_minute()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_minute()", str(start.minute))
 
     if expr.find("start_second()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_second()", str(start.second))
 
     if expr.find("start_dow()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         expr = expr.replace("start_dow()", str(start.isoweekday()))
 
     if expr.find("start_doy()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("start_*")))
         year = datetime(start.year, 1, 1)
         delta = start - year
@@ -510,7 +510,7 @@
 
     if expr.find("end_year()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_year()", "null()")
@@ -519,7 +519,7 @@
 
     if expr.find("end_month()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_month()", "null()")
@@ -528,7 +528,7 @@
 
     if expr.find("end_week()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_week()", "null()")
@@ -537,7 +537,7 @@
 
     if expr.find("end_day()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_day()", "null()")
@@ -546,7 +546,7 @@
 
     if expr.find("end_hour()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_hour()", "null()")
@@ -555,7 +555,7 @@
 
     if expr.find("end_minute()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_minute()", "null()")
@@ -564,7 +564,7 @@
 
     if expr.find("end_second()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_second()", "null()")
@@ -573,7 +573,7 @@
 
     if expr.find("end_dow()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_dow()", "null()")
@@ -582,7 +582,7 @@
 
     if expr.find("end_doy()") >= 0:
         if not is_time_absolute:
-            msgr.fatal(_("The temporal operators <%s> supports only absolute "\
+            msgr.fatal(_("The temporal operators <%s> support only absolute "\
                          "time." % ("end_*")))
         if not end:
             expr = expr.replace("end_doy()", "null()")

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/open_stds.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/open_stds.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/open_stds.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -14,7 +14,7 @@
 ...
 @endcode
 
-(C) 2012-2013 by the GRASS Development Team
+(C) 2012-2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS
 for details.
@@ -152,15 +152,15 @@
     sp =  check_new_space_time_dataset(name, type, dbif, overwrite)
 
     if sp.is_in_db(dbif):
-        msgr.warning(_("Overwrite space time %(sp)s dataset <%(name)s> and "
-                       "unregister all maps.") % {
+        msgr.warning(_("Overwriting space time %(sp)s dataset <%(name)s> and "
+                       "unregistering all maps") % {
                        'sp': sp.get_new_map_instance(None).get_type(),
                        'name': name})
         id = sp.get_id()
         sp.delete(dbif)
         sp = sp.get_new_instance(id)
 
-    msgr.verbose(_("Create new space time %s dataset.") %
+    msgr.verbose(_("Creating a new space time %s dataset") %
                    sp.get_new_map_instance(None).get_type())
 
     sp.set_initial_values(temporal_type=temporaltype, semantic_type=semantic,

Modified: grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py	2014-06-14 12:14:08 UTC (rev 60828)
+++ grass/branches/releasebranch_7_0/lib/python/temporal/stds_import.py	2014-06-14 12:14:49 UTC (rev 60829)
@@ -363,7 +363,7 @@
             for row in maplist:
                 filename = row["filename"] + ".tif"
                 if not os.path.exists(filename):
-                    core.fatal(_("Unable to find geotiff raster file "
+                    core.fatal(_("Unable to find GeoTIFF raster file "
                                  "<%s> in archive.") % filename)
         elif format_ == "AAIGrid":
             for row in maplist:



More information about the grass-commit mailing list