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>
지원 기능

파일 확장자

.ts

언어성

단일 언어 및 이중 언어 방식 모두

복수형 지원

Yes

설명 지원

Yes

설명 지원

No

문맥 지원

Yes

위치 지원

Yes

플래그 지원

Yes

추가 상태

Needs editing

API 식별자

ts

읽기 전용 문자열 지원

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.

지원 기능

파일 확장자

.ts

언어성

단일 언어 및 이중 언어 방식 모두

복수형 지원

No

설명 지원

No

설명 지원

No

문맥 지원

Yes

위치 지원

No

플래그 지원

No

추가 상태

Needs editing

API 식별자

ts1

읽기 전용 문자열 지원

No

Supports removing obsolete strings

No

Weblate 구성

이중 언어로 사용할 때의 일반적인 Weblate 구성요소 설정

파일 마스크

i18n/app.*.ts

단일언어 기반 언어 파일

신규 번역의 템플릿

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.