Qt5 .ts files and Transifex (Continuous Translation localization)



  • Has anyone made a proper tutorial or guide on how to set up a Transifex qith Qt5 and .ts files?
    I read somewhere else on the forums that:

    bq. when generating your .ts files make sure there is one without any language codes on it (the one that will be loaded if you don’t have any translations for the user’s language). This would be named appname.ts.

    How does one generate a .ts file without any language codes in it? What does that mean ?



  • Not absolutely sure but this is what so far is working:

    What needs to happen is that the projectname.pro file needs to be edited in order to add a projectname.ts without the localization id string. (See first line in the code snippet below).

    @
    TRANSLATIONS += share/translations/projectname.ts
    share/translations/projectname_ru.ts
    share/translations/projectname_uk.ts
    share/translations/projectname_de.ts
    @
    Then run lupdate projectname.pro in directory share/translations (or whatever your path is).

    This will generate all the .ts files including the new projectname.ts file. This file contains both source and translation strings in the original language, i.e.
    <source></source> and <translation></translation> tags will contain the same string in the same language.

    Then you can point Transifex to a static URL of this projectname.ts on your repository which will autoupdate it on Transifex and regenerate any other translation you have set up for the project.

    Solution attributed to this "thread":https://bitbucket.org/dismine/valentina/issue/55/translations-uploaded-to-transifex#comment-7800950


Log in to reply
 

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