summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Cuvelier <cuvelier.thibaut@gmail.com>2023-02-10 05:16:10 +0100
committerPaul Wicking <paul.wicking@qt.io>2023-04-26 14:43:45 +0200
commit90147027312b88cae1fd0f432ad6c8fd73426ce6 (patch)
treec8428657b82949a0c7be004b38f06f05f0e610b7
parentc6665d7ebf68cb3a1ed15527309eb70ffe927536 (diff)
downloadqttools-90147027312b88cae1fd0f432ad6c8fd73426ce6.tar.gz
QDoc: implement ITS attributes for parts that shouldn't be translated
This patch is a port of b7849d42efff91a4d247a4028d6c129f3742743a for DocBook. Pick-to: 6.5 Change-Id: I0220691da3e0827bc89e05912bcbb723d8490cf5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
-rw-r--r--src/qdoc/qdoc/docbookgenerator.cpp59
-rw-r--r--src/qdoc/qdoc/docbookgenerator.h1
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/cpptypes.xml2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoc-test-qmlmodule.xml4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-linking.xml2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput.xml2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocmanuallikefileoutput.xml4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-int.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml10
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml10
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml18
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-oldtype.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml14
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-test-nover-typenoversion.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml6
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml10
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/test-nover-qmlmodule.xml4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml62
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml16
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml4
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf1
27 files changed, 166 insertions, 115 deletions
diff --git a/src/qdoc/qdoc/docbookgenerator.cpp b/src/qdoc/qdoc/docbookgenerator.cpp
index 2b96ed2a6..115a9a6e1 100644
--- a/src/qdoc/qdoc/docbookgenerator.cpp
+++ b/src/qdoc/qdoc/docbookgenerator.cpp
@@ -38,6 +38,7 @@ using namespace Qt::StringLiterals;
static const char dbNamespace[] = "http://docbook.org/ns/docbook";
static const char xlinkNamespace[] = "http://www.w3.org/1999/xlink";
+static const char itsNamespace[] = "http://www.w3.org/2005/11/its";
DocBookGenerator::DocBookGenerator(FileResolver& file_resolver) : XmlGenerator(file_resolver) {}
@@ -158,6 +159,7 @@ void DocBookGenerator::initializeGenerator()
m_buildVersion = m_config->get(CONFIG_BUILDVERSION).asString();
m_useDocBook52 = m_config->get(CONFIG_DOCBOOKEXTENSIONS).asBool() ||
m_config->get(format() + Config::dot + "usedocbookextensions").asBool();
+ m_useITS = m_config->get(format() + Config::dot + "its").asBool();
}
QString DocBookGenerator::format()
@@ -324,6 +326,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
case Atom::Qml:
m_writer->writeStartElement(dbNamespace, "programlisting");
m_writer->writeAttribute("language", "qml");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
m_writer->writeCharacters(removeCodeMarkers(atom->string()));
m_writer->writeEndElement(); // programlisting
newLine();
@@ -331,6 +335,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
case Atom::Code:
m_writer->writeStartElement(dbNamespace, "programlisting");
m_writer->writeAttribute("language", "cpp");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
m_writer->writeCharacters(removeCodeMarkers(atom->string()));
m_writer->writeEndElement(); // programlisting
newLine();
@@ -339,6 +345,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
m_writer->writeStartElement(dbNamespace, "programlisting");
m_writer->writeAttribute("language", "cpp");
m_writer->writeAttribute("role", "bad");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
m_writer->writeCharacters(removeCodeMarkers(atom->string()));
m_writer->writeEndElement(); // programlisting
newLine();
@@ -381,6 +389,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
} else if (atom->string() == ATOM_FORMATTING_TELETYPE
|| atom->string() == ATOM_FORMATTING_PARAMETER) {
m_writer->writeStartElement(dbNamespace, "code");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
if (atom->string() == ATOM_FORMATTING_PARAMETER)
m_writer->writeAttribute("role", "parameter");
@@ -403,6 +413,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
}
} else if (atom->string() == ATOM_FORMATTING_UICONTROL) {
m_writer->writeStartElement(dbNamespace, "guilabel");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
} else {
relative->location().warning(QStringLiteral("Unsupported formatting: %1").arg(atom->string()));
}
@@ -796,6 +808,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
m_writer->writeStartElement(dbNamespace, "td");
newLine();
m_writer->writeStartElement(dbNamespace, "para");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
generateEnumValue(pair.first, relative);
m_writer->writeEndElement(); // para
newLine();
@@ -809,8 +823,13 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
m_writer->writeStartElement(dbNamespace, "td");
if (itemValue.isEmpty())
m_writer->writeCharacters("?");
- else
- m_writer->writeTextElement(dbNamespace, "code", itemValue);
+ else {
+ m_writer->writeStartElement(dbNamespace, "code");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
+ m_writer->writeCharacters(itemValue);
+ m_writer->writeEndElement(); // code
+ }
m_writer->writeEndElement(); // td
newLine();
}
@@ -1766,6 +1785,8 @@ qsizetype DocBookGenerator::generateAtom(const Atom *atom, const Node *relative)
case Atom::UnknownCommand:
m_writer->writeStartElement(dbNamespace, "emphasis");
m_writer->writeAttribute("role", "bold");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
m_writer->writeCharacters("<Unknown command>");
m_writer->writeStartElement(dbNamespace, "code");
m_writer->writeCharacters(atom->string());
@@ -2342,11 +2363,19 @@ void DocBookGenerator::generateHeader(const QString &title, const QString &subTi
// Output the DocBook header.
m_writer->writeStartElement(dbNamespace, "info");
newLine();
- m_writer->writeTextElement(dbNamespace, "title", title);
+ m_writer->writeStartElement(dbNamespace, "title");
+ if (node->genus() & Node::API && m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
+ m_writer->writeCharacters(title);
+ m_writer->writeEndElement(); // title
newLine();
if (!subTitle.isEmpty()) {
- m_writer->writeTextElement(dbNamespace, "subtitle", subTitle);
+ m_writer->writeStartElement(dbNamespace, "subtitle");
+ if (node->genus() & Node::API && m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
+ m_writer->writeCharacters(subTitle);
+ m_writer->writeEndElement(); // subtitle
newLine();
}
@@ -2849,6 +2878,8 @@ void DocBookGenerator::generateRequisites(const Aggregate *aggregate)
.replace(xmlAttr, " xlink:");
m_writer->writeStartElement(dbNamespace, "variablelist");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
newLine();
m_writer->device()->write(cleanOutput.toUtf8());
@@ -2888,6 +2919,8 @@ void DocBookGenerator::generateQmlRequisites(const QmlTypeNode *qcn)
// Start writing the elements as a list.
m_writer->writeStartElement(dbNamespace, "variablelist");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
newLine();
if (generate_import_statement) {
@@ -3506,6 +3539,8 @@ QXmlStreamWriter *DocBookGenerator::startGenericDocument(const Node *node, const
newLine();
m_writer->writeNamespace(dbNamespace, "db");
m_writer->writeNamespace(xlinkNamespace, "xlink");
+ if (m_useITS)
+ m_writer->writeNamespace(itsNamespace, "its");
m_writer->writeStartElement(dbNamespace, "article");
m_writer->writeAttribute("version", "5.2");
if (!m_naturalLanguage.isEmpty())
@@ -3666,7 +3701,7 @@ void DocBookGenerator::generateDocBookSynopsis(const Node *node)
// From Generator::generateStatus, HtmlGenerator::generateRequisites,
// Generator::generateThreadSafeness, QDocIndexFiles::generateIndexSection.
- // This function is the only place where DocBook extensions are used.
+ // This function is the major place where DocBook extensions are used.
if (!m_useDocBook52)
return;
@@ -4635,6 +4670,8 @@ void DocBookGenerator::generateDetailedMember(const Node *node, const PageNode *
m_writer->writeAttribute("renderas", "sect2");
writeXmlId(sharedNode);
}
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
generateSynopsis(sharedNode, relative, Section::Details);
@@ -4650,6 +4687,8 @@ void DocBookGenerator::generateDetailedMember(const Node *node, const PageNode *
const EnumNode *etn;
if (node->isEnumType() && (etn = static_cast<const EnumNode *>(node))->flagsType()) {
startSectionBegin(node);
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
generateSynopsis(etn, relative, Section::Details);
startSectionEnd();
@@ -4660,6 +4699,8 @@ void DocBookGenerator::generateDetailedMember(const Node *node, const PageNode *
newLine();
} else {
startSectionBegin(node);
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
generateSynopsis(node, relative, Section::Details);
startSectionEnd();
}
@@ -4772,6 +4813,8 @@ void DocBookGenerator::generateSectionList(const Section &section, const Node *r
bool isInvokable = false;
m_writer->writeStartElement(dbNamespace, "itemizedlist");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
newLine();
NodeVector::ConstIterator m = members.constBegin();
@@ -4815,6 +4858,8 @@ void DocBookGenerator::generateSectionList(const Section &section, const Node *r
if (!useObsoleteMembers && section.style() == Section::Summary
&& !section.inheritedMembers().isEmpty()) {
m_writer->writeStartElement(dbNamespace, "itemizedlist");
+ if (m_useITS)
+ m_writer->writeAttribute(itsNamespace, "translate", "no");
newLine();
generateSectionInheritedList(section, relative);
@@ -4877,6 +4922,10 @@ void DocBookGenerator::generateQmlTypePage(QmlTypeNode *qcn)
title.append(" QML Value Type");
else
title.append(" QML Type");
+ // TODO: for ITS attribute, only apply translate="no" on qcn->fullTitle(),
+ // not its suffix (which should be translated). generateHeader doesn't
+ // allow this kind of input, the title isn't supposed to be structured.
+ // Ideally, do the same in HTML.
generateHeader(title, qcn->subtitle(), qcn);
generateQmlRequisites(qcn);
diff --git a/src/qdoc/qdoc/docbookgenerator.h b/src/qdoc/qdoc/docbookgenerator.h
index be80f38c2..e00050dde 100644
--- a/src/qdoc/qdoc/docbookgenerator.h
+++ b/src/qdoc/qdoc/docbookgenerator.h
@@ -162,6 +162,7 @@ private:
QString m_buildVersion {};
QXmlStreamWriter *m_writer { nullptr };
bool m_useDocBook52 { false }; // Enable tags from DocBook 5.2. Also called "extensions".
+ bool m_useITS { false }; // Enable ITS attributes for parts that should not be translated.
Config *m_config { nullptr };
};
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/cpptypes.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/cpptypes.xml
index 9dcabf364..b05c07240 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/cpptypes.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/cpptypes.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
<db:title>Test C++ Types</db:title>
<db:productname>TestCPP</db:productname>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoc-test-qmlmodule.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoc-test-qmlmodule.xml
index cbdeb19b1..76635ac14 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoc-test-qmlmodule.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoc-test-qmlmodule.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>QDoc.Test QML Module</db:title>
+<db:title its:translate="no">QDoc.Test QML Module</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
index 878fb3211..95937d103 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
<db:title>Exhaustive testing of QDoc commands</db:title>
<db:productname>OutputFromQDocFiles</db:productname>
@@ -17,11 +17,11 @@
<db:title>This is a section3</db:title>
<db:section xml:id="this-is-a-section4">
<db:title>This is a section4</db:title>
-<db:programlisting language="cpp" role="bad">This is bad code
+<db:programlisting language="cpp" role="bad" its:translate="no">This is bad code
</db:programlisting>
<db:para>This text should have a line break riiiiight noooow.</db:para>
<db:para><db:emphasis role="bold">All your text belong to bold</db:emphasis> ...And this is an examble of only <db:emphasis role="bold">bold</db:emphasis> being, well, bold.</db:para>
-<db:programlisting language="cpp"> ...
+<db:programlisting language="cpp" its:translate="no"> ...
</db:programlisting>
<db:title>This a caption</db:title>
<db:para>Lorem legal ipsum</db:para>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-linking.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-linking.xml
index 51b7e62b3..526279c9a 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-linking.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-linking.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
<db:title>Testing QDoc's link command</db:title>
<db:productname>OutputFromQDocFiles</db:productname>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput.xml
index 72905681d..a4a1d7c48 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
<db:title>Testing QDoc output from .qdoc files</db:title>
<db:productname>OutputFromQDocFiles</db:productname>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocmanuallikefileoutput.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocmanuallikefileoutput.xml
index 8372f150c..5281cb7cd 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocmanuallikefileoutput.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocmanuallikefileoutput.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
<db:title>Document Navigation</db:title>
<db:productname>OutputFromQDocFiles</db:productname>
@@ -39,7 +39,7 @@
</table>
]]></db:programlisting>
</db:blockquote>
-<db:programlisting language="cpp">&amp;lt;head&amp;gt;
+<db:programlisting language="cpp" its:translate="no">&amp;lt;head&amp;gt;
...
&amp;lt;link rel=&amp;quot;start&amp;quot; href=&amp;quot;basicqt.html&amp;quot; /&amp;gt;
...
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-int.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-int.xml
index c7ce09e55..f5e99f6ab 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-int.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-int.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>int QML Value Type</db:title>
+<db:title its:translate="no">int QML Value Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml
index 1691fbadf..b1f0eb9c7 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-abstractparent.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>AbstractParent QML Type</db:title>
+<db:title its:translate="no">AbstractParent QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
@@ -47,7 +47,7 @@
<db:title>Method Documentation</db:title>
<db:section xml:id="name-method">
<db:title>void name(Child <db:emphasis>child</db:emphasis>, <db:emphasis>name</db:emphasis>)</db:title>
-<db:para>Name a <db:code role="parameter">child</db:code> using <db:code role="parameter">name</db:code>.</db:para>
+<db:para>Name a <db:code its:translate="no" role="parameter">child</db:code> using <db:code its:translate="no" role="parameter">name</db:code>.</db:para>
</db:section>
<db:section xml:id="name-method-1">
<db:title>void name()</db:title>
@@ -55,7 +55,7 @@
</db:section>
<db:section xml:id="rear-method">
<db:title>void rear(Child <db:emphasis>child</db:emphasis>, var <db:emphasis>method</db:emphasis> = Strict)</db:title>
-<db:para>Do some abstract parenting on <db:code role="parameter">child</db:code> using a specific <db:code role="parameter">method</db:code>.</db:para>
+<db:para>Do some abstract parenting on <db:code its:translate="no" role="parameter">child</db:code> using a specific <db:code its:translate="no" role="parameter">method</db:code>.</db:para>
</db:section>
</db:section>
</db:article>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml
index e3a347678..82b98d215 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-child.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>Child QML Type</db:title>
+<db:title its:translate="no">Child QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
@@ -47,7 +47,7 @@
<db:title>Method Documentation</db:title>
<db:section xml:id="name-method">
<db:title>void name(Child <db:emphasis>child</db:emphasis>, <db:emphasis>name</db:emphasis>)</db:title>
-<db:para>Name a <db:code role="parameter">child</db:code> of this child using <db:code role="parameter">name</db:code>.</db:para>
+<db:para>Name a <db:code its:translate="no" role="parameter">child</db:code> of this child using <db:code its:translate="no" role="parameter">name</db:code>.</db:para>
</db:section>
<db:section xml:id="name-method-1">
<db:title>void name()</db:title>
@@ -55,7 +55,7 @@
</db:section>
<db:section xml:id="rear-method">
<db:title>void rear(Child <db:emphasis>child</db:emphasis>, var <db:emphasis>method</db:emphasis> = Strict)</db:title>
-<db:para>Do some abstract parenting on <db:code role="parameter">child</db:code> using a specific <db:code role="parameter">method</db:code>.</db:para>
+<db:para>Do some abstract parenting on <db:code its:translate="no" role="parameter">child</db:code> using a specific <db:code its:translate="no" role="parameter">method</db:code>.</db:para>
</db:section>
</db:section>
</db:article>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml
index 5091e0e27..eb6a36f65 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-doctest.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>DocTest QML Type</db:title>
+<db:title its:translate="no">DocTest QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in QDoc.Test 0.9.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
@@ -47,7 +47,7 @@
<db:section xml:id="name-prop">
<db:title>[required] name : string</db:title>
<db:para>Name of the test.</db:para>
-<db:programlisting language="qml">DocTest {
+<db:programlisting language="qml" its:translate="no">DocTest {
name: &amp;quot;test&amp;quot;
// ...
}
@@ -64,14 +64,14 @@
</db:section>
<db:section xml:id="foo-signal">
<db:title>foo(var <db:emphasis>bar</db:emphasis>)</db:title>
-<db:para>Signal with parameter <db:code role="parameter">bar</db:code>.</db:para>
+<db:para>Signal with parameter <db:code its:translate="no" role="parameter">bar</db:code>.</db:para>
<db:note>
<db:para>The corresponding handler is <db:code>onFoo</db:code>.</db:para>
</db:note>
</db:section>
<db:section xml:id="itsHappening-signal">
<db:title>itsHappening(bool <db:emphasis>really</db:emphasis>)</db:title>
-<db:para>Signals that something is <db:code role="parameter">really</db:code> happening.</db:para>
+<db:para>Signals that something is <db:code its:translate="no" role="parameter">really</db:code> happening.</db:para>
<db:note>
<db:para>The corresponding handler is <db:code>onItsHappening</db:code>.</db:para>
</db:note>
@@ -81,7 +81,7 @@
<db:title>Method Documentation</db:title>
<db:section xml:id="fail-method">
<db:title>[since QDoc.Test 1.0] fail(<db:emphasis>message</db:emphasis> = &quot;oops&quot;)</db:title>
-<db:para>Fails the current test case, with the optional <db:code role="parameter">message</db:code>.</db:para>
+<db:para>Fails the current test case, with the optional <db:code its:translate="no" role="parameter">message</db:code>.</db:para>
<db:para>This method was introduced in QDoc.Test 1.0.</db:para>
</db:section>
<db:section xml:id="fail_hard-method">
@@ -89,10 +89,10 @@
<db:para>Fails the current test case, hard.</db:para>
<db:itemizedlist>
<db:listitem>
-<db:para>Prints out <db:code role="parameter">msg</db:code>.</db:para>
+<db:para>Prints out <db:code its:translate="no" role="parameter">msg</db:code>.</db:para>
</db:listitem>
<db:listitem>
-<db:para>Accepts a random <db:code role="parameter">option</db:code>.</db:para>
+<db:para>Accepts a random <db:code its:translate="no" role="parameter">option</db:code>.</db:para>
</db:listitem>
</db:itemizedlist>
</db:section>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-oldtype.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-oldtype.xml
index ce2999582..5b0754cb0 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-oldtype.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-oldtype.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>OldType QML Type</db:title>
+<db:title its:translate="no">OldType QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -10,7 +10,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml
index 4f846dfac..e94650c2d 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-type.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>Type QML Type</db:title>
+<db:title its:translate="no">Type QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
@@ -73,7 +73,7 @@
</db:thead>
<db:tr>
<db:td>
-<db:para>Type.NoType</db:para>
+<db:para its:translate="no">Type.NoType</db:para>
</db:td>
<db:td>
<db:para>Nothing</db:para>
@@ -81,7 +81,7 @@
</db:tr>
<db:tr>
<db:td>
-<db:para>Type.SomeType</db:para>
+<db:para its:translate="no">Type.SomeType</db:para>
</db:td>
<db:td>
<db:para>Something</db:para>
@@ -94,7 +94,7 @@
<db:title>Signal Documentation</db:title>
<db:section xml:id="completed-signal">
<db:title>completed(int <db:emphasis>status</db:emphasis>)</db:title>
-<db:para>This signal is emitted when the operation completed with <db:code role="parameter">status</db:code>.</db:para>
+<db:para>This signal is emitted when the operation completed with <db:code its:translate="no" role="parameter">status</db:code>.</db:para>
<db:note>
<db:para>The corresponding handler is <db:code>onCompleted</db:code>.</db:para>
</db:note>
@@ -125,7 +125,7 @@
</db:section>
<db:section xml:id="copy-method">
<db:title>Type copy(<db:emphasis>a</db:emphasis>)</db:title>
-<db:para>Returns another Type based on <db:code role="parameter">a</db:code>.</db:para>
+<db:para>Returns another Type based on <db:code its:translate="no" role="parameter">a</db:code>.</db:para>
</db:section>
</db:section>
<db:section xml:id="obsolete">
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml
index 492e1b64e..92a9b6d6f 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-qdoc-test-yetanotherchild.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>YetAnotherChild QML Type</db:title>
+<db:title its:translate="no">YetAnotherChild QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-test-nover-typenoversion.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-test-nover-typenoversion.xml
index 87576add4..4e96ad30d 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-test-nover-typenoversion.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-test-nover-typenoversion.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>TypeNoVersion QML Type</db:title>
+<db:title its:translate="no">TypeNoVersion QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This type was introduced in Qt 1.1.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml
index ac48b6471..67ef7eeb4 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-progressbar.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>ProgressBar QML Type</db:title>
+<db:title its:translate="no">ProgressBar QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
<db:para>A component that shows the progress of an event.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml
index 6c9d4a0f6..9eea38071 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-switch.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>Switch QML Type</db:title>
+<db:title its:translate="no">Switch QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
<db:para>A component that can be turned on or off.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml
index e051ba196..5d81ac092 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qml-uicomponents-tabwidget.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>TabWidget QML Type</db:title>
+<db:title its:translate="no">TabWidget QML Type</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
<db:para>A widget that places its children as tabs.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Import Statement</db:term>
<db:listitem>
@@ -24,7 +24,7 @@
<db:section xml:id="adding-tabs">
<db:title>Adding Tabs</db:title>
<db:para>To add a tab, declare the tab as a child of the <db:link xlink:href="qml-uicomponents-tabwidget.xml">TabWidget</db:link>.</db:para>
-<db:programlisting language="cpp">TabWidget {
+<db:programlisting language="cpp" its:translate="no">TabWidget {
id: tabwidget
Rectangle {
@@ -52,7 +52,7 @@
<db:title>[read-only] sampleReadOnlyProperty : int</db:title>
<db:para>A sample <db:code>read-only</db:code> property. A contrived property to demonstrate QDoc's ability to detect read-only properties.</db:para>
<db:para>The signature is:</db:para>
-<db:programlisting language="cpp">readonly property int sampleReadOnlyProperty: 0
+<db:programlisting language="cpp" its:translate="no">readonly property int sampleReadOnlyProperty: 0
</db:programlisting>
<db:para>Note that the property must be initialized to a value.</db:para>
</db:section>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml
index add2bcae1..a5ffd1cd0 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
<db:title>QML Documentation Example</db:title>
<db:productname>Test</db:productname>
@@ -21,7 +21,7 @@
<db:title>Properties, Signals, Handlers, and Methods</db:title>
<db:para>The types have their properties, signals, handlers, and methods defined in their respective QML files. QDoc associates the properties and methods to the types, therefore, you only need to place the documentation above the property, method, or signal.</db:para>
<db:para>To document the type of a <db:emphasis>property alias</db:emphasis>, you must use the \qmlproperty command to specify the data type.</db:para>
-<db:programlisting language="cpp">\qmlproperty int anAliasedProperty
+<db:programlisting language="cpp" its:translate="no">\qmlproperty int anAliasedProperty
An aliased property of type int.
</db:programlisting>
<db:section xml:id="internal-documentation">
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-nover-qmlmodule.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-nover-qmlmodule.xml
index 1cd079200..40af63eeb 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-nover-qmlmodule.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-nover-qmlmodule.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>Versionless QML Module</db:title>
+<db:title its:translate="no">Versionless QML Module</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml
index 0026854b2..993435fd6 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>QDoc Test C++ Classes</db:title>
+<db:title its:translate="no">QDoc Test C++ Classes</db:title>
<db:productname>TestCPP</db:productname>
<db:titleabbrev>TestCPP Reference Documentation</db:titleabbrev>
<db:abstract>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml
index 12b574d2a..61657e1bd 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>Test Class</db:title>
-<db:subtitle>TestQDoc::Test</db:subtitle>
+<db:title its:translate="no">Test Class</db:title>
+<db:subtitle its:translate="no">TestQDoc::Test</db:subtitle>
<db:productname>TestCPP</db:productname>
<db:titleabbrev>TestCPP Reference Documentation</db:titleabbrev>
<db:abstract>
@@ -10,7 +10,7 @@
<db:para>This class was introduced in Qt 2.0.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Header</db:term>
<db:listitem>
@@ -56,31 +56,31 @@
<db:section xml:id="member-type-documentation">
<db:title>Member Type Documentation</db:title>
<db:section xml:id="SomeType-typedef">
-<db:title>Test::SomeType</db:title>
+<db:title its:translate="no">Test::SomeType</db:title>
<db:para>A typedef.</db:para>
</db:section>
</db:section>
<db:section xml:id="member-function-documentation">
<db:title>Member Function Documentation</db:title>
<db:section xml:id="overload">
-<db:title>[protected] void Test::overload()</db:title>
-<db:bridgehead renderas="sect2" xml:id="overload-1">[protected, since Test 1.2] void Test::overload(bool <db:emphasis>b</db:emphasis>)</db:bridgehead>
-<db:para>Overloads that share a documentation comment, optionally taking a parameter <db:code role="parameter">b</db:code>.</db:para>
+<db:title its:translate="no">[protected] void Test::overload()</db:title>
+<db:bridgehead renderas="sect2" xml:id="overload-1" its:translate="no">[protected, since Test 1.2] void Test::overload(bool <db:emphasis>b</db:emphasis>)</db:bridgehead>
+<db:para>Overloads that share a documentation comment, optionally taking a parameter <db:code its:translate="no" role="parameter">b</db:code>.</db:para>
</db:section>
<db:section xml:id="Test">
-<db:title>[noexcept default] Test::Test()</db:title>
+<db:title its:translate="no">[noexcept default] Test::Test()</db:title>
<db:para>Default constructor.</db:para>
</db:section>
<db:section xml:id="funcPtr">
-<db:title>void (*)(bool) Test::funcPtr(bool <db:emphasis>b</db:emphasis>, const char *<db:emphasis>s</db:emphasis>)</db:title>
-<db:para>Returns a pointer to a function that takes a boolean. Uses <db:code role="parameter">b</db:code> and <db:code role="parameter">s</db:code>.</db:para>
+<db:title its:translate="no">void (*)(bool) Test::funcPtr(bool <db:emphasis>b</db:emphasis>, const char *<db:emphasis>s</db:emphasis>)</db:title>
+<db:para>Returns a pointer to a function that takes a boolean. Uses <db:code its:translate="no" role="parameter">b</db:code> and <db:code its:translate="no" role="parameter">s</db:code>.</db:para>
</db:section>
<db:section xml:id="inlineFunction">
-<db:title>void Test::inlineFunction()</db:title>
+<db:title its:translate="no">void Test::inlineFunction()</db:title>
<db:para>An inline function, documented using the \fn QDoc command.</db:para>
</db:section>
<db:section xml:id="methodWithEmDashInItsDocs">
-<db:title>void Test::methodWithEmDashInItsDocs()</db:title>
+<db:title its:translate="no">void Test::methodWithEmDashInItsDocs()</db:title>
<db:para>This method has em dashes in its documentation—as you'll find represented by <db:code>---</db:code> in the sources—here and there. The important bit to note is that when passed e.g. to the \c command, the three hyphens are processed as input to the command and not replaced by an em dash.</db:para>
<db:para>-----------------------------------------------------------------------</db:para>
<db:para>People can still add a bunch of dashes, though, without QDoc replacing them all with a series of em dashes.</db:para>
@@ -95,9 +95,9 @@
</db:section>
</db:section>
<db:section xml:id="methodWithEnDashInItsDocs">
-<db:title>void Test::methodWithEnDashInItsDocs()</db:title>
+<db:title its:translate="no">void Test::methodWithEnDashInItsDocs()</db:title>
<db:para>This method has en dashes in its documentation – as you'll find represented by <db:code>--</db:code> in the sources – here and there. The important bit to note is that when passed e.g. to the \c command, the two hyphens are processed as input to the command and not replaced by an en dash. This also applies to code blocks, where otherwise, the decrement operator would get completely borked:</db:para>
-<db:programlisting language="cpp">for (int i = 42; i &amp;gt; 0; --i)
+<db:programlisting language="cpp" its:translate="no">for (int i = 42; i &amp;gt; 0; --i)
// Do something cool during countdown.
</db:programlisting>
<db:para>...as it would be silly if this would output –i instead of <db:code>--i</db:code>.</db:para>
@@ -114,34 +114,34 @@
</db:section>
</db:section>
<db:section xml:id="someFunction">
-<db:title>int Test::someFunction(<db:emphasis>int</db:emphasis>, int <db:emphasis>v</db:emphasis> = 0)</db:title>
-<db:para>Function that takes a parameter <db:code role="parameter">v</db:code>. Also returns the value of <db:code role="parameter">v</db:code>.</db:para>
+<db:title its:translate="no">int Test::someFunction(<db:emphasis>int</db:emphasis>, int <db:emphasis>v</db:emphasis> = 0)</db:title>
+<db:para>Function that takes a parameter <db:code its:translate="no" role="parameter">v</db:code>. Also returns the value of <db:code its:translate="no" role="parameter">v</db:code>.</db:para>
</db:section>
<db:section xml:id="someFunctionDefaultArg">
-<db:title>void Test::someFunctionDefaultArg(int <db:emphasis>i</db:emphasis>, bool <db:emphasis>b</db:emphasis> = false)</db:title>
-<db:para>Function that takes a parameter <db:code role="parameter">i</db:code> and <db:code role="parameter">b</db:code>.</db:para>
+<db:title its:translate="no">void Test::someFunctionDefaultArg(int <db:emphasis>i</db:emphasis>, bool <db:emphasis>b</db:emphasis> = false)</db:title>
+<db:para>Function that takes a parameter <db:code its:translate="no" role="parameter">i</db:code> and <db:code its:translate="no" role="parameter">b</db:code>.</db:para>
</db:section>
<db:section xml:id="virtualFun">
-<db:title>[virtual] void Test::virtualFun()</db:title>
+<db:title its:translate="no">[virtual] void Test::virtualFun()</db:title>
<db:para>Function that must be reimplemented.</db:para>
</db:section>
<db:section xml:id="operator-eq">
-<db:title>[noexcept default] TestQDoc::Test &amp;Test::operator=(TestQDoc::Test &amp;&amp;<db:emphasis>other</db:emphasis>)</db:title>
-<db:para>Move-assigns <db:code role="parameter">other</db:code>.</db:para>
+<db:title its:translate="no">[noexcept default] TestQDoc::Test &amp;Test::operator=(TestQDoc::Test &amp;&amp;<db:emphasis>other</db:emphasis>)</db:title>
+<db:para>Move-assigns <db:code its:translate="no" role="parameter">other</db:code>.</db:para>
</db:section>
</db:section>
<db:section xml:id="related-non-members">
<db:title>Related Non-Members</db:title>
<db:section xml:id="operator-eq-eq">
-<db:title>bool operator==(const TestQDoc::Test &amp;<db:emphasis>lhs</db:emphasis>, const TestQDoc::Test &amp;<db:emphasis>rhs</db:emphasis>)</db:title>
-<db:para>Returns true if <db:code role="parameter">lhs</db:code> and <db:code role="parameter">rhs</db:code> are equal.</db:para>
+<db:title its:translate="no">bool operator==(const TestQDoc::Test &amp;<db:emphasis>lhs</db:emphasis>, const TestQDoc::Test &amp;<db:emphasis>rhs</db:emphasis>)</db:title>
+<db:para>Returns true if <db:code its:translate="no" role="parameter">lhs</db:code> and <db:code its:translate="no" role="parameter">rhs</db:code> are equal.</db:para>
</db:section>
</db:section>
<db:section xml:id="macro-documentation">
<db:title>Macro Documentation</db:title>
<db:section xml:id="QDOCTEST_MACRO2">
-<db:title>[since Test 1.1] QDOCTEST_MACRO2(int &amp;<db:emphasis>x</db:emphasis>)</db:title>
-<db:para>A macro with argument <db:code role="parameter">x</db:code>.</db:para>
+<db:title its:translate="no">[since Test 1.1] QDOCTEST_MACRO2(int &amp;<db:emphasis>x</db:emphasis>)</db:title>
+<db:para>A macro with argument <db:code its:translate="no" role="parameter">x</db:code>.</db:para>
<db:para>This macro was introduced in Test 1.1.</db:para>
</db:section>
</db:section>
@@ -151,22 +151,22 @@
<db:section xml:id="obsolete-member-function-documentation">
<db:title>Obsolete Member Function Documentation</db:title>
<db:section xml:id="operator-2b-2b">
-<db:title>TestQDoc::Test &amp;Test::operator++()</db:title>
-<db:bridgehead renderas="sect2" xml:id="operator--">TestQDoc::Test &amp;Test::operator--()</db:bridgehead>
+<db:title its:translate="no">TestQDoc::Test &amp;Test::operator++()</db:title>
+<db:bridgehead renderas="sect2" xml:id="operator--" its:translate="no">TestQDoc::Test &amp;Test::operator--()</db:bridgehead>
<db:para>This function is deprecated. We strongly advise against using it in new code.</db:para>
</db:section>
<db:section xml:id="anotherObsoleteMember">
-<db:title>void Test::anotherObsoleteMember()</db:title>
+<db:title its:translate="no">void Test::anotherObsoleteMember()</db:title>
<db:para>This function is deprecated. We strongly advise against using it in new code.</db:para>
<db:para>Use <db:link xlink:href="testqdoc-test.xml#obsoleteMember">obsoleteMember</db:link>() instead.</db:para>
</db:section>
<db:section xml:id="deprecatedMember">
-<db:title>void Test::deprecatedMember()</db:title>
+<db:title its:translate="no">void Test::deprecatedMember()</db:title>
<db:para>This function is deprecated since 6.0. We strongly advise against using it in new code.</db:para>
<db:para>Use <db:link xlink:href="testqdoc-test.xml#someFunction">someFunction</db:link>() instead.</db:para>
</db:section>
<db:section xml:id="obsoleteMember">
-<db:title>void Test::obsoleteMember()</db:title>
+<db:title its:translate="no">void Test::obsoleteMember()</db:title>
<db:para>This function is deprecated. We strongly advise against using it in new code.</db:para>
<db:para>Use <db:link xlink:href="testqdoc-test.xml#someFunction">someFunction</db:link>() instead.</db:para>
</db:section>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml
index e28f7f70d..d7c1bc55c 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-testderived.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>TestDerived Class</db:title>
-<db:subtitle>TestQDoc::TestDerived</db:subtitle>
+<db:title its:translate="no">TestDerived Class</db:title>
+<db:subtitle its:translate="no">TestQDoc::TestDerived</db:subtitle>
<db:productname>TestCPP</db:productname>
<db:titleabbrev>TestCPP Reference Documentation</db:titleabbrev>
<db:abstract>
@@ -10,7 +10,7 @@
<db:para>This class was introduced in Qt 2.0.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Header</db:term>
<db:listitem>
@@ -49,18 +49,18 @@
<db:section xml:id="member-type-documentation">
<db:title>Member Type Documentation</db:title>
<db:section xml:id="DerivedType-typedef">
-<db:title>[alias] TestDerived::DerivedType</db:title>
+<db:title its:translate="no">[alias] TestDerived::DerivedType</db:title>
<db:para>An aliased typedef.</db:para>
</db:section>
<db:section xml:id="NotTypedef-typedef">
-<db:title>[alias] TestDerived::NotTypedef</db:title>
+<db:title its:translate="no">[alias] TestDerived::NotTypedef</db:title>
<db:para>I'm an alias, not a typedef.</db:para>
</db:section>
</db:section>
<db:section xml:id="member-function-documentation">
<db:title>Member Function Documentation</db:title>
<db:section xml:id="virtualFun">
-<db:title>[override virtual] void TestDerived::virtualFun()</db:title>
+<db:title its:translate="no">[override virtual] void TestDerived::virtualFun()</db:title>
<db:para>Reimplements: <db:link xlink:href="testqdoc-test.xml#virtualFun" role="function">Test::virtualFun()</db:link>.</db:para>
</db:section>
</db:section>
@@ -70,7 +70,7 @@
<db:section xml:id="obsolete-member-function-documentation">
<db:title>Obsolete Member Function Documentation</db:title>
<db:section xml:id="staticObsoleteMember">
-<db:title>[static] void TestDerived::staticObsoleteMember()</db:title>
+<db:title its:translate="no">[static] void TestDerived::staticObsoleteMember()</db:title>
<db:para>This function is deprecated. We strongly advise against using it in new code.</db:para>
<db:para>Static obsolete method.</db:para>
</db:section>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml
index a00553748..5dbe4d677 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>TestQDoc Namespace</db:title>
+<db:title its:translate="no">TestQDoc Namespace</db:title>
<db:productname>TestCPP</db:productname>
<db:titleabbrev>TestCPP Reference Documentation</db:titleabbrev>
<db:abstract>
@@ -9,7 +9,7 @@
<db:para>This namespace was introduced in Qt 2.0.</db:para>
</db:abstract>
</db:info>
-<db:variablelist>
+<db:variablelist its:translate="no">
<db:varlistentry>
<db:term>Header</db:term>
<db:listitem>
@@ -57,7 +57,7 @@
<db:section xml:id="macro-documentation">
<db:title>Macro Documentation</db:title>
<db:section xml:id="QDOCTEST_MACRO">
-<db:title>QDOCTEST_MACRO</db:title>
+<db:title its:translate="no">QDOCTEST_MACRO</db:title>
</db:section>
</db:section>
</db:article>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
index f00b3d3f7..80e5b0cdc 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:its="http://www.w3.org/2005/11/its" version="5.2" xml:lang="en">
<db:info>
-<db:title>UI Components</db:title>
+<db:title its:translate="no">UI Components</db:title>
<db:productname>Test</db:productname>
<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
<db:abstract>
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
index 9bd6c7bba..b22b190fe 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
@@ -1,6 +1,7 @@
outputformats = DocBook
DocBook.nosubdirs = true
DocBook.outputsubdir = docbook
+DocBook.its = true
# TODO: DocBook generator has trouble handling shared comment nodes
# allow two warnings related to these