Results 1 to 5 of 5

Thread: Batch translation using a .ts as source

  1. #1
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Batch translation using a .ts as source

    Hi,
    I have translated all strings of Qt library 4.5.0 (and Designer, Assistant and Linguist) in Italian. Now I want to translate Qt 4.5.2, but I do not want to rewrite all translations.
    Is there a way in Linguist to do a batch translation using another .ts file as source? Using a phrase book won't work, because some of the phrases must be translated in different ways in different contextes, and Linguist will use only the first found in phrase book. I could remove from phrase book all entries with multiple translations but: a) I must translate them by hand every time. b) What if in 4.5.3 they add a new phrase already in phrase book which need multiple translations?
    Any idea?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Batch translation using a .ts as source

    You should use lupdate on the project file to update translations.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Batch translation using a .ts as source

    Quote Originally Posted by wysota View Post
    You should use lupdate on the project file to update translations.
    I added "it" to QT_TS variable in translations/translations.pri and tried "lupdate projects.pro" but this is the output (similar result on linux).
    Qt Code:
    1. C:\Qt\build\4.5.2>lupdate projects.pro
    2. C:/Qt/build/4.5.2/projects.pro(28):Function 'unique' is not implemented
    3. C:/Qt/build/4.5.2/projects.pro(28):Function 'lower' is not implemented
    4. C:/Qt/build/4.5.2/projects.pro(28):Function 'list' is not implemented
    5. C:/Qt/build/4.5.2/src/src.pro(130):Function 'eval' is not implemented
    6. C:/Qt/build/4.5.2/src/src.pro(133):Function 'replace' is not implemented
    7. C:/Qt/build/4.5.2/src/src.pro(134):Function 'replace' is not implemented
    8. C:/Qt/build/4.5.2/src/src.pro(135):Function 'replace' is not implemented
    9. C:/Qt/build/4.5.2/src/src.pro(136):Function 'replace' is not implemented
    10. C:/Qt/build/4.5.2/src/src.pro(137):Function 'replace' is not implemented
    11. C:/Qt/build/4.5.2/src/src.pro(138):Function 'fromfile' is not implemented
    12. C:/Qt/build/4.5.2/src/src.pro(138):Function 'list' is not implemented
    13. C:/Qt/build/4.5.2/doc/doc.pri(27):Function 'replace' is not implemented
    14. C:/Qt/build/4.5.2/doc/doc.pri(45):Function 'replace' is not implemented
    15. C:/Qt/build/4.5.2/translations/translations.pri(13):Function 'replace' is not implemented
    16. C:/Qt/build/4.5.2/translations/translations.pri(19):'fixPath' is not a function
    17. C:/Qt/build/4.5.2/translations/translations.pri(20):'fixPath' is not a function
    18. C:/Qt/build/4.5.2/translations/translations.pri(44):'prependAll' is not a function
    19. C:/Qt/build/4.5.2/projects.pro(44):Project MESSAGE: Unknown PROJECT:
    20. C:/Qt/build/4.5.2/projects.pro(93):Function 'escape_expand' is not implemented
    21. C:/Qt/build/4.5.2/projects.pro(94):Function 'escape_expand' is not implemented
    22. C:/Qt/build/4.5.2/projects.pro(95):Function 'escape_expand' is not implemented
    23. C:/Qt/build/4.5.2/projects.pro(96):Function 'escape_expand' is not implemented
    24. C:/Qt/build/4.5.2/tools/tools.pro(4):Project MESSAGE: Some graphics-related tools are unavailable without PNG support
    25. Not a file(0):C:/Qt/build/4.5.2/src_winmain/src_winmain.pro not readable.
    To copy to clipboard, switch view to plain text mode 

    I have already run "configure" (and build Qt), but why these "not implemented" errors?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Batch translation using a .ts as source

    Please add your language to translations/translations.pri and run qmake and make ts-qt.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Batch translation using a .ts as source

    Quote Originally Posted by wysota View Post
    Please add your language to translations/translations.pri and run qmake and make ts-qt.
    Ok, this way worked for Qt library and for Linguist (make ts-linguist) *. But it does not work for designer and assistant. It complains about missing tools/designer/translations/translations.pro and tools/assistant/translations/translations.pro.
    I only found a TRANSLATIONS reference in tools/designer/src/designer/designer.pro, but it does not contains all the strings, just some of them (I think the ones missing are from "components" directory).
    How do I update translations of Designer and Assistant?

    * Just a notice: I configured Qt with configure.exe ... -prefix AnotherDirectory. make ts-qt updates translations only in AnotherDirectory, not in source directory (not a problem, anyway).

Similar Threads

  1. problem in installing qt4.4.3 source
    By wagmare in forum Qt-based Software
    Replies: 0
    Last Post: 18th February 2009, 06:48
  2. Source code in qt-win-eval
    By Max Yaffe in forum Newbie
    Replies: 3
    Last Post: 12th April 2007, 14:17
  3. out of source qtopiamake???
    By izico in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 20th March 2007, 18:31
  4. Replies: 11
    Last Post: 24th March 2006, 06:40
  5. Splitting Translation Files
    By Jimmy2775 in forum Qt Programming
    Replies: 9
    Last Post: 3rd February 2006, 19:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.