# Qt .ts

The Qt toolkit uses a .ts file format to store translations which are traditionally edited using Qt Linguist.

## References

The format is XML and seems to only have been documented properly in Qt 4.3

- Current DTD Specification for Qt 4.5, older versions; Qt 4.3
- http://svn.ez.no/svn/ezcomponents/trunk/Translation/docs/linguist-format.txt

## Complete

Note that ts2po uses and older version and does not support all of these features. Virtaal, Pootle and other users of the new ts class support the following:

- Context
- Message: status (unfinished, finished, obsolete), source, translation, location
- Notes: comment, extracomment, translatorcomment (last two since Toolkit 1.6.0)
- Plurals: numerusform

## TODO

Note

A new parser has been added to the toolkit in v1.2. This allows Virtaal, pocount and other users to work with v1.1 of the .ts format. This corrects almost all of the issues listed below. The converter ts2po continues to use the older storage class and thus continue to experience some of these problems.

- Compliance with above DTD
- byte: within various text areas
- translation: obsolete (currently handled with comments in conversion to PO. But should be able to convert Obsolete PO back into obsolete TS. This might mean moving this format properly onto the base class).
- lengthvariants
- *comment: various new comment fields
- old*: ability to store previous source and comments

## Validate

These might work but need validation

- Encoding handling for non-UTF-8 file encodings