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. Cmake and QM - Create .ts files without obsolete strings and ui refernces
Forum Updated to NodeBB v4.3 + New Features

Cmake and QM - Create .ts files without obsolete strings and ui refernces

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 102 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.
  • B Offline
    B Offline
    bovirus2
    wrote on 24 Mar 2025, 11:17 last edited by
    #1

    Hi.

    How can do using cmake and qt to create language fiels without obsolete strings and without ui references?

    I'm not able to sue -no-onbsolete and "-no-ui-lines"

    Source file:

    https://github.com/bovirus/caesium-image-compressor/blob/main/CMakeLists.txt

    SET(TS_FILES
    resources/i18n/caesium_en_US.ts
    resources/i18n/caesium_it_IT.ts
    )

    set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_BINARY_DIR}/i18n)
    if (QT_VERSION_MAJOR EQUAL "6")
    qt5_create_translation(QM_FILES
    ${CMAKE_SOURCE_DIR}
    ${TS_FILES}
    LUPDATE_OPTIONS ${LUPDATE_OPTIONS}
    )
    else ()
    qt6_create_translation(QM_FILES
    ${CMAKE_SOURCE_DIR}
    ${TS_FILES}
    LUPDATE_OPTIONS ${LUPDATE_OPTIONS}
    )
    endif ()

    What's wrong about use of "-no-update" options?

    Thanks. KR.

    C 1 Reply Last reply 24 Mar 2025, 19:26
    0
    • B bovirus2
      24 Mar 2025, 11:17

      Hi.

      How can do using cmake and qt to create language fiels without obsolete strings and without ui references?

      I'm not able to sue -no-onbsolete and "-no-ui-lines"

      Source file:

      https://github.com/bovirus/caesium-image-compressor/blob/main/CMakeLists.txt

      SET(TS_FILES
      resources/i18n/caesium_en_US.ts
      resources/i18n/caesium_it_IT.ts
      )

      set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_BINARY_DIR}/i18n)
      if (QT_VERSION_MAJOR EQUAL "6")
      qt5_create_translation(QM_FILES
      ${CMAKE_SOURCE_DIR}
      ${TS_FILES}
      LUPDATE_OPTIONS ${LUPDATE_OPTIONS}
      )
      else ()
      qt6_create_translation(QM_FILES
      ${CMAKE_SOURCE_DIR}
      ${TS_FILES}
      LUPDATE_OPTIONS ${LUPDATE_OPTIONS}
      )
      endif ()

      What's wrong about use of "-no-update" options?

      Thanks. KR.

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 24 Mar 2025, 19:26 last edited by
      #2

      @bovirus2 said in Cmake and QM - Create .ts files without obsolete strings and ui refernces:

      What's wrong about use of "-no-update" options?

      lupdate has no such an option: https://doc.qt.io/qt-6/linguist-lupdate.html

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0

      1/2

      24 Mar 2025, 11:17

      • 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