X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=listlex.py;h=e03df7aa52086dd76c4a9c484bcc13185b576ade;hp=dea3c98d5bbe07974c988c6a2b136e986d8dc8bb;hb=93cbfaab587c5d7f16874c270dee5d4a2f885074;hpb=3647a911117ea08f4f969720a16c58bcc7d4e809 diff --git a/listlex.py b/listlex.py index dea3c98..e03df7a 100644 --- a/listlex.py +++ b/listlex.py @@ -195,20 +195,19 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor # 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 = {} - for i, et in enumerate(self.etoiles) : - nid = wx.NewId() - 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.Append(self.popup_Tgen_glob, "Tgen global") if not self.tgen : - menu.Append(self.onmaketgen, "Make Tgen") + for i, et in enumerate(self.etoiles) : + nid = wx.NewId() + self.menuid[nid] = i + menu_stcaract.Append(nid, et) + self.Bind(wx.EVT_MENU, self.onstcaract, id = nid) + menu.AppendMenu(-1, _(u"Typical text segments").decode('utf8'), menu_stcaract) + menu.Append(self.onmaketgen, _(u"Make Tgen").decode('utf8')) self.PopupMenu(menu) menu.Destroy() @@ -231,7 +230,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) @@ -272,7 +271,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

' % ntab2[i][0], ucestxt[i]])] for i in range(0,len(ucestxt))]) - win = message(self, items, u"Segments de texte caractéristiques - %s" % self.first[ind], (900, 600)) + win = message(self, items, ' - '.join([_(u"Typical text segments").decode('utf8'), "%s" % self.first[ind]]), (900, 600)) win.Show(True) def OnPopupTwo(self, event): @@ -292,7 +291,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor wordlist = [val for val in self.tgens[item] if val in corpus.lems] ucis_txt, ucestxt = doconcorde(corpus, uce_ok, wordlist) items = dict([[i, '

'.join([ucis_txt[i], ucestxt[i]])] for i in range(0,len(ucestxt))]) - win = message(ira, items, u"Concordancier - %s" % item, (800, 500), uceids = uce_ok) + win = message(ira, items, ' - '.join([_(u"Concordance").decode('utf8'), "%s" % item]), (800, 500), uceids = uce_ok) win.Show(True) def getinf(self, txt) : @@ -343,7 +342,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor with open(tmpscript, 'w') as f : f.write(txt) exec_rcode(self.parent.RPath, tmpscript, wait = True) - win = MessageImage(self, -1, u"Graphique", size=(700, 500),style = wx.DEFAULT_FRAME_STYLE) + win = MessageImage(self, -1, _(u"Graphic").decode('utf8'), size=(700, 500),style = wx.DEFAULT_FRAME_STYLE) win.addsaveimage(tmpgraph) txt = "" % tmpgraph win.HtmlPage.SetPage(txt)