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
QtWS25 Last Chance

Javascript library internationalization

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 899 Views
  • 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 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 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

      • Login

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