Important: Please read the Qt Code of Conduct -

ts_tool - Utility for extracting strings from .ts files for translation services.

  • Let me introduce a small utility for extracting strings from .ts file into .txt file.

    It need for example for translation services which is get the text files in format: one string - one translation and then distribute this string's between translators for speed up the translations.

    The idea in following (.ts -> .txt):
    Command line:

    ts_tool.exe --src v:\PROJECTS\CODIJY\ColorMagicGUI\translations\ColorMagic_EN.ts --dst t:\test\ --mode TXT

    The utility take input .ts file, parse it with priority for <translation> tag (if <translation> is empty it use the <source>) and generate two files on output:

    • .ts file with hash's
    • .txt file in format [hash] "String for translation"

    i.e. for example .ts:
    <location filename="../shortcuts/shortcut_manager.cpp" line="30"></location>
    <source>Arm Tool</source>

    [08F5B2DC] "Arm Tool"

    Then you can send .txt file for translation.
    After translation for insert translated strings back to .ts file use this command:

    ts_tool.exe --src t:\test\ --dst v:\PROJECTS\CODIJY\ColorMagicGUI\translations\ColorMagic_EN.ts --mode TS

    Git Repo:

  • Update ts_tool to v2.0
    Whats new:
    Add mode: --with-unfinished for include unfinished records to result .txt file,
    and: --with-vanished for include obsolete records to result .txt file.
    Rename mode XML to TS


  • Updated to 2.3
    Utility adapted and tested for

    Unfortunately don't give me any discount, but I allow him use it for free.
    Binary and sources here:

  • Update to version 2.6
    With a new option: "--unfinished-only" (Useful if need to translate only new or updated records).

Log in to reply