Update translate

master3.3
parent 7a8153414b
commit f20fc7782b

@ -383,7 +383,7 @@ class MainWgt(QtGui.QMainWindow):
self.con_lost_lbl.hide() self.con_lost_lbl.hide()
self.con_lost_lbl.close() self.con_lost_lbl.close()
self.con_lost_lbl = ConnectLostLabel \ self.con_lost_lbl = ConnectLostLabel \
(_('The Server was restarted.') + '\n' + \ (_("The server was restarted.") + '\n' + \
_('Please try reconnecting to the server.'), _('Please try reconnecting to the server.'),
self, True) self, True)
self.topmenu.Processes.setDisabled(True) self.topmenu.Processes.setDisabled(True)
@ -407,10 +407,10 @@ class MainWgt(QtGui.QMainWindow):
if len(list_pid): if len(list_pid):
if str(len(list_pid)).endswith('1'): if str(len(list_pid)).endswith('1'):
msgBox.setInformativeText(_('Once the session is closed, '\ msgBox.setInformativeText(_('Once the session is closed, '\
'data on %d process will be lost!') %len(list_pid)) 'data on process %d will be lost!') %len(list_pid))
if len(list_pid) > 1: if len(list_pid) > 1:
msgBox.setInformativeText(_('Once the session is closed, '\ msgBox.setInformativeText(_('Once the session is closed, '\
'data on %d processes will be lost!') %len(list_pid)) 'data on process %d will be lost!') %len(list_pid))
msgBox.setStandardButtons(QMessageBox.Yes | QMessageBox.No | \ msgBox.setStandardButtons(QMessageBox.Yes | QMessageBox.No | \
QMessageBox.Cancel) QMessageBox.Cancel)

@ -55,7 +55,7 @@ class CertClass (QtGui.QWidget):
Send_button.clicked.connect(self.send) Send_button.clicked.connect(self.send)
layout_button.addWidget(Send_button) layout_button.addWidget(Send_button)
Get_button = QtGui.QPushButton(_("Get a certificate"), self) Get_button = QtGui.QPushButton(_("Get the certificate"), self)
# Get_button.setFixedWidth(140) # Get_button.setFixedWidth(140)
Get_button.clicked.connect(self.get) Get_button.clicked.connect(self.get)
layout_button.addWidget(Get_button) layout_button.addWidget(Get_button)
@ -71,7 +71,7 @@ class CertClass (QtGui.QWidget):
self.sendlayout.setColumnStretch(1,1) self.sendlayout.setColumnStretch(1,1)
self.sendlayout.setColumnStretch(2,1) self.sendlayout.setColumnStretch(2,1)
self.GroupBoxSend = QtGui.QGroupBox(_('Signature request')) self.GroupBoxSend = QtGui.QGroupBox(_("Certificate signature request"))
# self.GroupBoxSend.setContentsMargins(10,0,0,0) # self.GroupBoxSend.setContentsMargins(10,0,0,0)
self.GroupBoxSend.setLayout(self.sendlayout) self.GroupBoxSend.setLayout(self.sendlayout)
@ -185,14 +185,14 @@ class CertClass (QtGui.QWidget):
return 1 return 1
del (self.client) del (self.client)
if int(res) < 0: if int(res) < 0:
show_msg (_("This server has not signed the certificate!"), show_msg (_("The server has not signed the certificate!"),
parent=self) parent=self)
return 1 return 1
fc = open(self.default_cert_path + 'req_id', 'w') fc = open(self.default_cert_path + 'req_id', 'w')
fc.write(res) fc.write(res)
fc.close() fc.close()
show_msg (_("Your request ID: %s") %res + '\n' + \ show_msg (_("Your request ID: %s") %res + '\n' + \
_("To sign the certificate on the server, use command") + \ _("To submit the certificate request on the server use command") + \
'\n'+'cl-core --sign-client ID_CLIENT_REQUEST', '\n'+'cl-core --sign-client ID_CLIENT_REQUEST',
title = _('Request'), parent=self) title = _('Request'), parent=self)
return 0 return 0
@ -270,7 +270,7 @@ class CertClass (QtGui.QWidget):
elif cert == '2': elif cert == '2':
show_msg (_("The request has not been reviewed yet.") + '\n' + \ show_msg (_("The request has not been reviewed yet.") + '\n' + \
_("Your request ID: %s") %req_id + '\n'+\ _("Your request ID: %s") %req_id + '\n'+\
_("To sign the certificate on the server, use command")+\ _("To submit the certificate request on the server use command")+\
'\n'+'cl-core --sign-client ID_CLIENT_REQUEST', '\n'+'cl-core --sign-client ID_CLIENT_REQUEST',
title = _('Request'), parent = self) title = _('Request'), parent = self)
return 1 return 1

