Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128617

lupdate doesn't generate the context data in .ts file for id-based translation project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.9.0 FF
    • 6.7.1
    • Tools: Linguist
    • None
    • Windows
    • a336ae60c (dev)

    Description

      <Issue>

      .ts files generated by lupdate for the id-based translation project with qsTrId() do not have a data for <name> attribute under the <context>.

      Here is the .ts file generated from the id-based project. Line 5 doesn't have a data.

      https://git.qt.io/mikio_hirai/qstrid_not_generating_context/-/commit/7c3d8afcd0cd6ff54ac0fdfae8a93008c45811ad

      Here is the .ts file generated from the qsTr() project. Line 5 has a data "Main."

      https://git.qt.io/mikio_hirai/qstrid_not_generating_context/-/commit/f91de11c5c45c3261007d5721ef9d2198727b24d

       

      <Reproduction Step>

      (1) Clone https://git.qt.io/mikio_hirai/qstrid_not_generating_context/-/tree/master?ref_type=heads

      (2) Checkout to the master branch

      (3) Checkout to c125e0ab8e98ed12491c8456c5cd3743a776a6f5

      (4) Run lupdate on the project.

      C:\Qt\6.7.1\msvc2019_64\bin\lupdate.exe . -extensions qml -ts qml_ja_JP.ts 

      <Expected Result>
      The generated qml_ja_JP.ts file has a value "Main" in the <name> attribute under <context>.

      <Actual Result>
      The generated qml_ja_JP.ts file does not have a value in the <name> attribute under <context>.

      <Workaround>
      Manually edit .ts file to add the context value.

      <Implication>

      No value in <name> under <context> shows "unnamed context" to the Context.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            masoud.jami Masoud Jami
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes