X-Git-Url: http://iramuteq.org/git?a=blobdiff_plain;ds=sidebyside;f=listlex.py;h=285745aa7d31dadbb5292be6f0b9e45b98cbba15;hb=3dffb481f7f3a6b8411ac6bb0edfc3536be58377;hp=10729e874e5efc5b86e22e51bfa82003ac2c8384;hpb=54bbc5135afebc8bcc00973fd25fae383f27bdf4;p=iramuteq
diff --git a/listlex.py b/listlex.py
index 10729e8..285745a 100644
--- a/listlex.py
+++ b/listlex.py
@@ -20,7 +20,7 @@ import tempfile
from functions import exec_rcode, doconcorde
from chemins import ffr
from PrintRScript import barplot
-from dialog import SearchDial, message, BarGraphDialog, MessageImage, BarFrame
+from dialog import SearchDial, message, BarGraphDialog, BarFrame
from operator import itemgetter
#---------------------------------------------------------------------------
@@ -33,6 +33,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor
self.dlist=dlist
self.first = first
self.tgen = False
+ self.tgenlem = False
if 'etoiles' in dir(self.gparent) and not usefirst :
self.etoiles = self.gparent.etoiles
else :
@@ -184,19 +185,21 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor
self.popup_Tgen_glob = wx.NewId()
self.onmaketgen = wx.NewId()
self.ID_stcaract = wx.NewId()
+ self.id_tgendetails = wx.NewId()
- self.Bind(wx.EVT_MENU, self.OnPopupOne, id=self.popupID1)
- self.Bind(wx.EVT_MENU, self.OnPopupTwo, id=self.popupID2)
- self.Bind(wx.EVT_MENU, self.OnPopupThree, id=self.popupID3)
- self.Bind(wx.EVT_MENU, self.OnTgen_glob, id=self.popup_Tgen_glob)
- self.Bind(wx.EVT_MENU, self.OnMakeTgen, id=self.onmaketgen)
+ self.Bind(wx.EVT_MENU, self.OnPopupOne, id = self.popupID1)
+ self.Bind(wx.EVT_MENU, self.OnPopupTwo, id = self.popupID2)
+ self.Bind(wx.EVT_MENU, self.OnPopupThree, id = self.popupID3)
+ self.Bind(wx.EVT_MENU, self.OnTgen_glob, id = self.popup_Tgen_glob)
+ self.Bind(wx.EVT_MENU, self.OnMakeTgen, id = self.onmaketgen)
+ self.Bind(wx.EVT_MENU, self.OnTgenDetails, id = self.id_tgendetails)
#self.Bind(wx.EVT_MENU, self.onstcaract, id = self.ID_stcaract)
# make a menu
menu = wx.Menu()
# add some items
- menu.Append(self.popupID1, u"Formes associées")
- menu.Append(self.popupID2, u"Concordancier")
- menu.Append(self.popupID3, u"Graphique")
+ menu.Append(self.popupID1, _(u"Associated forms").decode('utf8'))
+ menu.Append(self.popupID2, _(u"Concordance").decode('utf8'))
+ menu.Append(self.popupID3, _(u"Graphic").decode('utf8'))
menu_stcaract = wx.Menu()
self.menuid = {}
if not self.tgen :
@@ -205,8 +208,10 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor
self.menuid[nid] = i
menu_stcaract.Append(nid, et)
self.Bind(wx.EVT_MENU, self.onstcaract, id = nid)
- menu.AppendMenu(-1, u"Segments de texte caractéristiques", menu_stcaract)
+ menu.AppendMenu(-1, _(u"Typical text segments").decode('utf8'), menu_stcaract)
menu.Append(self.onmaketgen, _(u"Make Tgen").decode('utf8'))
+ else :
+ menu.Append(self.id_tgendetails, _(u'Tgen details').decode('utf8'))
self.PopupMenu(menu)
menu.Destroy()
@@ -229,7 +234,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor
rep.append([corpus.getforme(forme).forme, corpus.getforme(forme).freq])
rep.sort(key = itemgetter(1), reverse = True)
items = dict([[i, '' + '\t:\t'.join([str(val) for val in forme]) + ''] for i, forme in enumerate(rep)])
- win = message(self, items, u"Formes associées", (300, 200))
+ win = message(self, items, _(u"Associated forms").decode('utf8'), (300, 200))
#win = message(self, u"Formes associées", (300, 200))
#win.html = '\n' + '
'.join([' : '.join([str(val) for val in forme]) for forme in rep]) + '\n'
#win.HtmlPage.SetPage(win.html)
@@ -270,7 +275,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor
nuces = [val[1] for val in ntab2]
ucis_txt, ucestxt = doconcorde(corpus, nuces, self.la)
items = dict([[i, '
'.join([ucis_txt[i], '
score : %.2f |