@ -207,7 +207,7 @@ def parse():
dest='help', help=_("show this help message and exit")) dest='help', help=_("show this help message and exit"))
parser.add_argument( parser.add_argument(
'-l', '--lang', type=str, dest='lang', '-l', '--lang', type=str, dest='lang',
help=_('language for translation')) help=_("translation language"))
parser.add_argument( parser.add_argument(
'--method', type=str, dest='method', '--method', type=str, dest='method',
help=_('call method')) help=_('call method'))

@ -520,8 +520,8 @@ class MainFrameRes(QtGui.QWidget):
def get_Frame_cycle(self, current_frame, through_object): def get_Frame_cycle(self, current_frame, through_object):
if type(current_frame) == Exception: if type(current_frame) == Exception:
_print (_('Failed to get the frame from the server.')) _print (_("Failed to get a frame from the server."))
show_msg(_('Failed to get the frame from the server.') +'\n'+ \ show_msg(_("Failed to get a frame from the server.") +'\n'+ \
_('Try resfeshing this page later.'),'get frame error') _('Try resfeshing this page later.'),'get frame error')
return 1 return 1
sid, pid = through_object sid, pid = through_object
@ -596,7 +596,7 @@ class MainFrameRes(QtGui.QWidget):
def get_entire_frame_after(self, current_frame, through_object): def get_entire_frame_after(self, current_frame, through_object):
if type(current_frame) == Exception: if type(current_frame) == Exception:
_print (_('Failed to get the complete frame from the server.')) _print (_('Failed to get the complete frame from the server.'))
# show_msg(_('Failed to get the frame from the server.') +'\n'+ \ # show_msg(_("Failed to get a frame from the server.") +'\n'+ \
# _('Try resfeshing this page later.'),'get frame error') # _('Try resfeshing this page later.'),'get frame error')
return 1 return 1
sid, pid = through_object sid, pid = through_object

@ -370,8 +370,8 @@ class ShortFrameRes(QtGui.QWidget):
def get_Frame_cycle(self, current_frame, through_object): def get_Frame_cycle(self, current_frame, through_object):
if type(current_frame) == Exception: if type(current_frame) == Exception:
_print (_('Failed to get the frame from the server.')) _print (_("Failed to get a frame from the server."))
show_msg(_('Failed to get the frame from the server.') +'\n'+ \ show_msg(_("Failed to get a frame from the server.") +'\n'+ \
_('Try resfeshing this page later.'),'get frame error') _('Try resfeshing this page later.'),'get frame error')
return 1 return 1
sid, pid = through_object sid, pid = through_object
@ -445,7 +445,7 @@ class ShortFrameRes(QtGui.QWidget):
def get_entire_frame_after(self, current_frame, through_object): def get_entire_frame_after(self, current_frame, through_object):
if type(current_frame) == Exception: if type(current_frame) == Exception:
_print (_('Failed to get the complete frame from the server.')) _print (_('Failed to get the complete frame from the server.'))
show_msg(_('Failed to get the frame from the server.') +'\n'+ \ show_msg(_("Failed to get a frame from the server.") +'\n'+ \
_('Try resfeshing this page later.'),'get frame error') _('Try resfeshing this page later.'),'get frame error')
return 1 return 1
sid, pid = through_object sid, pid = through_object

