49 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
49 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) |
50 |
50 |
51 self.vcs = vcs |
51 self.vcs = vcs |
52 |
52 |
53 self.contents.setHtml( |
53 self.contents.setHtml( |
54 self.trUtf8('<b>Processing your request, please wait...</b>')) |
54 self.tr('<b>Processing your request, please wait...</b>')) |
55 |
55 |
56 self.contents.anchorClicked.connect(self.__sourceChanged) |
56 self.contents.anchorClicked.connect(self.__sourceChanged) |
57 |
57 |
58 self.flags = { |
58 self.flags = { |
59 'A': self.trUtf8('Added'), |
59 'A': self.tr('Added'), |
60 'D': self.trUtf8('Deleted'), |
60 'D': self.tr('Deleted'), |
61 'M': self.trUtf8('Modified') |
61 'M': self.tr('Modified') |
62 } |
62 } |
63 |
63 |
64 self.revString = self.trUtf8('revision') |
64 self.revString = self.tr('revision') |
65 self.diff = None |
65 self.diff = None |
66 |
66 |
67 self.sbsCheckBox.setEnabled(isFile) |
67 self.sbsCheckBox.setEnabled(isFile) |
68 self.sbsCheckBox.setVisible(isFile) |
68 self.sbsCheckBox.setVisible(isFile) |
69 |
69 |
143 query = QByteArray() |
143 query = QByteArray() |
144 query.append(lv).append('_').append(ver) |
144 query.append(lv).append('_').append(ver) |
145 url.setEncodedQuery(query) |
145 url.setEncodedQuery(query) |
146 dstr += ' [<a href="{0}" name="{1}">{2}</a>]'.format( |
146 dstr += ' [<a href="{0}" name="{1}">{2}</a>]'.format( |
147 url.toString(), query, |
147 url.toString(), query, |
148 self.trUtf8('diff to {0}').format(lv) |
148 self.tr('diff to {0}').format(lv) |
149 ) |
149 ) |
150 except IndexError: |
150 except IndexError: |
151 pass |
151 pass |
152 dstr += '<br />\n' |
152 dstr += '<br />\n' |
153 self.contents.insertHtml(dstr) |
153 self.contents.insertHtml(dstr) |
155 author = log["author"] |
155 author = log["author"] |
156 message = log["message"] |
156 message = log["message"] |
157 if sys.version_info[0] == 2: |
157 if sys.version_info[0] == 2: |
158 author = author.decode('utf-8') |
158 author = author.decode('utf-8') |
159 message = message.decode('utf-8') |
159 message = message.decode('utf-8') |
160 dstr = self.trUtf8('<i>author: {0}</i><br />\n')\ |
160 dstr = self.tr('<i>author: {0}</i><br />\n')\ |
161 .format(author) |
161 .format(author) |
162 self.contents.insertHtml(dstr) |
162 self.contents.insertHtml(dstr) |
163 |
163 |
164 dstr = self.trUtf8('<i>date: {0}</i><br />\n')\ |
164 dstr = self.tr('<i>date: {0}</i><br />\n')\ |
165 .format(formatTime(log["date"])) |
165 .format(formatTime(log["date"])) |
166 self.contents.insertHtml(dstr) |
166 self.contents.insertHtml(dstr) |
167 |
167 |
168 self.contents.insertHtml('<br />\n') |
168 self.contents.insertHtml('<br />\n') |
169 |
169 |
182 dstr = '{0} {1}'.format(self.flags[action], path) |
182 dstr = '{0} {1}'.format(self.flags[action], path) |
183 if changeInfo["copyfrom_path"] is not None: |
183 if changeInfo["copyfrom_path"] is not None: |
184 copyfrom_path = changeInfo["copyfrom_path"] |
184 copyfrom_path = changeInfo["copyfrom_path"] |
185 if sys.version_info[0] == 2: |
185 if sys.version_info[0] == 2: |
186 copyfrom_path = copyfrom_path.decode('utf-8') |
186 copyfrom_path = copyfrom_path.decode('utf-8') |
187 dstr += self.trUtf8( |
187 dstr += self.tr( |
188 " (copied from {0}, revision {1})")\ |
188 " (copied from {0}, revision {1})")\ |
189 .format(copyfrom_path, |
189 .format(copyfrom_path, |
190 changeInfo["copyfrom_revision"].number) |
190 changeInfo["copyfrom_revision"].number) |
191 dstr += '<br />\n' |
191 dstr += '<br />\n' |
192 self.contents.insertHtml(dstr) |
192 self.contents.insertHtml(dstr) |