Permalink
Browse files

Translation support for policykit agent

  • Loading branch information...
1 parent 6002ff0 commit 3a95f46b968455c0feb06550af8f8ddfd0c67e3e @amoskvin amoskvin committed Oct 27, 2012
Showing with 25 additions and 5 deletions.
  1. +21 −3 razorqt-policykit/CMakeLists.txt
  2. +2 −0 razorqt-policykit/src/main.cpp
  3. +2 −2 razorqt-policykit/src/policykitagentgui.ui
View
24 razorqt-policykit/CMakeLists.txt
@@ -8,6 +8,8 @@ if (NOT POLKITQT-1_LIB_DIR AND NOT POLKITQT-1_INCLUDE_DIR)
message(WARNING "Qt bindings for policykit are not found. Razor policykit integration won't be built")
message(STATUS "Hint: package libpolkit-qt-1-devel on openSUSE")
else ()
+ project(razor-policykit-agent)
+
message(STATUS "PolkitQt-1: ${POLKITQT-1_VERSION_STRING}")
message(STATUS " libs: ${POLKITQT-1_CORE_LIBRARY} ${POLKITQT-1_AGENT_LIBRARY}")
message(STATUS " include: ${POLKITQT-1_INCLUDE_DIR}")
@@ -37,13 +39,29 @@ else ()
src/policykitagent.h
src/policykitagentgui.h
)
+
+ set(razor-policykit-agent_UI
+ src/policykitagentgui.ui
+ )
+
+ # Translations **********************************
+ include(RazorTranslate)
+ razor_translate_ts(razor-policykit-agent_QM_FILES
+ SOURCES
+ ${razor-policykit-agent_H}
+ ${razor-policykit-agent_SRCS}
+ ${razor-policykit-agent_UI}
+ )
+ #************************************************
QT4_WRAP_CPP(razor-policykit-agent_MOCS ${razor-policykit-agent_H})
- QT4_WRAP_UI(razor-policykit-agent_UI src/policykitagentgui.ui)
+ QT4_WRAP_UI(razor-policykit-agent_UI_CPP ${razor-policykit-agent_UI})
add_executable(razor-policykit-agent
- ${razor-policykit-agent_SRCS} ${razor-policykit-agent_MOCS}
- ${razor-policykit-agent_UI}
+ ${razor-policykit-agent_SRCS}
+ ${razor-policykit-agent_MOCS}
+ ${razor-policykit-agent_UI_CPP}
+ ${razor-policykit-agent_QM_FILES}
)
target_link_libraries(razor-policykit-agent
View
2 razorqt-policykit/src/main.cpp
@@ -31,6 +31,7 @@
#include <qtxdg/xdgicon.h>
#include <razorqt/razorsettings.h>
+#include "razortranslate.h"
#include "policykitagent.h"
@@ -39,6 +40,7 @@ int main(int argc, char *argv[])
g_type_init();
RazorApplication app(argc, argv);
+ TRANSLATE_APP;
app.setQuitOnLastWindowClosed(false);
View
4 razorqt-policykit/src/policykitagentgui.ui
@@ -29,7 +29,7 @@
</size>
</property>
<property name="text">
- <string>iconLabel</string>
+ <string notr="true">iconLabel</string>
</property>
</widget>
</item>
@@ -42,7 +42,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>messageLabel</string>
+ <string notr="true">messageLabel</string>
</property>
<property name="wordWrap">
<bool>true</bool>

0 comments on commit 3a95f46

Please sign in to comment.