Qt Linguist .ts#

基於 Qt  的應用程式中使用的翻譯格式。

Qt Linguist 檔案既用作雙語翻譯,也用作單語翻譯。

範例檔案:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="cs">
<defaultcodec>UTF-8</defaultcodec>
<context>
    <name></name>
    <message weblate-flags="c-format, max-length:100">
        <source>Hello, world!
</source>
        <translation>Ahoj svete!
</translation>
    </message>
    <message numerus="yes">
        <source>Orangutan has %d banana(s).
</source>
        <translation type="unfinished">
            <numerusform />
            <numerusform />
            <numerusform />
        </translation>
    </message>
</context>
<context>
    <name>Second</name>
    <message>
        <source>Try Weblate at &lt;https://demo.weblate.org/&gt;!</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <source>Thank you for using Weblate.</source>
        <translation type="unfinished">Thanks</translation>
    </message>
    <message>
        <source>Obsolete</source>
        <translation type="obsolete">Thanks</translation>
    </message>
</context>
</TS>

Weblate 設定組態#

用作雙語言時典型的 Weblate 組件組態

檔案遮罩

i18n/app.*.ts

單語的基底語言檔

Empty

新翻譯的模板

i18n/app.de.ts

檔案格式

Qt Linguist 翻譯檔

用作單語言時典型的 Weblate 組件組態

檔案遮罩

i18n/app.*.ts

單語的基底語言檔

i18n/app.en.ts

新翻譯的模板

i18n/app.en.ts

檔案格式

Qt Linguist 翻譯檔