Qt Linguist .ts

Qt ベースのアプリケーションで使用する翻訳形式。

Qt Linguist files are used as both bilingual and monolingual translations. Weblate supports both the current version 2 format and the legacy version 1 format. Select the file format matching the version produced by your application.

Version 2

This is the default format for .ts files and supports the full set of Qt Linguist features available in Weblate.

ファイルの例:

<?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>
対応機能

File extensions

.ts

Linguality

Both monolingual and bilingual

Supports plural

Yes

Supports descriptions

Yes

Supports explanation

No

Supports context

Yes

Supports location

Yes

Supports flags

Yes

Additional states

Needs editing

API identifier

ts

Supports read-only strings

No

Supports removing obsolete strings

No

Version 1

The legacy format supports messages, contexts and the unfinished state. It does not support plurals, locations, descriptions or Weblate flags.

対応機能

File extensions

.ts

Linguality

Both monolingual and bilingual

Supports plural

No

Supports descriptions

No

Supports explanation

No

Supports context

Yes

Supports location

No

Supports flags

No

Additional states

Needs editing

API identifier

ts1

Supports read-only strings

No

Supports removing obsolete strings

No

Weblate の設定

バイリンガル 用の、標準的な Weblate コンポーネント構成

ファイル マスク

i18n/app.*.ts

モノリンガル用の、基礎となる言語ファイル

Empty(空)

新しい翻訳のテンプレート

i18n/app.de.ts

ファイル形式

Qt Linguist translation file (version 2)`

モノリンガル用の、標準的な Weblate コンポーネント構成

ファイル マスク

i18n/app.*.ts

モノリンガル用の、基礎となる言語ファイル

i18n/app.en.ts

新しい翻訳のテンプレート

i18n/app.en.ts

ファイル形式

Qt Linguist translation file (version 2)`

For version 1 files, use the same configuration and select Qt Linguist translation file (version 1) as the file format.