-
Notifications
You must be signed in to change notification settings - Fork 73
fix: remove lupdate in cmake #1132
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
Conversation
Log: Change-Id: I381db0c3c2bb8694731691515bb5ba22b45d55bb
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepin-mozart The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSimplifies CMake translation step by removing all lupdate discovery and execution, leaving only lrelease for processing TS files. Class diagram for CMake translation processing logic updateclassDiagram
class TranslationProcessor {
- lupdate discovery and execution (removed)
+ lrelease execution
}
Flow diagram for updated translation processing in CMakeflowchart TD
A["Start Release Build"] --> B["Find all .ts files in translations/"]
B --> C["For each TS file"]
C --> D["Run lrelease on TS file"]
D --> E["End"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deepin pr auto review我来对这个 CMakeLists.txt 的变更进行审查:
if (CMAKE_BUILD_TYPE STREQUAL "Release")
file(GLOB TS_FILES "translations/*.ts")
# 查找 lrelease 命令
find_program(LRELEASE_COMMAND
NAMES
lrelease-Qt6
lrelease
lrelease-qt${QT_VERSION_MAJOR}
)
if (NOT LRELEASE_COMMAND)
message(FATAL_ERROR "lrelease command not found")
endif()
# 支持并行处理
include(ProcessorCount)
ProcessorCount(N)
if (N)
set(PARALLEL_ARGS -j ${N})
endif()
foreach(TS_FILE IN LISTS TS_FILES)
message(STATUS "Processing translation file: ${TS_FILE}")
execute_process(COMMAND ${LRELEASE_COMMAND} ${PARALLEL_ARGS} ${TS_FILE}
RESULT_VARIABLE RES
ERROR_VARIABLE ERROR)
if (RES)
message(FATAL_ERROR "Failed to process ${TS_FILE}: ${ERROR}")
endif()
endforeach()
endif()
这些改进将使代码更加健壮、可维护,并提供更好的错误处理和性能。 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Log:
Change-Id: I381db0c3c2bb8694731691515bb5ba22b45d55bb
Summary by Sourcery
Enhancements: