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:
    ...
    <message>
    <location filename="../shortcuts/shortcut_manager.cpp" line="30"></location>
    <source>Arm Tool</source>
    <translation>[08F5B2DC]</translation>
    </message>
    ...

    .txt:
    ...
    [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 XML

    Git Repo: https://github.com/nen777w/ts_tool.git



  • 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

    Sources: https://github.com/nen777w/ts_tool.git



  • Updated to 2.3
    Utility adapted and tested for gengo.com

    Unfortunately gengo.com don't give me any discount, but I allow him use it for free.
    Binary and sources here: https://github.com/nen777w/ts_tool.git


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.