Results 1 to 2 of 2

Thread: An array of strings to be translated

  1. #1
    Join Date
    Jul 2017
    Posts
    37
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default An array of strings to be translated

    Qt Code:
    1. char exceptionNames[N_EXCEPTIONS][24]=
    2. {
    3. "noerror",
    4. "notri",
    5. "samepnts",
    6. "flattri",
    7. "badheader",
    8. "baddata",
    9. "matrixmismatch",
    10. "singularmatrix",
    11. "unsetgeoid",
    12. "unsetsource",
    13. "badunits",
    14. "badnumber",
    15. "badbreaklineend",
    16. "breaklinescross",
    17. "badbreaklineformat",
    18. "fileerror"
    19. };
    To copy to clipboard, switch view to plain text mode 
    I'm going to call tr(exceptionNames[i]). How do I tell lupdate that these strings need to be translated?

  2. #2
    Join Date
    Jul 2017
    Posts
    37
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: An array of strings to be translated

    Found it:
    Qt Code:
    1. QT_TRANSLATE_NOOP("BeziExcept","notri"),
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. How to parse nested JSON Array and Object inside array
    By Radhika in forum General Programming
    Replies: 5
    Last Post: 17th December 2015, 09:42
  2. Gui partially translated
    By jiveaxe in forum Newbie
    Replies: 1
    Last Post: 3rd May 2014, 15:20
  3. Not all Widgets are Translated
    By Halcom in forum Qt Programming
    Replies: 8
    Last Post: 6th December 2010, 09:52
  4. Replies: 0
    Last Post: 29th September 2009, 12:31
  5. Translated plugins
    By Illuminnator in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 18:34

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.