Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Translations Import Path #11934

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

gillamkid
Copy link
Contributor

Description

This recent PR seems to have broken translation file imports.
#11912
I'm just reverting it back to what it was before.

Sponsor

This contribution was sponsored by Firestorm
654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2

Before (bug I'm fixing)

before-trans

After (this is a revert back to the way it was a few days ago)

after-trans

@gillamkid
Copy link
Contributor Author

@HTRamsey

@HTRamsey
Copy link
Collaborator

I see what happened:
image

Could you change it to this?:

if(Qt6LinguistTools_FOUND)
# TODO: Update to new qt_add_translations form in Qt6.7
file(GLOB TS_SOURCES ${CMAKE_SOURCE_DIR}/translations/qgc_*.ts)
set_source_files_properties(${TS_SOURCES} PROPERTIES OUTPUT_LOCATION "${CMAKE_BINARY_DIR}/i18n")
qt_add_translations(${PROJECT_NAME}
TS_FILES ${TS_SOURCES}
RESOURCE_PREFIX "/"
LUPDATE_OPTIONS -no-obsolete
)
endif()

@HTRamsey
Copy link
Collaborator

I was trying to fix how I had previously set it to just dump all the translation files in the build directory which makes it very messy

Contribution Sponsor: Firestorm (launchfirestorm.com)
@gillamkid gillamkid force-pushed the gillamkid/translation-import-fix branch from 1065e17 to ad7ef24 Compare September 23, 2024 01:23
@gillamkid
Copy link
Contributor Author

I see what happened: image

Could you change it to this?:

if(Qt6LinguistTools_FOUND) # TODO: Update to new qt_add_translations form in Qt6.7 file(GLOB TS_SOURCES ${CMAKE_SOURCE_DIR}/translations/qgc_*.ts) set_source_files_properties(${TS_SOURCES} PROPERTIES OUTPUT_LOCATION "${CMAKE_BINARY_DIR}/i18n") qt_add_translations(${PROJECT_NAME} TS_FILES ${TS_SOURCES} RESOURCE_PREFIX "/" LUPDATE_OPTIONS -no-obsolete ) endif()

Great, tried this on my machine and it worked. Suggested change applied and pushed

@HTRamsey HTRamsey changed the title Fix failing translation file import (partial revert of 6304cdcb) Fix Translations Import Path Sep 23, 2024
@HTRamsey HTRamsey merged commit ad472f0 into mavlink:master Sep 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants