File description

Qt TS files have the .ts file extension and are used for Qt app localization.

Good to know

POEditor imports the elements of QT .ts files as follows:

  • The <context> name and the <comment> are added in the context
  • The <extracomment> are added in the comments section
  • The <source> is added in the term
  • The <location> is added in the reference (attribute)
  • The <translation> tag is added as translation

Documentation

The official Qt Linguist TS File Format documentation: https://doc.qt.io/qt-5/linguist-ts-file-format.html

Sample file

View Download
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr">
  <context>
    <name>MainScreen</name>
    <message>
      <location filename="/app/modules/views" line="1"/>
      <source>TODO List</source>
      <comment>The name of the App</comment>
      <translation>TODO List</translation>
    </message>
    <message numerus="yes">
      <location filename="/app/modules/views" line="11"/>
      <source>Just one user online</source>
	  <translatorcomment>Check this translation</translatorcomment>
      <translation type="unfinished">
        <numerusform>Un seul utilisateur en ligne</numerusform>
        <numerusform>Il y a %d utilisateurs en ligne</numerusform>
      </translation>
    </message>
  </context>
  <context>
    <name>Register</name>
    <message>
      <location filename="/app/modules/views" line="2"/>
      <source>Enter your credentials below to login</source>
      <translation>Entrez vos identifiants ci-dessous pour vous connecter</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="7"/>
      <source>Sign up for free! No credit card required!</source>
      <translation type="unfinished">Inscrivez-vous gratuitement ! Aucune carte de crédit !</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="8"/>
      <source>Thank you for signing up !
Please check your email address to activate your account.</source>
      <translation>Je vous remercie pour vous inscrire !
Veuillez vérifier votre adresse e-mail pour activer votre compte.</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="9"/>
      <source>We were unable to sign you up.
Please correct the marked fields.</source>
      <translation>Nous n'avons pas pu vous inscrire.
Veuillez corriger les champs marqués.</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="10"/>
      <source>Terms and conditions</source>
      <translation>Termes et conditions</translation>
    </message>
  </context>
  <context>
    <name>Login</name>
    <message>
      <location filename="/app/modules/views" line="3"/>
      <source>Login successful !
Welcome back %s !</source>
      <translation>Connexion réussie !
Bon retour %s !</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="4"/>
      <source>Make sure you've entered the correct username and password</source>
      <translation>Assurez-vous que vous avez entré le nom d'utilisateur correct et le mot de passe</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="5"/>
      <source>I forgot my password</source>
      <translation>J'ai oublié mon mot de passe</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="6"/>
      <source>Enter your address in the field below. A new password will be sent to your inbox.</source>
      <translation>Entrez votre adresse dans le champ ci-dessous. Un nouveau mot de passe sera envoyé à votre boîte de réception.</translation>
    </message>
    <message>
      <location filename="/app/modules/views" line="12"/>
      <source>Password</source>
      <translation>Mot de passe</translation>
    </message>
  </context>
</TS>

See also: