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>
支持的功能

檔案擴充

.ts

Linguality

單語和雙語

Supports plural

Yes

支援描述

Yes

支援解釋

No

Supports context

No

Supports location

Yes

Supports flags

Yes

Additional states

Needs editing

API 識別碼

ts

Supports read-only strings

No

Weblate 配置

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

檔案遮罩

i18n/app.*.ts

單語的基底語言檔

新翻譯的範本

i18n/app.de.ts

檔案格式

Qt Linguist 翻譯檔案

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

檔案遮罩

i18n/app.*.ts

單語的基底語言檔

i18n/app.en.ts

新翻譯的範本

i18n/app.en.ts

檔案格式

Qt Linguist 翻譯檔案