@ -114,7 +114,7 @@ class TrayUpdateSystem(QtCore.QThread):
current_frame = None current_frame = None
for item in range(len(current_frame[0])): for item in range(len(current_frame[0])):
if current_frame[0][item].type == 'error': if current_frame[0][item].type == 'error':
self.mes_sig.emit(_('Error updating!'), \ self.mes_sig.emit(_("Failed to update!"), \
current_frame[0][item].message) current_frame[0][item].message)
end_frame = False end_frame = False
return 1 return 1
@ -164,7 +164,7 @@ class TrayIcon (QtGui.QSystemTrayIcon):
# Translate right click menu # Translate right click menu
self.right_menu.about_action.setText(_('About')) self.right_menu.about_action.setText(_('About'))
self.right_menu.bug_action.setText(_('Report Bug')) self.right_menu.bug_action.setText(_("Report a Bug"))
self.right_menu.tools_action.setText(_('Program settings')) self.right_menu.tools_action.setText(_('Program settings'))
# self.right_menu.sys_update.setText(_('Update system')) # self.right_menu.sys_update.setText(_('Update system'))
self.right_menu.exit_action.setText(_('Exit Program')) self.right_menu.exit_action.setText(_('Exit Program'))
@ -348,7 +348,7 @@ class RightButtonMenu(QtGui.QMenu):
if not bug_icon.isNull(): if not bug_icon.isNull():
break break
self.bug_action = QtGui.QAction(bug_icon, _('Report Bug'), self, \ self.bug_action = QtGui.QAction(bug_icon, _("Report a Bug"), self, \
triggered=parent.bug_report) triggered=parent.bug_report)
self.addAction(self.bug_action) self.addAction(self.bug_action)

@ -84,7 +84,7 @@ class ViewProc(QtGui.QWidget):
# add status button # add status button
if self.ClientObj.process_dict[str(list_pid[num])]['status'] == '1': if self.ClientObj.process_dict[str(list_pid[num])]['status'] == '1':
kill_but_text = _('Kill the process? (The process is active)') kill_but_text = _('Kill the process? (It\' active)')
kill_button = QtGui.QPushButton(kill_but_text, self) kill_button = QtGui.QPushButton(kill_but_text, self)
kill_button.clicked.connect(self.kill_process \ kill_button.clicked.connect(self.kill_process \
(int(list_pid[num]), num+2, 2)) (int(list_pid[num]), num+2, 2))

@ -89,8 +89,8 @@ class AddServerCert (QtGui.QDialog):
self.grid.addWidget(self.tab, 3, 0, 3, 3) self.grid.addWidget(self.tab, 3, 0, 3, 3)
self.lbl_list.append(LabelWordWrap \ self.lbl_list.append(LabelWordWrap \
(_("Add this server's certificate to trusted or ") +\ (_("Add this server certificate to trusted or ") +\
_('try add the CA and ROOT certificates to trusted?'),self)) _('try adding the CA and root certificates to trusted?'),self))
self.pix_lbl = QtGui.QLabel(self) self.pix_lbl = QtGui.QLabel(self)
pi = QtGui.QPixmap() pi = QtGui.QPixmap()
@ -108,7 +108,7 @@ class AddServerCert (QtGui.QDialog):
self.server_but.clicked.connect(self.close) self.server_but.clicked.connect(self.close)
self.grid.addWidget(self.server_but, x, 0) self.grid.addWidget(self.server_but, x, 0)
self.ca_but = QtGui.QPushButton(_('Add the CA and ROOT certificates'), self.ca_but = QtGui.QPushButton(_("Add the CA and root certificates"),
self) self)
self.ca_but.clicked.connect(self.add_ca) self.ca_but.clicked.connect(self.add_ca)
self.ca_but.clicked.connect(self.add_server) self.ca_but.clicked.connect(self.add_server)
@ -394,7 +394,7 @@ class CheckingClientHTTPSConnection(CheckingHTTPSConnection):
cert = '0' cert = '0'
if cert == '1': if cert == '1':
msg = _('Invalid server certificate') msg = _("Invalid server certificate!")
show_msg (msg) show_msg (msg)
return return

