Fix: add translate for short cut#271
Merged
deepin-bot[bot] merged 1 commit intoMay 9, 2026
Merged
Conversation
Add translate for short cut. Log: fix issue Bug: https://pms.uniontech.com/bug-view-354843.html
deepin pr auto reviewGit Diff 代码审查报告整体评估本次提交主要涉及翻译文件(.ts)的更新和一个新增的lupdate.sh脚本。这些更改主要是更新了翻译字符串的位置信息和新增了一些未翻译的字符串。整体代码质量良好,但有一些可以改进的地方。 1. lupdate.sh 脚本审查语法逻辑
代码质量
代码性能
代码安全
改进建议#!/bin/bash
# SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# 检查lupdate命令是否存在
if ! command -v lupdate &> /dev/null; then
echo "Error: lupdate command not found. Please install Qt Linguist tools."
exit 1
fi
# 检查源目录是否存在
if [ ! -d "./reader" ]; then
echo "Error: Source directory './reader' not found."
exit 1
fi
# 检查翻译目录是否存在
if [ ! -d "./translations" ]; then
echo "Error: Translation directory './translations' not found."
exit 1
fi
# 定义翻译文件列表
translation_files=(
"deepin-reader.ts"
"deepin-reader_zh_CN.ts"
"deepin-reader_zh_TW.ts"
"deepin-reader_zh_HK.ts"
"deepin-reader_ug.ts"
"deepin-reader_bo.ts"
)
# 更新所有翻译文件
for file in "${translation_files[@]}"; do
echo "Updating $file..."
if ! lupdate ./reader -ts -no-obsolete "./translations/$file"; then
echo "Error: Failed to update $file"
exit 1
fi
done
echo "All translation files updated successfully."2. 翻译文件(.ts)审查语法逻辑
代码质量
代码性能
代码安全
改进建议
3. 具体问题lupdate.sh
翻译文件
4. 总体建议
5. 优先级
总体而言,本次提交的代码质量良好,主要是一些改进空间,没有严重的问题需要立即修复。 |
lzwind
approved these changes
May 9, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add translate for short cut.
Log: fix issue
Bug: https://pms.uniontech.com/bug-view-354843.html