Qt Linguist (.ts)

In Qt-basierten Anwendungen verwendetes Übersetzungsformat.

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.

Beispieldatei:

<?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>
Unterstützte Funktionen

Dateiendungen

.ts

Linguistik: ⓘ

Sowohl einsprachig als auch zweisprachig

Unterstützt Pluralformen ⓘ

Yes

Unterstützt Beschreibungen ⓘ

Yes

Unterstützt Erklärung ⓘ

No

Unterstützt Kontext ⓘ

Yes

Unterstützt Ort ⓘ

Yes

Unterstützt Markierungen ⓘ

Yes

Zusätzliche Status ⓘ

Needs editing

API-Kennung

ts

Unterstützt schreibgeschützte Zeichenketten ⓘ

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.

Unterstützte Funktionen

Dateiendungen

.ts

Linguistik: ⓘ

Sowohl einsprachig als auch zweisprachig

Unterstützt Pluralformen ⓘ

No

Unterstützt Beschreibungen ⓘ

No

Unterstützt Erklärung ⓘ

No

Unterstützt Kontext ⓘ

Yes

Unterstützt Ort ⓘ

No

Unterstützt Markierungen ⓘ

No

Zusätzliche Status ⓘ

Needs editing

API-Kennung

ts1

Unterstützt schreibgeschützte Zeichenketten ⓘ

No

Supports removing obsolete strings ⓘ

No

Weblate-Konfiguration

Typische Weblate-Komponentenkonfiguration bei zweisprachiger Verwendung

Dateimaske

i18n/app.*.ts

Einsprachige Basissprachdatei

Leer

Vorlage für neue Übersetzungen

i18n/app.de.ts

Dateiformat

Qt-Linguist-Übersetzungsdatei (Version 2)

Typische Weblate-Komponentenkonfiguration bei einsprachiger Verwendung

Dateimaske

i18n/app.*.ts

Einsprachige Basissprachdatei

i18n/app.en.ts

Vorlage für neue Übersetzungen

i18n/app.en.ts

Dateiformat

Qt-Linguist-Übersetzungsdatei (Version 2)

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