@ -170,7 +170,7 @@ class FrameConnection(QtGui.QWidget):
self.setDisabled(True) self.setDisabled(True)
if self.ClientObj.client: if self.ClientObj.client:
show_msg(_('You are connected to the server!')+'\n' + \ show_msg(_('You are connected to the server!')+'\n' + \
_('Please break') +' '+ _('previous connection!'), \ _("Please disconnect") +' '+ _('previous connection!'), \
_('Connection Error')) _('Connection Error'))
return 1 return 1
@ -337,7 +337,7 @@ class FrameConnection(QtGui.QWidget):
self.ClientObj.lang) self.ClientObj.lang)
Connect_Error = 0 Connect_Error = 0
except VerifyError, e: except VerifyError, e:
show_msg (e.value,_("Certificate verification error"),self) show_msg (e.value,_("Server certificate verification error"),self)
e.message = 'VerifyError' e.message = 'VerifyError'
Connect_Error = 1 Connect_Error = 1
except OpenSSL.crypto.Error, e: except OpenSSL.crypto.Error, e:
@ -358,7 +358,7 @@ class FrameConnection(QtGui.QWidget):
# self.close() # self.close()
if not locals().has_key('e'): if not locals().has_key('e'):
mess = _('You do not have a certificate. Please generate ' mess = _('You do not have a certificate. Please generate '
'a new request and get a new certificate from ' 'a new request and get the new certificate from '
'the server.') 'the server.')
show_msg (mess, parent = self) show_msg (mess, parent = self)
elif e.message == 'VerifyError': elif e.message == 'VerifyError':
@ -366,7 +366,7 @@ class FrameConnection(QtGui.QWidget):
elif e.message == 1: elif e.message == 1:
mess = _('You do not have a certificate or your ' mess = _('You do not have a certificate or your '
'certificate does not match the server certificate.' 'certificate does not match the server certificate.'
' Please generate a new request and get a new ' ' Please generate a new request and get the new '
'certificate from the server.') 'certificate from the server.')
show_msg (mess, parent = self) show_msg (mess, parent = self)
else: else:

@ -79,7 +79,7 @@ class RequestCreate (QtGui.QWidget):
self.mainlayout.addWidget(self.netw_adr, 3,1) self.mainlayout.addWidget(self.netw_adr, 3,1)
# Add State name field # Add State name field
self.mainlayout.addWidget(LabelWordWrap(_('State Name'), self),4,0, \ self.mainlayout.addWidget(LabelWordWrap(_("City"), self),4,0, \
QtCore.Qt.AlignRight) QtCore.Qt.AlignRight)
self.state_name = QtGui.QLineEdit('My_State', self) self.state_name = QtGui.QLineEdit('My_State', self)
self.mainlayout.addWidget(self.state_name, 4,1) self.mainlayout.addWidget(self.state_name, 4,1)

