Branch: master

432a5209 2019-03-02 15:47:51 Michele Calgaro
Translate comments from Italian to English

Signed-off-by: Michele Calgaro <michele.calgaro@...>
M kig/pykig/pykig.py

kig/pykig/pykig.py

diff --git a/kig/pykig/pykig.py b/kig/pykig/pykig.py
index 106c8a0..50cd5f2 100755
--- a/kig/pykig/pykig.py
+++ b/kig/pykig/pykig.py
@@ -6,7 +6,7 @@
 #                                                                       #
 #--Maurizio Paolini-Daniele Zambelli-----------------------------2005---#
 #
-# (licenza GPL)
+# (GPL license)
 
 version="0.2.11"
 
@@ -112,18 +112,18 @@
 #####
 
 #####
-# Classe KigDocument
+# Class KigDocument
 #####
 
 class KigDocument(object):
-  """ Classe che produce il documento kig.
+  """ This class creates the kig document.
 
-    genealogia:
+    hierarchy:
       KigDocument <- object
 
-    attributi di classe:
+    class attributes:
 
-    attributi:
+    attributes:
       axes
       grid
       outfilename
@@ -140,7 +140,7 @@
       shown
       color
       
-    metodi:
+    methods:
       viewappend
       hierarchyappend
       setcallkig
@@ -234,24 +234,24 @@
   def setinternal(self, v):    self.internal=v
 
 #####
-# Classe KigDOP
+# Class KigDOP
 #####
 
 #class KigDOP(KigOut):
 class KigDOP(object):
-  """Classe da cui deriva ogni elemento che ha un id: Data, Object, Property.
+  """Base class for all object containing an id: Data, Object, Property.
 
-    genealogia:
+    hierarchy:
       kigDOP <- object
 
-    attributo di classe:
+    class attributes:
       id-counter
 
-    attributi:
+    attributes:
       id
       type
 
-    metodi:
+    methods:
       getid
       str_hierarchy
   """
@@ -269,20 +269,20 @@
   def str_hierarchy(self):  pass
 
 #####
-# Classe KigView
+# Class KigView
 #####
 
 #class KigView(KigOut):
 class KigView(object):
-  """ Classe con i dati di visualizzazione
+  """ Class containing visualization data
 
-    genealogia:
+    hierarchy:
       KigView <- object
 
-    attributi di classe:
+    class attributes:
       _kd
       
-    attributi:
+    attributes:
       shown
       width
       style
@@ -290,7 +290,7 @@
       name
       pointstyle
 
-    metodi:
+    methods:
       str_view
       show
       hide
@@ -308,9 +308,9 @@
     KigView._kd.viewappend(self)
 
   def str_view(self):
-    """Produce la stringa che viene scritta sotto <View>.
+    """Creates the string written in <View>.
 
-    esempio:
+    Example:
   <Draw width="-1" point-style="Round" namecalcer="none"
 style="SolidLine" shown=None color="#0000ff" object="3" />
 """
@@ -321,19 +321,19 @@
             self.linestyle, self.shown, self.color, self.object.getid())
 
 #####
-# Classe Data
+# Class Data
 #####
 
 class Data(KigDOP):
-  """ Classe da cui deriva ogni elemento Data
+  """ Base class for all Data element
 
-    genealogia:
+    hierarchy:
       Data <- KigDOP <- object
 
-    attributi:
+    attributes:
       val
 
-    metodi:
+    methods:
       str_hierarchy
 """
   def __init__(self, type, val):
@@ -341,32 +341,32 @@
     KigDOP.__init__(self, type)
 
   def str_hierarchy(self):
-    """Produce la stringa che viene scritta sotto <Data>.
+    """Creates the <Data> string.
 
-    esempio:
+    Example:
   <Data type="double" id="170" >0.1</Data>
 """
     return '  <Data type="%s" id="%s" >%s</Data>\n' % \
           (self._type, self.getid(), self.val)
 
 #####
-# Classe PropObj
+# Class PropObj
 #####
 
 class PropObj(KigDOP):
-  """ Classe da cui deriva ogni elemento visibile
+  """ Base class for all visible object
 
-    genealogia:
+    hierarchy:
       PropObj <- KigDOP <- object
 
-    attributi di classe:
+    class attributes:
 
-    attributi:
+    attributes:
       prop
       objvec
       view
 
-    metodi:
+    methods:
       str_hierarchy
       showname(self, n)
       show(self)
@@ -393,8 +393,7 @@
     if internal:
       self.view = None
     else:
-# Qui si assume che, se viene dato un nome ad un oggetto,
-# si voglia anche visualizzare questo nome
+# Here we assume that if an object is named, the name should also be shown.
       if name: n_id=self.showname(name, shown, width, pointstyle, linestyle,
                                   color)
       else:    n_id=None
@@ -402,14 +401,14 @@
                           color)
 
   def str_hierarchy(self):
-    """Produce la stringa che viene scritta sotto <Data>.
+    """Creates the <Data> string.
 
-    esempio:
+    Example:
   <Property which="mid-point" id="170" >
    <Parent id="..." />
   </Property>
 
-    oppure:
+    or:
   <Object type="ConstrainedPoint" id="14" >
    <Parent id="13" />
    <Parent id="10" />
@@ -448,13 +447,13 @@
   def setshown(self, s):           self.view.shown=s
 
 #####
-# Classe Property
+# Class Property
 #####
 
 class Property(PropObj):
-  """ Classe da cui deriva ogni elemento Property
+  """ Base class for all Property elements
 
-    genealogia:
+    hierarchy:
       Property <- PropObj <- KigDOP <- object
   """
   def __init__(self, type, parent, shown, name, internal,
@@ -464,13 +463,13 @@
 #    print shown
 
 #####
-# Classe Object
+# Class Object
 #####
 
 class Object(PropObj):
-  """ Classe da cui deriva ogni elemento Oggetto
+  """ Base class for all Object elements
 
-    genealogia:
+    hierarchy:
       Object <- PropObj <- KigDOP <- object
** Diff limit reached (max: 250 lines) **