Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

hgqt: standardize on showMessage() emitting translated unicode strings

Changeset dcd4b735049b

Parent 3d6716dd6a8e

by Steve Borho

Changes to 5 files · Browse files at dcd4b735049b Showing diff from parent 3d6716dd6a8e Diff from another changeset...

 
27
28
29
 
30
31
32
 
84
85
86
87
 
88
89
90
 
454
455
456
457
 
458
459
460
 
27
28
29
30
31
32
33
 
85
86
87
 
88
89
90
91
 
455
456
457
 
458
459
460
461
@@ -27,6 +27,7 @@
 from tortoisehg.util import hglib  from tortoisehg.util.util import exec_flag_changed, isbfile, bfilepath   +from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt.lexers import get_lexer  from tortoisehg.hgqt.blockmatcher import BlockList   @@ -84,7 +85,7 @@
    showDescSignal = pyqtSignal(QString)   fileDisplayed = pyqtSignal(str) - showMessage = pyqtSignal(str) + showMessage = pyqtSignal(unicode)   revForDiffChanged = pyqtSignal(int)   filled = pyqtSignal()   @@ -454,7 +455,7 @@
  pos.append(data.find(text, pos[-1]+1))   pos = [x for x in pos if x > -1]   self.showMessage.emit( - "Found %d occurrences of '%s' in current file or diff" % ( + _("Found %d occurrences of '%s' in current file or diff") % (   len(pos), text))   return pos  
 
22
23
24
 
25
26
27
 
143
144
145
146
 
147
148
149
 
210
211
212
213
 
214
215
216
 
244
245
246
247
 
248
249
250
 
252
253
254
255
256
257
 
 
 
 
258
259
260
261
262
 
263
264
265
 
275
276
277
278
 
279
280
 
281
282
 
22
23
24
25
26
27
28
 
144
145
146
 
147
148
149
150
 
211
212
213
 
214
215
216
217
 
245
246
247
 
248
249
250
251
 
253
254
255
 
 
 
256
257
258
259
260
261
262
263
 
264
265
266
267
 
277
278
279
 
280
281
 
282
283
284
@@ -22,6 +22,7 @@
 from PyQt4.QtCore import *  from PyQt4.QtGui import *   +from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt.qtlib import geticon    class QuickBar(QToolBar): @@ -143,7 +144,7 @@
 class FindInGraphlogQuickBar(FindQuickBar):   revisionSelected = pyqtSignal(int)   fileSelected = pyqtSignal(str) - showMessage = pyqtSignal(str) + showMessage = pyqtSignal(unicode)     def __init__(self, parent):   FindQuickBar.__init__(self, parent) @@ -210,7 +211,7 @@
  def on_cancelsearch(self, *args):   self._findinlog_iter = None   self.setCancelEnabled(False) - self.showMessage.emit('Search cancelled!') + self.showMessage.emit(_('Search cancelled!'))     def on_findnext(self):   """ @@ -244,7 +245,7 @@
  for next_find in self._findinlog_iter:   if next_find is None: # not yet found, let's animate a bit the GUI   if (step % 20) == 0: - self.showMessage.emit('Searching'+'.'*(step/20)) + self.showMessage.emit(_('Searching')+'.'*(step/20))   step += 1   QTimer.singleShot(0, lambda: self.find_next_in_log(step % 80))   else: @@ -252,14 +253,15 @@
  self.setCancelEnabled(False)     rev, filename = next_find - self.revisionSelected.emit(rev) - text = unicode(self.entry.text()) - self.fileSelected.emit(filename) + if rev is not None and filename is not None: + self.revisionSelected.emit(rev) + text = unicode(self.entry.text()) + self.fileSelected.emit(filename)   if self._fileview:   self._findinfile_iter = self._fileview.searchString(text)   self.on_findnext()   return - self.showMessage.emit('No more matches found in repository') + self.showMessage.emit(_('No more matches found in repository'))   self.setCancelEnabled(False)   self._findinlog_iter = None   @@ -275,8 +277,8 @@
  if newtext.strip():   if self._findinfile_iter is None:   self.showMessage.emit( - 'Search string not found in current diff. ' + _('Search string not found in current diff. '   'Hit "Find next" button to start searching ' - 'in the repository') + 'in the repository'))   else:   self.on_findnext()
 
78
79
80
81
 
82
83
84
 
198
199
200
201
 
202
203
204
 
78
79
80
 
81
82
83
84
 
198
199
200
 
201
202
203
204
@@ -78,7 +78,7 @@
  """   Model used for displaying the revisions of a Hg *local* repository   """ - showMessage = pyqtSignal(str) + showMessage = pyqtSignal(unicode)   filled = pyqtSignal()   loaded = pyqtSignal()   @@ -198,7 +198,7 @@
    def timerEvent(self, event):   if event.timerId() == self.timerHandle: - self.showMessage.emit('filling (%d)'%(len(self.graph))) + self.showMessage.emit(_('filling (%d)')%(len(self.graph)))   if self.graph.isfilled():   self.killTimer(self.timerHandle)   self.timerHandle = None
 
27
28
29
30
 
31
32
33
 
27
28
29
 
30
31
32
33
@@ -27,7 +27,7 @@
   class SyncWidget(QWidget):   outgoingNodes = pyqtSignal(object) - showMessage = pyqtSignal(str) + showMessage = pyqtSignal(unicode)     output = pyqtSignal(thread.DataWrapper)   progress = pyqtSignal(thread.DataWrapper)
 
24
25
26
27
 
28
29
30
 
24
25
26
 
27
28
29
30
@@ -24,7 +24,7 @@
    tagChanged = pyqtSignal()   localTagChanged = pyqtSignal() - showMessage = pyqtSignal(str) + showMessage = pyqtSignal(unicode)     def __init__(self, repo=None, tag='', rev='tip', parent=None, opts={}):   super(TagDialog, self).__init__(parent)