@ -182,7 +182,7 @@ class BugWgt(QtGui.QWidget):
break break
self.setWindowIcon(bug_icon) self.setWindowIcon(bug_icon)
self.setWindowTitle(_('Report Bug')) self.setWindowTitle(_("Report a Bug"))
self.move(parent.window().geometry().x() + self.move(parent.window().geometry().x() +
parent.window().geometry().width() / 2 parent.window().geometry().width() / 2
@ -229,9 +229,9 @@ class BugWgt(QtGui.QWidget):
server.set_debuglevel(performDebugging) server.set_debuglevel(performDebugging)
try: try:
server.sendmail(sender, [receivers], msg.as_string()) server.sendmail(sender, [receivers], msg.as_string())
show_msg (_('Email sent!')) show_msg (_("Message sent!"))
server.quit() server.quit()
self.close() self.close()
except: except:
show_msg (_('Sending error!')) show_msg (_("Sending error"))
server.quit() server.quit()

@ -2275,11 +2275,11 @@ class MainFrame(QtGui.QWidget):
if not _(' Step ') in temp[len(temp)-1]: if not _(' Step ') in temp[len(temp)-1]:
self.ClientObj._parent.setWindowTitle \ self.ClientObj._parent.setWindowTitle \
(self.ClientObj._parent.windowTitle() + \ (self.ClientObj._parent.windowTitle() + \
' - ' + _('Run')) ' - ' + _("Running"))
else: else:
temp.pop() temp.pop()
self.ClientObj._parent.setWindowTitle('-'.join(temp) \ self.ClientObj._parent.setWindowTitle('-'.join(temp) \
+ ' - ' + _('Run')) + ' - ' + _("Running"))
self.calling_error = False self.calling_error = False
# Call method display process results # Call method display process results
self.ClientObj.MainWidget.main_frame_res(self.method_name, \ self.ClientObj.MainWidget.main_frame_res(self.method_name, \

@ -177,7 +177,7 @@ class HelpMenu(TopMenu):
if not bug_icon.isNull(): if not bug_icon.isNull():
break break
bug = QtGui.QAction(bug_icon, _("Report Bug"), \ bug = QtGui.QAction(bug_icon, _("Report a Bug"), \
self, triggered=self.actions.bug_report) self, triggered=self.actions.bug_report)
menu.addAction(bug) menu.addAction(bug)
# menu.addSeparator() # menu.addSeparator()
@ -329,7 +329,7 @@ class ErrorLabel (QtGui.QWidget):
if not bug_icon.isNull(): if not bug_icon.isNull():
break break
bug = QtGui.QAction(bug_icon, _("Report Bug"), self, \ bug = QtGui.QAction(bug_icon, _("Report a Bug"), self, \
triggered=self.bug_report) triggered=self.bug_report)
self.menu.addAction(bug) self.menu.addAction(bug)
@ -392,7 +392,7 @@ class ErrorWgt(QtGui.QWidget):
if not bug_icon.isNull(): if not bug_icon.isNull():
break break
bug = QtGui.QAction(bug_icon, _("Report Bug"), self, \ bug = QtGui.QAction(bug_icon, _("Report a Bug"), self, \
triggered=self.bug_report) triggered=self.bug_report)
# bug.setDisabled(True) # bug.setDisabled(True)
self.menu.addAction(bug) self.menu.addAction(bug)
@ -2385,7 +2385,7 @@ def client_post_auth(client):
try: try:
if not os.path.exists(client.CERT_FILE): if not os.path.exists(client.CERT_FILE):
show_msg (_('You do not have a certificate. Please generate a ' show_msg (_('You do not have a certificate. Please generate a '
'new request and get a new certificate from the server.')) 'new request and get the new certificate from the server.'))
return 1 return 1
except VerifyError, e: except VerifyError, e:
show_msg (e.value) show_msg (e.value)

@ -66,7 +66,7 @@ def client_post_cert (client, lang):
if results[0][1] == -2: if results[0][1] == -2:
_print (_("Certificate expired")) _print (_("Certificate expired"))
elif results[0][1] > 0: elif results[0][1] > 0:
_print (_("Expires after %d days")%(results[0][1])) _print (_("The certificate expires after %d days")%(results[0][1]))
except: except:
pass pass
@ -99,15 +99,15 @@ class ViewSessionInfo (QtGui.QWidget):
self.layout.addWidget(LabelWordWrap(_('Certificate not sent!'), self.layout.addWidget(LabelWordWrap(_('Certificate not sent!'),
self), 5,0,1,2) self), 5,0,1,2)
else: else:
self.layout.addWidget(LabelWordWrap(_('Your certifitate id: ') \ self.layout.addWidget(LabelWordWrap(_("Your certificate ID: ") \
+ str(results[0][0]), self), 5,0,1,2) + str(results[0][0]), self), 5,0,1,2)
try: try:
if results[0][1] == -2: if results[0][1] == -2:
self.layout.addWidget(LabelWordWrap(_('expiry ' self.layout.addWidget(LabelWordWrap(_('Certificate '
'certificate has passed'), self), 6,0,1,2) 'expired'), self), 6,0,1,2)
elif results[0][1] > 0: elif results[0][1] > 0:
self.layout.addWidget(LabelWordWrap(_('shelf life expires' self.layout.addWidget(LabelWordWrap(_('The certificate '
' after %d days')%(results[0][1]), self), 6,0,1,2) 'expires after %d days')%(results[0][1]), self), 6,0,1,2)
except: except:
pass pass
self.layout.addWidget(LabelWordWrap(_('Your IP address: ') + ip, self.layout.addWidget(LabelWordWrap(_('Your IP address: ') + ip,
@ -117,7 +117,7 @@ class ViewSessionInfo (QtGui.QWidget):
# Add clear cache Button # Add clear cache Button
self.clear_cache_button = QtGui.QPushButton \ self.clear_cache_button = QtGui.QPushButton \
(_('Clear your session cache'), self) (_("Clear the session cache"), self)
self.clear_cache_button.clicked.connect(self.clear_cache(client, sid)) self.clear_cache_button.clicked.connect(self.clear_cache(client, sid))
self.layout.addWidget(self.clear_cache_button, 9,0) self.layout.addWidget(self.clear_cache_button, 9,0)
@ -150,4 +150,4 @@ class ViewSessionInfo (QtGui.QWidget):
show_msg(_('Error clearing the session cache'), parent = self) show_msg(_('Error clearing the session cache'), parent = self)
else: else:
show_msg(_('Session cache cleared'), parent = self) show_msg(_('Session cache cleared'), parent = self)
return wrapper return wrapper

Loading…
Cancel
Save