Skip to content

Commit

Permalink
chore: Update translation
Browse files Browse the repository at this point in the history
kill -> terminate
杀死 -> 终止

Issue: linuxdeepin/developer-center#9394
  • Loading branch information
mhduiy committed Jun 25, 2024
1 parent 562b849 commit 549456f
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 304 deletions.
12 changes: 6 additions & 6 deletions src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ bool Utils::showExitConfirmDialog(CloseType type, int count)
// 默认的count = 1的提示
title = QObject::tr("Close this terminal?");
txt = QObject::tr("There is still a process running in this terminal. "
"Closing the terminal will kill it.");
"Closing the terminal will terminate it.");
// count > 1 提示
if (count > 1) {
txt = QObject::tr("There are still %1 processes running in this terminal. "
"Closing the terminal will kill all of them.")
"Closing the terminal will terminate all of them.")
.arg(count);
}
} else {
title = QObject::tr("Close this window?");
txt = QObject::tr("There are still processes running in this window. Closing the window will kill all of them.");
txt = QObject::tr("There are still processes running in this window. Closing the window will terminate all of them.");
}

DDialog dlg(title, txt);
Expand All @@ -210,16 +210,16 @@ void Utils::getExitDialogText(CloseType type, QString &title, QString &txt, int

if (CloseType_Window == type) {
title = QObject::tr("Close this window?");
txt = QObject::tr("There are still processes running in this window. Closing the window will kill all of them.");
txt = QObject::tr("There are still processes running in this window. Closing the window will terminate all of them.");
} else {
// 默认的count = 1的提示
title = QObject::tr("Close this terminal?");
txt = QObject::tr("There is still a process running in this terminal. "
"Closing the terminal will kill it.");
"Closing the terminal will terminate it.");
// count > 1 提示
if (count > 1) {
txt = QObject::tr("There are still %1 processes running in this terminal. "
"Closing the terminal will kill all of them.")
"Closing the terminal will terminate all of them.")
.arg(count);
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/src/common/ut_utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ TEST_F(UT_Utils_Test, getExitDialogText)
Utils::getExitDialogText(temtype, title, txt, 0);

QString titleWindow = QObject::tr("Close this window?");
QString txtWindow = QObject::tr("There are still processes running in this window. Closing the window will kill all of them.");
QString txtWindow = QObject::tr("There are still processes running in this window. Closing the window will terminate all of them.");

EXPECT_NE(title, titleWindow);
EXPECT_NE(txt, txtWindow);
Expand All @@ -220,7 +220,7 @@ TEST_F(UT_Utils_Test, getExitDialogText)

QString titleDefault = QObject::tr("Close this terminal?");
QString txtDefault = QObject::tr("There is still a process running in this terminal. "
"Closing the terminal will kill it.");
"Closing the terminal will terminate it.");
temtype = Utils::CloseType::CloseType_Terminal;
Utils::getExitDialogText(temtype, title, txt, 1);
EXPECT_EQ(title, titleDefault);
Expand Down
Loading

0 comments on commit 549456f

Please sign in to comment.