Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Translation support for lightdm greeter

  • Loading branch information...
commit d4caba9f3a19c67501ffeee765800dcad0d49e35 1 parent 641803d
@amoskvin amoskvin authored
View
27 razorqt-lightdm-greeter/CMakeLists.txt
@@ -4,7 +4,7 @@ OPTION(ENABLE_LIGHTDM_GREETER "Build lightdm greeter" ON)
if (ENABLE_LIGHTDM_GREETER)
set(PROJECT razor-lightdm-greeter)
-project($PROJECT)
+project(${PROJECT})
# This HACK is here to allow greeter to be built as a standalone binary...
@@ -84,13 +84,16 @@ else()
)
QT4_WRAP_UI(UIS ${razor-lightdm-greeter_UIS})
- set ( razor-lightdm-greeter_RSCS )
- QT4_ADD_RESOURCES(RSCS ${razor-lightdm-greeter_RSCS})
+ set ( razor-lightdm-greeter_HDRS
+ mainwindow.h
+ loginform.h
+ )
set ( razor-lightdm-greeter_MOCS
mainwindow.h
loginform.h
)
+
QT4_WRAP_CPP(MOCS ${razor-lightdm-greeter_MOCS})
if(CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
@@ -99,8 +102,24 @@ else()
configure_file(test/lightdm.conf test/lightdm.conf)
endif()
+ # Translations **********************************
+ include(RazorTranslate)
+ razor_translate_ts( QM_FILES
+ SOURCES
+ ${razor-lightdm-greeter_HDRS}
+ ${razor-lightdm-greeter_SRCS}
+ ${razor-lightdm-greeter_UIS}
+ )
+ #************************************************
+
link_directories( ${LIGHTDM_QT_LIBRARY_DIRS} )
- add_executable ( razor-lightdm-greeter ${razor-lightdm-greeter_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS} )
+ add_executable ( razor-lightdm-greeter
+ ${razor-lightdm-greeter_SRCS}
+ ${razor-lightdm-greeter_HDRS}
+ ${razor-lightdm-greeter_UIS}
+ ${QM_FILES}
+ ${MOCS}
+ )
target_link_libraries ( razor-lightdm-greeter razorqt ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${LIGHTDM_QT_LIBRARIES} )
file(GLOB DESKTOP_FILES resources/*.desktop)
View
17 razorqt-lightdm-greeter/loginform.ui
@@ -22,7 +22,7 @@
</font>
</property>
<property name="windowTitle">
- <string>Dialog</string>
+ <string notr="true">Dialog</string>
</property>
<property name="windowOpacity">
<double>0.200000000000000</double>
@@ -51,7 +51,7 @@
<string notr="true"/>
</property>
<property name="text">
- <string>chr-pc</string>
+ <string notr="true">chr-pc</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
@@ -102,7 +102,7 @@
<enum>QLineEdit::Password</enum>
</property>
<property name="placeholderText">
- <string comment="hejsa" extracomment="Password her">password</string>
+ <string>password</string>
</property>
</widget>
<widget class="QPushButton" name="loginButton">
@@ -166,7 +166,7 @@
</rect>
</property>
<property name="text">
- <string>Razor Icon</string>
+ <string notr="true">Razor Icon</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -197,17 +197,17 @@
</property>
<item>
<property name="text">
- <string>Razor</string>
+ <string notr="true">Razor</string>
</property>
</item>
<item>
<property name="text">
- <string>Gnome</string>
+ <string notr="true">Gnome</string>
</property>
</item>
<item>
<property name="text">
- <string>Kde</string>
+ <string notr="true">Kde</string>
</property>
</item>
</widget>
@@ -220,9 +220,6 @@
<height>40</height>
</rect>
</property>
- <property name="text">
- <string/>
- </property>
</widget>
</widget>
<resources/>
View
2  razorqt-lightdm-greeter/main.cpp
@@ -26,11 +26,13 @@
#include <QtGui/QApplication>
#include <QtGui/QDesktopWidget>
#include "mainwindow.h"
+#include "razortranslate.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
+ TRANSLATE_APP;
MainWindow *focusWindow = 0;
for (int i = 0; i < QApplication::desktop()->screenCount(); ++i)
View
5 razorqt-power/src/CMakeLists.txt
@@ -70,11 +70,6 @@ set(APP_SHARE_DIR ${RAZOR_SHARE_DIR}/${PROJECT})
#************************************************
-if (RUNNER_MATH)
- add_definitions(-DMATH_ENABLED)
-endif (RUNNER_MATH)
-
-
qt4_wrap_cpp(MOC_SOURCES ${MOC_FILES})
qt4_wrap_ui(UI_HEADERS ${UI_FILES})
qt4_add_resources(QRC_SOURCES ${QRC_FILES})
Please sign in to comment.
Something went wrong with that request. Please try again.