Hello Everyone,
I am developing a Qt project which is using Qt linguist to support the translation. I have gone through the documentation and made my own .pro file for my project which is given below:
HEADERS = CameraWidgetForPieChart.h \
CameraDisplayManager.h \
CameraUI.h \
SOURCES = CameraWidgetForPieChart.cpp \
CameraUI.cpp \
CameraDisplayManager.cpp \
main.cpp
RESOURCES +=CameraUI.qrc
TRANSLATIONS += translations/CameraUI_ba.ts
# install
target.path = C:/Oxscan/CameraUI
sources.files = $$SOURCES $$HEADERS $$RESOURCES translations CameraUI.pro
sources.path = C:/Oxscan/CameraUI
INSTALLS+= target sources
Then I have generated my own translation file CameraUI_ba.ts which is given bellow
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
<context>
<name>CCameraWidgetForPieChart</name>
<message>
<source>Viewable</source>
<translation type="obsolete">দেখতে পারবেন</translation>
</message>
<message>
<source>Locked</source>
<translation type="obsolete">লকড</translation>
</message>
<message>
<source>Free</source>
<translation type="obsolete">মেমরি খালি আছে</translation>
</message>
</context>
<context>
<name>CameraUI</name>
<message>
<source>Hello</source>
<translation type="obsolete">আপনার ক্লিনিসিয়ান পিন প্রবেস করুন</translation>
</message>
</context>
</TS>
Then I use lupdate CameraUI.pro in the Qt command line and then lrelease to generate the .qm file. It is also generating the qm file.
Now let me tell what is going wrong, it could not find out the classes I have used in my translation file. And when I am calling lupdate to my .pro file it is generating "translation type="obsolete"" as you can see from my .ts file. I dont know what is the problem. It could not find out the classes I have passed to my .ts file. I think the path specified in my .pro file has some problem. My project is stored in the c drive and in the oxscan directory(c:\oxscan\cameraui\).
Any help will be appreciated.
Regards
Chandan
Bookmarks