Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hggtk: make 'Confirm' in dialog title explicit

this makes things simpler for translations, and is less surprising

Changeset ed62fe66d79e

Parent c83cb8c15230

by Steve Borho

Changes to 9 files · Browse files at ed62fe66d79e Showing diff from parent c83cb8c15230 Diff from another changeset...

 
721
722
723
724
 
725
726
727
 
721
722
723
 
724
725
726
727
@@ -721,7 +721,7 @@
  def _revert_file(self, menuitem):   '''User selected file revert from the file list context menu'''   rev = self.currev - dialog = Confirm(_('revert file to old revision'), [], self, + dialog = Confirm(_('Confirm revert file to old revision'), [], self,   _('Revert %s to contents at revision %d?') % (self.curfile, rev))   if dialog.run() == gtk.RESPONSE_NO:   return
Change 1 of 8 Show Entire File hggtk/​commit.py Stacked
 
163
164
165
166
 
167
168
169
 
280
281
282
283
 
284
285
286
 
505
506
507
508
 
 
509
510
511
 
529
530
531
532
 
533
534
535
 
559
560
561
562
 
563
564
565
 
567
568
569
570
 
571
572
573
 
579
580
581
582
 
583
584
585
 
618
619
620
621
 
622
623
624
625
626
627
 
628
629
630
 
163
164
165
 
166
167
168
169
 
280
281
282
 
283
284
285
286
 
505
506
507
 
508
509
510
511
512
 
530
531
532
 
533
534
535
536
 
560
561
562
 
563
564
565
566
 
568
569
570
 
571
572
573
574
 
580
581
582
 
583
584
585
586
 
619
620
621
 
622
623
624
625
626
627
 
628
629
630
631
@@ -163,7 +163,7 @@
  if index >= 0:   buf = self.text.get_buffer()   if buf.get_char_count() and buf.get_modified(): - response = Confirm(_('Discard Message'), [], self, + response = Confirm(_('Confirm Discard Message'), [], self,   _('Discard current commit message?')).run()   if response != gtk.RESPONSE_YES:   combobox.set_active(-1) @@ -280,7 +280,7 @@
  live = False   buf = self.text.get_buffer()   if buf.get_char_count() > 10 and buf.get_modified(): - dialog = Confirm(_('Exit'), [], self, + dialog = Confirm(_('Confirm Exit'), [], self,   _('Save commit message at exit?'))   res = dialog.run()   if res == gtk.RESPONSE_YES: @@ -505,7 +505,8 @@
      def _undo_clicked(self, toolbutton, data=None): - response = Confirm(_('Undo commit'), [], self, _('Undo last commit')).run() + response = Confirm(_('Confirm Undo commit'), + [], self, _('Undo last commit')).run()   if response != gtk.RESPONSE_YES:   return   @@ -529,7 +530,7 @@
  if self.test_opt('addremove'):   return True   else: - response = Confirm(_('Add/Remove'), files, self).run() + response = Confirm(_('Confirm Add/Remove'), files, self).run()   if response == gtk.RESPONSE_YES:   # This will stay set for further commits (meaning no more prompts). Problem?   self.opts['addremove'] = True @@ -559,7 +560,7 @@
  buf.get_end_iter()).splitlines()     if sumlen and len(lines[0].rstrip()) > sumlen: - resp = Confirm(_('Commit'), [], self, + resp = Confirm(_('Confirm Commit'), [], self,   _('The summary line length of %i is greater than'   ' %i.\n\nIgnore format policy and continue'   ' commit?') % @@ -567,7 +568,7 @@
  if resp != gtk.RESPONSE_YES:   return False   if sumlen and len(lines) > 1 and len(lines[1].strip()): - resp = Confirm(_('Commit'), [], self, + resp = Confirm(_('Confirm Commit'), [], self,   _('The summary line is not followed by a blank'   ' line.\n\nIgnore format policy and continue'   ' commit?')).run() @@ -579,7 +580,7 @@
  errs = [str(x[1]+start+1) for x in zip(tmp, range(len(tmp)))   if x[0]]   if errs: - resp = Confirm(_('Commit'), [], self, + resp = Confirm(_('Confirm Commit'), [], self,   _('The following lines are over the %i-'   'character limit: %s.\n\nIgnore format'   ' policy and continue commit?') % @@ -618,13 +619,13 @@
  newbranch = fromutf(self.nextbranch)   if newbranch in self.repo.branchtags():   if newbranch not in [p.branch() for p in self.repo.parents()]: - response = Confirm(_('Override Branch'), [], self, + response = Confirm(_('Confirm Override Branch'), [], self,   _('A branch named "%s" already exists,\n'   'override?') % newbranch).run()   else:   response = gtk.RESPONSE_YES   else: - response = Confirm(_('New Branch'), [], self, + response = Confirm(_('Confirm New Branch'), [], self,   _('Create new named branch "%s"?') % newbranch).run()   if response == gtk.RESPONSE_YES:   self.repo.dirstate.setbranch(newbranch)
Change 1 of 1 Show Entire File hggtk/​gdialog.py Stacked
 
74
75
76
77
 
78
79
80
 
74
75
76
 
77
78
79
80
@@ -74,7 +74,7 @@
  def __init__(self, title, files, parent, primary=None):   SimpleMessage.__init__(self, parent, gtk.DIALOG_MODAL,   gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO) - self.set_title(hglib.toutf(_('Confirm ') + title)) + self.set_title(hglib.toutf(title))   if primary is None:   primary = title + ' file' + ((len(files) > 1 and 's') or '') + '?'   primary = '<b>' + primary + '</b>'
Change 1 of 2 Show Entire File hggtk/​history.py Stacked
 
483
484
485
486
 
487
488
489
 
510
511
512
513
 
514
515
516
 
483
484
485
 
486
487
488
489
 
510
511
512
 
513
514
515
516
@@ -483,7 +483,7 @@
    def _strip_rev(self, menuitem):   rev = self.currow[treemodel.REVID] - res = Confirm(_('Strip Revision(s)'), [], self, + res = Confirm(_('Confirm Strip Revision(s)'), [], self,   _('Remove revision %d and all descendants?') % rev).run()   if res != gtk.RESPONSE_YES:   return @@ -510,7 +510,7 @@
    def _revert(self, menuitem):   rev = self.currow[treemodel.REVID] - res = Confirm(_('Revert Revision(s)'), [], self, + res = Confirm(_('Confirm Revert Revision(s)'), [], self,   _('Revert all files to revision %d?\nThis will overwrite your '   'local changes') % rev).run()  
Change 1 of 1 Show Entire File hggtk/​merge.py Stacked
 
152
153
154
155
 
156
157
158
 
152
153
154
 
155
156
157
158
@@ -152,7 +152,7 @@
  gobject.idle_add(dlg.destroy)     def undo(self, button, local, merge, commit): - response = gdialog.Confirm(_('undo merge'), [], self, + response = gdialog.Confirm(_('Confirm undo merge'), [], self,   _('Clean checkout of original revision?')).run()   if response != gtk.RESPONSE_YES:   return
Change 1 of 2 Show Entire File hggtk/​recovery.py Stacked
 
114
115
116
117
 
118
119
120
 
133
134
135
136
 
137
138
139
 
114
115
116
 
117
118
119
120
 
133
134
135
 
136
137
138
139
@@ -114,7 +114,7 @@
  return tbutton     def _clean_clicked(self, toolbutton, data=None): - response = gdialog.Confirm(_('Clean repository'), [], self, + response = gdialog.Confirm(_('Confirm clean repository'), [], self,   "%s ?" % os.path.basename(self.root)).run()   if response != gtk.RESPONSE_YES:   return @@ -133,7 +133,7 @@
  shlib.shell_notify([self.root])     def _rollback_clicked(self, toolbutton, data=None): - response = gdialog.Confirm(_('Rollback repository'), [], self, + response = gdialog.Confirm(_('Confirm rollback repository'), [], self,   "%s ?" % os.path.basename(self.root)).run()   if response != gtk.RESPONSE_YES:   return
Change 1 of 1 Show Entire File hggtk/​serve.py Stacked
 
151
152
153
154
 
155
156
157
 
151
152
153
 
154
155
156
157
@@ -151,7 +151,7 @@
  check if server is running, or to terminate if running   '''   if gservice and not gservice.stopped: - ret = gdialog.Confirm(_('Really Exit?'), [], self, + ret = gdialog.Confirm(_('Confirm Really Exit?'), [], self,   _('Server process is still running\n'   'Exiting will stop the server.')).run()   if ret == gtk.RESPONSE_YES:
Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
1090
1091
1092
1093
 
1094
1095
1096
1097
1098
1099
 
1100
1101
1102
 
1177
1178
1179
1180
 
1181
1182
1183
 
1090
1091
1092
 
1093
1094
1095
1096
1097
1098
 
1099
1100
1101
1102
 
1177
1178
1179
 
1180
1181
1182
1183
@@ -1090,13 +1090,13 @@
  # rev options needs extra tweaking since is not an array for   # revert command   revertopts['rev'] = revertopts['rev'][0] - dialog = Confirm(_('Revert'), files, self, + dialog = Confirm(_('Confirm Revert'), files, self,   _('Revert files to revision ') + revertopts['rev'] + '?')   else:   # rev options needs extra tweaking since it must be an empty   # string when unspecified for revert command   revertopts['rev'] = '' - dialog = Confirm('Revert', files, self) + dialog = Confirm('Confirm Revert', files, self)   if dialog.run() == gtk.RESPONSE_YES:   success, outtext = self._hg_call_wrapper('Revert', dohgrevert)   if success: @@ -1177,7 +1177,7 @@
  self._delete_files([wfile])     def _delete_files(self, files): - dialog = Confirm(_('Delete unrevisioned'), files, self) + dialog = Confirm(_('Confirm Delete Unrevisioned'), files, self)   if dialog.run() == gtk.RESPONSE_YES :   errors = ''   for wfile in files:
 
448
449
450
451
 
452
453
454
 
448
449
450
 
451
452
453
454
@@ -448,7 +448,7 @@
    def should_live(self, *args):   if self.dirty: - ret = gdialog.Confirm(_('quit without saving?'), [], self, + ret = gdialog.Confirm(_('Confirm quit without saving?'), [], self,   _('Yes to abandon changes, No to continue')).run()   if ret != gtk.RESPONSE_YES:   self.emit_stop_by_name('response')