Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Installer Framework: Translate component description

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>

So, long story short: How can I translate this particular text-line:
<Description>...</Description>
?

like image 686
Michael Avatar asked Jan 22 '26 15:01

Michael


2 Answers

This is actually pretty simple:

<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.

like image 61
MBach Avatar answered Jan 24 '26 05:01

MBach


Maybe only in IFW 3.0, but in my case it worked.

To specify localization of "DisplayName", you need to use 5-character name of language, and for "Desctiption" you need to use language name of 2 letters

<DisplayName>The root component</DisplayName>
<DisplayName xml:lang="ru_RU">Корневой компонент</DisplayName>
<Description>Miam-Player is the main program. It is required and cannot be unselected.</Description>
<Description xml:lang="ru">Miam-Player это основная программа. Она необходима и не может быть отменена</Description>
like image 31
Francuz Avatar answered Jan 24 '26 05:01

Francuz