X-Git-Url: http://iramuteq.org/git?a=blobdiff_plain;f=Liste.py;h=daf58f5f698148d62137f065916ac00fdb53f37d;hb=35feaa5dc8cbd055e732567e012780d88b92ffe5;hp=85abc6957ceb7dbc860b1e3e48025a92c61aec6f;hpb=5d8c9f5cd6399fd4a7192b655b4aa0a7923d11b6;p=iramuteq
diff --git a/Liste.py b/Liste.py
index 85abc69..daf58f5 100644
--- a/Liste.py
+++ b/Liste.py
@@ -53,9 +53,9 @@ class ListPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorte
self.attr2.SetBackgroundColour("light blue")
- self.InsertColumn(0, 'forme', wx.LIST_FORMAT_RIGHT)
- self.InsertColumn(1, 'nb', wx.LIST_FORMAT_RIGHT)
- self.InsertColumn(2, 'type', wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(0, _(u'Form').decode('utf8'), wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(1, _(u'Freq.').decode('utf8'), wx.LIST_FORMAT_RIGHT)
+ self.InsertColumn(2, _(u'POS').decode('utf8'), wx.LIST_FORMAT_RIGHT)
#self.InsertColumn(3, '', wx.LIST_FORMAT_RIGHT)
self.SetColumnWidth(0, 150)
@@ -160,8 +160,8 @@ class ListPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorte
# 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.popupID1, _(u"Associated forms").decode('utf8'))
+ menu.Append(self.popupID2, _(u"Concordance").decode('utf8'))
# menu.Append(self.popupID3, "recharger")
self.PopupMenu(menu)
@@ -174,11 +174,12 @@ class ListPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorte
lems = corpus.getlems()
rep = []
for forme in lems[word].formes :
- rep.append([corpus.getforme(forme).forme, corpus.getforme(forme).freq])
+ rep.append([corpus.getforme(forme).forme, corpus.getforme(forme).freq])
rep.sort(key = itemgetter(1), reverse = True)
- 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)
+ items = dict([[i, '' + '\t:\t'.join([str(val) for val in forme]) + ''] for i, forme in enumerate(rep)])
+ win = message(self, items, _(u"Associated forms").decode('utf8'), (300, 200))
+ #win.html = '\n' + '
'.join([' : '.join([str(val) for val in forme]) for forme in rep]) + '\n'
+ #win.HtmlPage.SetPage(win.html)
win.Show(True)
def OnPopupTwo(self, event):
@@ -186,7 +187,9 @@ class ListPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorte
item = self.getColumnText(self.GetFirstSelected(), 0)
uce_ok = corpus.getlemuces(item)
ucis_txt, ucestxt = doconcorde(corpus, uce_ok, [item])
- win = message(self, u"Concordancier", (750, 600))
- win.html = ('\n