[chirp_devel] [PATCH] LOG-message-translation completes # 2347

Rudolph Gutzerhagen
Wed Jun 24 09:49:02 PDT 2020


Minor maintenance change.

Foreign language was observed in logs submitted with other issues.

Investigated those and determined the de facto convention was to use
English as the logging language. Further investigation seemed to
indicate that the original print messages were probably swept up in some
quick localization effort..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20200624/c9da4f65/attachment-0001.html 
-------------- next part --------------
# HG changeset patch
# User Rudolph Gutzerhagen <rudolph.gutzerhagen at gmail.com>
# Date 1593016543 14400
#      Wed Jun 24 12:35:43 2020 -0400
# Node ID 454f88632b3dbcccdf78d014dc649196542a09e3
# Parent  0c5db792de719d4f1c373df76bcf74a51e87fc0b
LOG-message-translation                        completes # 2347
    o LOG messages are marked for language translation. There are only
      a few instances of this remaining in the source code. This marking
      for translation is removed.
    o Most of the informational print messages that were converted to
      logging, follow the convention of logging in English, without
      any localization. Some of these print messages were swept up
      in some localization work. This patch brings changes these
      logging messages to using English for logging.

diff --git a/chirp/ui/clone.py b/chirp/ui/clone.py
--- a/chirp/ui/clone.py
+++ b/chirp/ui/clone.py
@@ -258,7 +258,7 @@
             emsg = None
         except Exception, e:
             common.log_exception()
-            LOG.error(_("Clone failed: {error}").format(error=e))
+            LOG.error("Clone failed: {error}".format(error=e))
             emsg = e
 
         gobject.idle_add(self.__progw.hide)
diff --git a/chirp/ui/memedit.py b/chirp/ui/memedit.py
--- a/chirp/ui/memedit.py
+++ b/chirp/ui/memedit.py
@@ -338,7 +338,7 @@
         iter = self.store.get_iter(path)
         if not self.store.get(iter, self.col("_filled"))[0] and \
                 self.store.get(iter, self.col(_("Frequency")))[0] == 0:
-            LOG.error(_("Editing new item, taking defaults"))
+            LOG.error("Editing new item, taking defaults")
             self.insert_new(iter)
 
         colnum = self.col(cap)
@@ -360,7 +360,7 @@
             new = funcs[cap](rend, path, new, colnum)
 
         if new is None:
-            LOG.error(_("Bad value for {col}: {val}").format(col=cap, val=new))
+            LOG.error("Bad value for {col}: {val}".format(col=cap, val=new))
             return
 
         if self.store.get_column_type(colnum) == TYPE_INT:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LOG-message-translation--2020-06-24.patch.bin
Type: application/octet-stream
Size: 2063 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20200624/c9da4f65/attachment-0001.bin 


More information about the chirp_devel mailing list