Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Collecting dimensions of translatable text labels in Qt Quick

Collecting dimensions of translatable text labels in Qt Quick

Scheduled Pinned Locked Moved Unsolved General and Desktop
translationslupdatetoolssize
7 Posts 3 Posters 2.3k 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.
  • D Offline
    D Offline
    diredko
    wrote on 23 Jul 2017, 14:12 last edited by diredko
    #1

    Hi All,

    Is there a way to collect dimensions of translatable text labels used in QMLs?
    I know that lupdate can be used to collect texts to be translated, but is there a tool that collects information allowing translators know what size their translations should fit in?
    If there is no such tool, maybe there is a commonly used approach to deal with this

    Thanks :)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Jul 2017, 21:07 last edited by
      #2

      Hi,

      AFAIK, there's no such tool nor any extracted information about that because it will depend on many parameters some of which are not controlled by Qt.

      Why do you need your translators to be limited by the geometry of your widgets ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply 24 Jul 2017, 04:54
      0
      • S SGaist
        23 Jul 2017, 21:07

        Hi,

        AFAIK, there's no such tool nor any extracted information about that because it will depend on many parameters some of which are not controlled by Qt.

        Why do you need your translators to be limited by the geometry of your widgets ?

        D Offline
        D Offline
        diredko
        wrote on 24 Jul 2017, 04:54 last edited by
        #3

        @SGaist I need to know dimensions of text labels to let translators deliver translations that would fit in those text labels using the very same font and font size. I want to make sure translated texts are not getting truncated.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 24 Jul 2017, 20:57 last edited by
          #4

          Why not let these labels expand as needed for the texts ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          D 1 Reply Last reply 25 Jul 2017, 14:57
          2
          • P Offline
            P Offline
            Pradeep Kumar
            wrote on 25 Jul 2017, 05:42 last edited by
            #5

            Hi,

            @diredko,

            u want to have the translated text of different languages, to be fit in label, make sure the label size is not fixed, and make them expand based on the translated text of the respective words which needs to be fit in label.
            Coz if u make label as fixed , for particular text it gets cropped. as said by @SGaist , expand labels dynamically for the text.

            Thanks,

            Pradeep Kumar
            Qt,QML Developer

            1 Reply Last reply
            0
            • S SGaist
              24 Jul 2017, 20:57

              Why not let these labels expand as needed for the texts ?

              D Offline
              D Offline
              diredko
              wrote on 25 Jul 2017, 14:57 last edited by
              #6

              @SGaist I can certainly make labels expandable but I'm still limited by the screen size (say 800x480)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 25 Jul 2017, 21:33 last edited by
                #7

                What kind of text do you have that might be big enough to become a problem for your UI ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0

                1/7

                23 Jul 2017, 14:12

                • Login

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