[meld/VersionControlRework: 69/123] vcview, vc._null: Make sure VCs always have a name



commit 1efa83467a0f3e4df13b7eed1924f2611bea9953
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Tue Mar 31 07:22:50 2015 +1000

    vcview, vc._null: Make sure VCs always have a name

 meld/vc/_null.py |    5 ++++-
 meld/vcview.py   |    3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/meld/vc/_null.py b/meld/vc/_null.py
index f5062cd..b52b9aa 100644
--- a/meld/vc/_null.py
+++ b/meld/vc/_null.py
@@ -26,13 +26,16 @@
 import shutil
 import tempfile
 
+from meld.conf import _
 from meld.vc import _vc
 
 
 class Vc(_vc.Vc):
 
     CMD = None
-    NAME = ""
+    # Translators: This is the displayed name of a version control system
+    # when no version control system is actually found.
+    NAME = _("None")
     VC_DIR = "."
 
     def _update_tree_state_cache(*args):
diff --git a/meld/vcview.py b/meld/vcview.py
index 650e8e9..bfa44ee 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -320,8 +320,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
             if current_vc_name == avc.NAME:
                 default_active = idx
 
-            name = avc.NAME or _("None")
-            vcs_model.append([name, avc(location), True])
+            vcs_model.append([avc.NAME, avc(location), True])
 
         if not valid_vcs:
             # If we didn't get any valid vcs then fallback to null


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