Re: [PyQt] Pyqt Translation

2013-01-31 Thread Vincent Vande Vyvre
Le 31/01/13 12:37, uahmed a écrit :
 Hi

 I am facing problem in doing translation of pyqt application . The way
 i use to create frame /window is that . I create the frame on Qt4
 Designer and it generate the .ui file after that i convert it to
 python file using pyuic4 tool and include it in the application .

 I search internet what i get is that qt creator has Languist program
 that take .pro file format and can generate the language file . What
 files i can have are the .ui or.py file . and pyqt has  pylupdate4
 program that can do it but that required .pro file and i have .ui and
 py file .I also try to open a ui file in qt Creator and save it as a
 project file and than use pylupdate4 and lupdate but it says its not
 .pro file format .

 Can anyone tell me whats the best way to translate the file . In my
 application sometime i have to update the window text on the runtime
 so that text is in the code too any way to separate that code ? . I am
 sorry i am new to converting files for language .

 Any reply will be the thankful

 Thank you

 Ahmed


 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt
This is an example of a file .pro

---
SOURCES = main.py\
ui_foo.py\
ui_dialog.py
   
TRANSLATIONS= myApp_fr.ts

CODECFORTR  = UTF-8

CODECFORSRC = UTF-8
---

myApp_fr.ts is french in this example, you'll need to create one .ts
file for each langage.

-- 
Vincent V.V.
Oqapy https://launchpad.net/oqapy . Qarte
https://launchpad.net/qarte . PaQager https://launchpad.net/paqager
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Pyqt Translation

2013-01-31 Thread uahmed
Hi

Thanks for the reply . Is there any way to do tranlsation with '.ui'  file
format or with .py file . I am not using QtCreator i did whole code from
scratch and i make the other windows in QtDesigner which generate the '.ui'
file and than i use them in my code .

Thanks

On Thu, Jan 31, 2013 at 2:53 PM, Vincent Vande Vyvre 
vincent.vandevy...@swing.be wrote:

 Le 31/01/13 12:37, uahmed a écrit :
  Hi
 
  I am facing problem in doing translation of pyqt application . The way
  i use to create frame /window is that . I create the frame on Qt4
  Designer and it generate the .ui file after that i convert it to
  python file using pyuic4 tool and include it in the application .
 
  I search internet what i get is that qt creator has Languist program
  that take .pro file format and can generate the language file . What
  files i can have are the .ui or.py file . and pyqt has  pylupdate4
  program that can do it but that required .pro file and i have .ui and
  py file .I also try to open a ui file in qt Creator and save it as a
  project file and than use pylupdate4 and lupdate but it says its not
  .pro file format .
 
  Can anyone tell me whats the best way to translate the file . In my
  application sometime i have to update the window text on the runtime
  so that text is in the code too any way to separate that code ? . I am
  sorry i am new to converting files for language .
 
  Any reply will be the thankful
 
  Thank you
 
  Ahmed
 
 
  ___
  PyQt mailing listPyQt@riverbankcomputing.com
  http://www.riverbankcomputing.com/mailman/listinfo/pyqt
 This is an example of a file .pro

 ---
 SOURCES = main.py\
 ui_foo.py\
 ui_dialog.py

 TRANSLATIONS= myApp_fr.ts

 CODECFORTR  = UTF-8

 CODECFORSRC = UTF-8
 ---

 myApp_fr.ts is french in this example, you'll need to create one .ts
 file for each langage.

 --
 Vincent V.V.
 Oqapy https://launchpad.net/oqapy . Qarte
 https://launchpad.net/qarte . PaQager https://launchpad.net/paqager
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Pyqt Translation

2013-01-31 Thread uahmed
Hi

Thanks for the reply . I will do same i guess . Can you tell me one thing
how you are making qt project with .py files?

I installed -qt-creator-py and python-pyside too , but whenever i create a
project it gives me main.cpp file and i didnt find any option in start to
choose python . Sorry i am new to QtCreator .

Thanks

Ahmed

On Thu, Jan 31, 2013 at 3:45 PM, Vincent Vande Vyvre 
vincent.vandevy...@swing.be wrote:

 Le 31/01/13 13:23, uahmed a écrit :
  Vincent , Should i make a Qt project and include all the python files
  to it ? In those python files i use Pyqt for updating windows text etc  .
 
  On Thu, Jan 31, 2013 at 3:12 PM, uahmed gleam.uah...@gmail.com
  mailto:gleam.uah...@gmail.com wrote:
 
  Hi
 
  Thanks for the reply . Is there any way to do tranlsation with
  '.ui'  file format or with .py file . I am not using QtCreator i
  did whole code from scratch and i make the other windows in
  QtDesigner which generate the '.ui' file and than i use them in my
  code .
 
 I've never used QtCreator.

 I convert my .ui files to .py, I update the file .pro if necessary and I
 run:

 pylupdate4 -noobsolete oqapy.pro

 (oqapy is my app) after that, I open the .ts file with QLinguist.

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Pyqt Translation

2013-01-31 Thread Detlev Offenbach
Hello,

why not use the eric IDE for development? It has built in interfaces to the Qt 
tools and would do the .pro generation in the background for you. It is really 
simple to do translation update for just one language, several or even all, 
add new languages, ...

Regards,
Detlev

On Thursday 31 January 2013, 18:59:35 uahmed wrote:

Hi 

Thanks for the reply . I will do same i guess . Can you tell me one thing how 
you are making qt project with .py files? 

I installed -qt-creator-py and python-pyside too , but whenever i create a 
project it gives me main.cpp file and i didnt find any option in start to 
choose 
python . Sorry i am new to QtCreator . 

Thanks

Ahmed


On Thu, Jan 31, 2013 at 3:45 PM, Vincent Vande Vyvre 
vincent.vandevy...@swing.be wrote:

Le 31/01/13 13:23, uahmed a écrit :

 Vincent , Should i make a Qt project and include all the python files
 to it ? In those python files i use Pyqt for updating windows text etc  .

 On Thu, Jan 31, 2013 at 3:12 PM, uahmed gleam.uah...@gmail.com

 mailto:gleam.uah...@gmail.com wrote:

 Hi

 Thanks for the reply . Is there any way to do tranlsation with
 '.ui'  file format or with .py file . I am not using QtCreator i
 did whole code from scratch and i make the other windows in
 QtDesigner which generate the '.ui' file and than i use them in my
 code .


I've never used QtCreator.

I convert my .ui files to .py, I update the file .pro if necessary and I
run:

pylupdate4 -noobsolete oqapy.pro

(oqapy is my app) after that, I open the .ts file with QLinguist.





-- 
Detlev Offenbach
det...@die-offenbachs.de___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt