Fixed "Use the _Translate function, and that 'to' should be 'too'."
This commit is contained in:
parent
f8e3b2a68f
commit
9bbe301305
|
@ -1823,7 +1823,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
|
|
||||||
def click_pushButtonAddImage(self):
|
def click_pushButtonAddImage(self):
|
||||||
file_name=QtGui.QFileDialog.getOpenFileName(
|
file_name=QtGui.QFileDialog.getOpenFileName(
|
||||||
self,"Select an image",self.images_dir,"Image (*.png *.jpg *.jepg *.gif)")
|
self,_translate("MainWindow","Select an image"),self.images_dir,_translate("MainWindow","Image (*.png *.jpg *.jepg *.gif)"))
|
||||||
if file_name.isNull(): # Operation was canceled
|
if file_name.isNull(): # Operation was canceled
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -1836,7 +1836,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
if image.height()*image.width()>300*300:
|
if image.height()*image.width()>300*300:
|
||||||
#Do we need to resize it?
|
#Do we need to resize it?
|
||||||
r=QtGui.QMessageBox.question(
|
r=QtGui.QMessageBox.question(
|
||||||
self,"Image","This image is to big.\nShould it be scaled?",
|
self,_translate("MainWindow","Image"),_translate("MainWindow","This image is too big.\nShould it be scaled?"),
|
||||||
QtGui.QMessageBox.Yes,QtGui.QMessageBox.No) # Why I cannot put Yes button before No button? That is sux
|
QtGui.QMessageBox.Yes,QtGui.QMessageBox.No) # Why I cannot put Yes button before No button? That is sux
|
||||||
if r==QtGui.QMessageBox.Yes:
|
if r==QtGui.QMessageBox.Yes:
|
||||||
if image.height()>=image.width():
|
if image.height()>=image.width():
|
||||||
|
@ -1855,7 +1855,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
html_data="<img src=\""+embeded_url+"\" />"
|
html_data="<img src=\""+embeded_url+"\" />"
|
||||||
self.ui.textEditMessage.insertPlainText("\n"+html_data)
|
self.ui.textEditMessage.insertPlainText("\n"+html_data)
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.information(self,"Error","Could not open an image")
|
QtGui.QMessageBox.information(self,_translate("MainWindow","Error"),_translate("MainWindow","Could not open an image"))
|
||||||
|
|
||||||
def imageRecourceToBase64(self,doc,name):
|
def imageRecourceToBase64(self,doc,name):
|
||||||
buf=QBuffer()
|
buf=QBuffer()
|
||||||
|
|
Reference in New Issue
Block a user