Qt安装程序框架:翻译组件说明 [英] Qt Installer Framework: Translate component description
问题描述
我已经安装了Qt安装程序框架QtIFW2.0.1,并查看了随附的示例.
当我仔细查看示例 translations 时,我了解了如何翻译自定义ui文件的内容.但是,在示例和文档中都没有看到的是如何翻译位于组件 package.xml 文件中的文本.
在上面提到的示例中,它看起来像这样:
I've got Qt Installer Framework QtIFW2.0.1 installed and I had a look at the shipped examples.
When I had a closer look at the example translations I learned how I can translate the content of a custom ui file. But what I neither saw in the example nor in the documentation is how I can translate text that is located in the component package.xml file.
In the above mentioned example this looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>The root component</DisplayName>
<Description>This component contains a license and translations to German.</Description>
<Version>0.5.0-1</Version>
<ReleaseDate>2015-01-29</ReleaseDate>
<Licenses>
<License name="Beer Public License Agreement" file="license.txt" />
</Licenses>
<Default>true</Default>
<Script>installscript.qs</Script>
<UserInterfaces>
<UserInterface>page.ui</UserInterface>
</UserInterfaces>
<Translations>
<Translation>de.qm</Translation>
<Translation>pl.qm</Translation>
</Translations>
</Package>
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>The root component</DisplayName>
<Description>This component contains a license and translations to German.</Description>
<Version>0.5.0-1</Version>
<ReleaseDate>2015-01-29</ReleaseDate>
<Licenses>
<License name="Beer Public License Agreement" file="license.txt" />
</Licenses>
<Default>true</Default>
<Script>installscript.qs</Script>
<UserInterfaces>
<UserInterface>page.ui</UserInterface>
</UserInterfaces>
<Translations>
<Translation>de.qm</Translation>
<Translation>pl.qm</Translation>
</Translations>
</Package>
长话短说:我该如何翻译此特定文字行:
<Description>...</Description>
?
So, long story short: How can I translate this particular text-line:
<Description>...</Description>
?
推荐答案
这实际上很简单:
<Description>Miam-Player is the main program. It is required and cannot be unselected.</Description>
<Description xml:lang="fr_fr">Miam-Player est le programme principal. Il est requis et ne peut être désélectionné.</Description>
我认为您不需要其他东西.
I don't think you need something else.
这篇关于Qt安装程序框架:翻译组件说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!