Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Javascript library internationalization
Forum Updated to NodeBB v4.3 + New Features

Javascript library internationalization

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 908 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pepereto
    wrote on 6 Aug 2013, 15:30 last edited by
    #1

    Hello,

    I am trying to translate some strings from a .js library imported by my QMLs, the strings are found by lupdate but when I launch my app the qsTr function cannot find the translated string but it works with the strings in the QML files.

    I am using QT 5.02

    Javascript "file.js"
    @
    function func() {
    var temp = qsTr("TEST")
    return temp
    }
    @

    QML
    @
    import "file.js" as JSLIB

    Text{
    text: JSLIB.func()
    }
    @

    Thx

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pepereto
      wrote on 7 Aug 2013, 10:51 last edited by
      #2

      problem found, bug reported "https://bugreports.qt-project.org/browse/QTBUG-32850":https://bugreports.qt-project.org/browse/QTBUG-32850

      1 Reply Last reply
      0

      1/2

      6 Aug 2013, 15:30

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved