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

qt_add_translations CFBundleLocalizations broken

    XMLWordPrintable

Details

    • macOS
    • 9a66527fe (6.7)

    Description

      qt_add_translations CFBundleLocalizations seems to be broken for macOS:

      project(myproj)
      ...
      add_executable(mytarget ...)
      
      qt_add_translations(mytarget
        SOURCE_TARGETS mytarget
        TS_FILES
          myproj_en.ts
          myproj_nl.ts
      )
      

      Gives:
       

      CMake Warning at /Users/sander/.conan2/p/b/qt0a87ba8b93b86/p/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:399 (message):
        Failed to resolve language code for myproj_en.ts.
        Please update  CFBundleLocalizations in your Info.plist manually.
      Call Stack (most recent call first):
        /Users/xxx/.conan2/p/b/qt0a87ba8b93b86/p/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:718 (_qt_internal_store_languages_from_ts_files_in_targets)
        /Users/xxx/.conan2/p/b/qt0a87ba8b93b86/p/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:799 (qt6_add_translations)
        cpp/pep/assessor/CMakeLists.txt:110 (qt_add_translations)
      

       
      For some reason, it does work when prefixing the TS paths with ${CMAKE_CURRENT_SOURCE_DIR}.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            swdv Steven WdV
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes