diff options
author | David Planella <david.planella@ubuntu.com> | 2012-03-12 20:20:59 +0100 |
---|---|---|
committer | David Planella <david.planella@ubuntu.com> | 2012-03-12 20:20:59 +0100 |
commit | c4150e875a0531fe2ff5de4f18c53d68088cc211 (patch) | |
tree | eb289c9c7df41388ddf9a0397478a0dff51c63c3 /tests | |
parent | a4c6775b120d48278dc10234c326878ab42a035b (diff) | |
download | intltool-c4150e875a0531fe2ff5de4f18c53d68088cc211.tar.gz |
First shot at adding extraction support for Qt Designer .ui files
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cases/extract-qtdesigner.ui | 210 | ||||
-rw-r--r-- | tests/results/extract-qtdesigner.ui.h | 13 |
2 files changed, 223 insertions, 0 deletions
diff --git a/tests/cases/extract-qtdesigner.ui b/tests/cases/extract-qtdesigner.ui new file mode 100644 index 0000000..043e006 --- /dev/null +++ b/tests/cases/extract-qtdesigner.ui @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>main</class> + <widget class="QWidget" name="main"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>640</width> + <height>457</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="margin"> + <number>0</number> + </property> + <item> + <widget class="QTabWidget" name="tabWidget"> + <property name="currentIndex"> + <number>0</number> + </property> + <widget class="QWidget" name="tabWelcome"> + <attribute name="title"> + <string notr="true">Tab 1</string> + </attribute> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <property name="spacing"> + <number>0</number> + </property> + <property name="margin"> + <number>0</number> + </property> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="welcomeTop" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>100</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="spacing"> + <number>0</number> + </property> + <property name="margin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="welcomeTopText" native="true"> + <widget class="QLabel" name="welcomeLabel"> + <property name="geometry"> + <rect> + <x>30</x> + <y>20</y> + <width>330</width> + <height>51</height> + </rect> + </property> + <property name="font"> + <font> + <family>Ubuntu</family> + <pointsize>21</pointsize> + </font> + </property> + <property name="text"> + <string extracomment="This is a comment (extracomment)">Intltool extract text</string> + </property> + </widget> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="welcomeBottom" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <widget class="QTextEdit" name="welcomeTextBox"> + <property name="geometry"> + <rect> + <x>30</x> + <y>20</y> + <width>571</width> + <height>181</height> + </rect> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><title>HTML document extraction test</title><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Once upon a time, in a galaxy far, far away... </p></body></html></string> + </property> + </widget> + <widget class="QPushButton" name="friendlyTestsButton"> + <property name="geometry"> + <rect> + <x>30</x> + <y>210</y> + <width>571</width> + <height>31</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + </font> + </property> + <property name="text"> + <string comment="Button" extracomment="Refers to the action of accepting something">Ok</string> + </property> + </widget> + <widget class="QCheckBox" name="checkBox"> + <property name="geometry"> + <rect> + <x>30</x> + <y>280</y> + <width>321</width> + <height>20</height> + </rect> + </property> + <property name="font"> + <font> + <family>Ubuntu</family> + </font> + </property> + <property name="text"> + <string comment="WelcomeDialog">Don't show me this message in the future</string> + </property> + </widget> + <widget class="QCheckBox" name="checkBox_2"> + <property name="geometry"> + <rect> + <x>30</x> + <y>260</y> + <width>321</width> + <height>20</height> + </rect> + </property> + <property name="font"> + <font> + <family>Ubuntu</family> + </font> + </property> + <property name="text"> + <string extracomment="Authentication is required to perform this action">Require authentication</string> + </property> + </widget> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/tests/results/extract-qtdesigner.ui.h b/tests/results/extract-qtdesigner.ui.h new file mode 100644 index 0000000..6f5bed8 --- /dev/null +++ b/tests/results/extract-qtdesigner.ui.h @@ -0,0 +1,13 @@ +char *s = N_("Form"); +/* This is a comment (extracomment) */ +char *s = N_("Intltool extract text"); +char *s = N_("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" + "<html><head><meta name=\"qrichtext\" content=\"1\" /><title>HTML document extraction test</title><style type=\"text/css\">\n" + "p, li { white-space: pre-wrap; }\n" + "</style></head><body style=\" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;\">\n" + "<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Once upon a time, in a galaxy far, far away... </p></body></html>"); +/* Refers to the action of accepting something */ +char *s = C_("Button", "Ok"); +char *s = C_("WelcomeDialog", "Don't show me this message in the future"); +/* Authentication is required to perform this action */ +char *s = N_("Require authentication"); |