diff --git a/kybackup/app.qrc b/kybackup/app.qrc index 3fcb033..43af793 100755 --- a/kybackup/app.qrc +++ b/kybackup/app.qrc @@ -33,5 +33,6 @@ resource/images/empty.png resource/images/empty_dark.png resource/symbos/document-open-recent-symbolic.png + resource/language/qt_zh_CN.qm diff --git a/kybackup/component/backuplistwidget.cpp b/kybackup/component/backuplistwidget.cpp index c81e11a..fc242ad 100755 --- a/kybackup/component/backuplistwidget.cpp +++ b/kybackup/component/backuplistwidget.cpp @@ -17,6 +17,7 @@ BackupListWidget::BackupListWidget(QWidget *parent /*= nullptr*/) : m_plusLogo = new MyIconLabel; m_plusLogo->setFixedHeight(36); m_plusLogo->setThemeIcon("list-add-symbolic", ":/symbos/list-add-symbolic.png"); + // 文件拖放区域 m_plusLogo->setDesplayText(tr("File drag and drop area")); m_plusLogo->setEnabled(false); diff --git a/kybackup/deletebackupdialog.cpp b/kybackup/deletebackupdialog.cpp index 45a3426..0e9d1a0 100755 --- a/kybackup/deletebackupdialog.cpp +++ b/kybackup/deletebackupdialog.cpp @@ -48,6 +48,7 @@ DeleteBackupDialog::DeleteBackupDialog(ParseBackupList::BackupPoint backupPonit, // 标题 m_titleLabel = new MyLabel; m_titleLabel->setFixedSize(380, 30); + // 正在删除数据,请稍候 m_titleLabel->setDeplayText(tr("Please wait while data is being removed")); m_titleLabel->setToolTip(tr("Please wait while data is being removed")); diff --git a/kybackup/functypeconverter.cpp b/kybackup/functypeconverter.cpp index f839dd5..b10a6d0 100755 --- a/kybackup/functypeconverter.cpp +++ b/kybackup/functypeconverter.cpp @@ -64,22 +64,22 @@ QString FuncTypeConverter::keycodeToThemeIconString(int code) QString nameString; switch (code) { case BACKUP_SYSTEM: - nameString = tr("ukui-bf-system-backup-symbolic"); + nameString = "ukui-bf-system-backup-symbolic"; break; case RESTORE_SYSTEM: - nameString = tr("ukui-bf-system-restore-symbolic"); + nameString = "ukui-bf-system-restore-symbolic"; break; case BACKUP_DATA: - nameString = tr("ukui-bf-data-backup-symbolic"); + nameString = "ukui-bf-data-backup-symbolic"; break; case RESTORE_DATA: - nameString = tr("ukui-bf-data-restore-symbolic"); + nameString = "ukui-bf-data-restore-symbolic"; break; case OPERATION_LOG: - nameString = tr("ukui-bf-operation-log-symbolic"); + nameString = "ukui-bf-operation-log-symbolic"; break; case GHOST_IMAGE: - nameString = tr("ukui-bf-ghost-mirror-symbolic"); + nameString = "ukui-bf-ghost-mirror-symbolic"; break; default: break; diff --git a/kybackup/kybackup.pro b/kybackup/kybackup.pro index 1451e67..9d17a16 100755 --- a/kybackup/kybackup.pro +++ b/kybackup/kybackup.pro @@ -124,10 +124,12 @@ FORMS += \ deletebackupdialog.ui \ maindialog.ui +OTHER_FILES += + TRANSLATIONS += qt_zh_CN.ts -# !system(lrelease qt_zh_CN.ts): error("Failed to generate qm") -# system(cp qt_zh_CN.qm images) +!system(lrelease qt_zh_CN.ts): error("Failed to generate qm") +system(cp qt_zh_CN.qm resource/language) RESOURCES += \ app.qrc diff --git a/kybackup/main.cpp b/kybackup/main.cpp index 0ae2819..5d09c1e 100755 --- a/kybackup/main.cpp +++ b/kybackup/main.cpp @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) if (!GlobelBackupInfo::inst().isManager() && GlobelBackupInfo::inst().hasArgRestore()) { QMessageBox box(QMessageBox::Warning, QObject::tr("Warning"), QObject::tr("This tool can only be used by administrator.")); box.setStandardButtons(QMessageBox::Ok); - box.setButtonText(QMessageBox::Ok, QObject::tr("OK")); + box.setButtonText(QMessageBox::Ok, QObject::tr("Ok")); QIcon titleIcon = QIcon::fromTheme(THEME_YHKYLIN_BACKUP_TOOLS); box.setWindowIcon(titleIcon); box.exec(); @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) if (strUid != ack) { QMessageBox box(QMessageBox::Critical, QObject::tr("Error"), QObject::tr("Another user had opened kybackup, you can not start it again.")); box.setStandardButtons(QMessageBox::Ok); - box.setButtonText(QMessageBox::Ok, QObject::tr("OK")); + box.setButtonText(QMessageBox::Ok, QObject::tr("Ok")); QIcon titleIcon = QIcon::fromTheme(THEME_YHKYLIN_BACKUP_TOOLS); box.setWindowIcon(titleIcon); box.exec(); @@ -117,7 +117,7 @@ void initApp(QApplication& a) QTranslator *translator = new QTranslator(); if (locale == "zh_CN") { //中文需要翻译 - if (!translator->load(":/qm/images/qt_zh_CN.qm")) //qtcreator启动后看到在资源目录下 + if (!translator->load(":/language/qt_zh_CN.qm")) //qtcreator启动后看到在资源目录下 qDebug() << "load translator file failed!"; else a.installTranslator(translator); diff --git a/kybackup/maindialog.cpp b/kybackup/maindialog.cpp index 700b831..b7e15b1 100755 --- a/kybackup/maindialog.cpp +++ b/kybackup/maindialog.cpp @@ -132,10 +132,10 @@ void MainDialog::initTileBar() backupTheme->setMenu(selectTheme); QAction* defaultTheme = new QAction(tr("Auto"), m_titleWidget); selectTheme->addAction(defaultTheme); - QAction* darkTheme = new QAction(tr("Dark"), m_titleWidget); - selectTheme->addAction(darkTheme); QAction* lightTheme = new QAction(tr("Light"), m_titleWidget); selectTheme->addAction(lightTheme); + QAction* darkTheme = new QAction(tr("Dark"), m_titleWidget); + selectTheme->addAction(darkTheme); m_backupHelp = new QAction(tr("Help"), m_titleWidget); backupMain->addAction(m_backupHelp); diff --git a/kybackup/module/databackup.cpp b/kybackup/module/databackup.cpp index a0b9b6b..25f9ce6 100755 --- a/kybackup/module/databackup.cpp +++ b/kybackup/module/databackup.cpp @@ -80,15 +80,15 @@ void DataBackup::initFirstWidget() labelBackup_firstPage->setScaledContents(true); labelBackup_firstPage->adjustSize(); - // 系统备份说明 + // 数据备份说明 MyLabel *labelNote_firstPage = new MyLabel(first); labelNote_firstPage->setFixedWidth(700); labelNote_firstPage->setFixedHeight(24); labelNote_firstPage->move(41, 180); if (Utils::isHuawei990()) - labelNote_firstPage->setDeplayText(tr("Only files in the home, root, and data directories can be backed up")); + labelNote_firstPage->setDeplayText(tr("Only files in the /home, /root, and /data directories can be backed up")); else - labelNote_firstPage->setDeplayText(tr("Only files in the home, root, and data/usershare directories can be backed up")); + labelNote_firstPage->setDeplayText(tr("Only files in the /home, /root, and /data/usershare directories can be backed up")); font.setBold(false); font.setPixelSize(18); labelNote_firstPage->setFont(font); @@ -381,7 +381,7 @@ void DataBackup::initSecondWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(second); preStep->setGeometry(271, 176, 97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, [=]() { @@ -391,7 +391,7 @@ void DataBackup::initSecondWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(second); nextStep->setGeometry(389, 176, 97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=]() { @@ -602,7 +602,7 @@ void DataBackup::initSecondWidget_inc() // 上一步按钮 MyPushButton *preStep = new MyPushButton(second); preStep->setGeometry(271, 176, 97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, [=]() { @@ -612,7 +612,7 @@ void DataBackup::initSecondWidget_inc() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(second); nextStep->setGeometry(389, 176, 97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=]() { @@ -766,7 +766,7 @@ void DataBackup::initThirdWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(centerFont); preStep->setFixedSize(97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, [=]() { @@ -780,7 +780,7 @@ void DataBackup::initThirdWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(centerFont); nextStep->setFixedSize(97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -791,7 +791,7 @@ void DataBackup::initThirdWidget() // 重新检测按钮 MyPushButton *recheck = new MyPushButton(centerFont); recheck->setFixedSize(97, 36); - recheck->setText(tr("recheck")); + recheck->setText(tr("Recheck")); recheck->setEnabled(true); recheck->setAutoRepeat(true); connect(recheck, &MyPushButton::clicked, this, [=](bool checked) { @@ -959,9 +959,9 @@ void DataBackup::on_checkEnv_end(int result) errTip = tr("Please change filesystem format to ext3、ext4 or ntfs"); break; case int(BackupResult::UDISK_FILESYSTEM_IS_READONLY): - // 移动设备是只读的 + // 移动设备是只读挂载的 errMsg = tr("The device is read only"); - // 请修改为可读写权限的 + // 请修改为读写模式 errTip = tr("Please chmod to rw"); break; case int(BackupResult::BACKUP_CAPACITY_IS_NOT_ENOUGH): @@ -1069,7 +1069,7 @@ void DataBackup::initForthWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(forth); preStep->setGeometry(271, 268, 97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &DataBackup::on_pre_clicked); @@ -1077,7 +1077,7 @@ void DataBackup::initForthWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(forth); nextStep->setGeometry(389, 268, 97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -1248,7 +1248,7 @@ void DataBackup::initFifthWidget() // 取消按钮 MyPushButton *cancel = new MyPushButton(fifth); cancel->setFixedSize(97, 36); - cancel->setText(tr("cancel")); + cancel->setText(tr("Cancel")); cancel->setAutoRepeat(true); hlayoutCenterFont3->addStretch(); hlayoutCenterFont3->addWidget(cancel); @@ -1542,7 +1542,7 @@ void DataBackup::initLastWidget() // 返回首页 MyPushButton *homePage = new MyPushButton(centerFont); homePage->setFixedSize(97, 36); - homePage->setText(tr("home page")); + homePage->setText(tr("Home Page")); homePage->setEnabled(true); homePage->setAutoRepeat(true); hlayoutCenterFont5->addWidget(homePage); @@ -1550,7 +1550,7 @@ void DataBackup::initLastWidget() // 再试一次 MyPushButton *retry = new MyPushButton(centerFont); retry->setFixedSize(97, 36); - retry->setText(tr("retry")); + retry->setText(tr("Retry")); retry->setEnabled(true); retry->setAutoRepeat(true); hlayoutCenterFont5->addWidget(retry); diff --git a/kybackup/module/datarestore.cpp b/kybackup/module/datarestore.cpp index c12ffd5..96b2f05 100755 --- a/kybackup/module/datarestore.cpp +++ b/kybackup/module/datarestore.cpp @@ -320,7 +320,7 @@ void DataRestore::initSecondWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(centerFont); preStep->setFixedSize(97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &DataRestore::on_pre_clicked); @@ -329,7 +329,7 @@ void DataRestore::initSecondWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(centerFont); nextStep->setFixedSize(97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -340,7 +340,7 @@ void DataRestore::initSecondWidget() // 重新检测按钮 MyPushButton *recheck = new MyPushButton(centerFont); recheck->setFixedSize(97, 36); - recheck->setText(tr("recheck")); + recheck->setText(tr("Recheck")); recheck->setEnabled(true); recheck->setAutoRepeat(true); hlayoutCenterFont5->addWidget(recheck); @@ -378,9 +378,9 @@ void DataRestore::initSecondWidget() dot2->setBackgroundColor(Qt::black); labelCheck1->setFontColor(Qt::black); labelCheck2->setFontColor(Qt::black); - // 还原过程中不要做其它操作,以防数据丢失 + // 检查恢复环境是否符合要求 labelCheck1->setDeplayText(tr("Check whether the restore environment meets the requirements")); - // 检测还原环境是否满足 + // 还原期间不要做其它操作,以防数据丢失 labelCheck2->setDeplayText(tr("Do not perform other operations during restore to avoid data loss")); preStep->setVisible(false); nextStep->setVisible(false); @@ -874,7 +874,7 @@ void DataRestore::initLastWidget() // 返回首页 MyPushButton *homePage = new MyPushButton(centerFont); homePage->setFixedSize(97, 36); - homePage->setText(tr("home page")); + homePage->setText(tr("Home Page")); homePage->setEnabled(true); homePage->setAutoRepeat(true); hlayoutCenterFont5->addWidget(homePage); @@ -882,14 +882,14 @@ void DataRestore::initLastWidget() // 再试一次 MyPushButton *retry = new MyPushButton(centerFont); retry->setFixedSize(97, 36); - retry->setText(tr("retry")); + retry->setText(tr("Retry")); retry->setEnabled(true); retry->setAutoRepeat(true); hlayoutCenterFont5->addWidget(retry); // 重启 MyPushButton *reboot = new MyPushButton(centerFont); reboot->setFixedSize(97, 36); - reboot->setText(tr("reboot system")); + reboot->setText(tr("Reboot System")); reboot->setEnabled(true); reboot->setAutoRepeat(true); hlayoutCenterFont5->addWidget(reboot); diff --git a/kybackup/module/ghostimage.cpp b/kybackup/module/ghostimage.cpp index 2f385d0..d8060d3 100755 --- a/kybackup/module/ghostimage.cpp +++ b/kybackup/module/ghostimage.cpp @@ -226,7 +226,7 @@ void GhostImage::initSecondWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(second); preStep->setGeometry(271, 176, 97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &GhostImage::on_pre_clicked); @@ -234,7 +234,7 @@ void GhostImage::initSecondWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(second); nextStep->setGeometry(389, 176, 97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -358,7 +358,7 @@ void GhostImage::initThirdWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(centerFont); preStep->setFixedSize(97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &GhostImage::on_pre_clicked); @@ -367,7 +367,7 @@ void GhostImage::initThirdWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(centerFont); nextStep->setFixedSize(97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -378,7 +378,7 @@ void GhostImage::initThirdWidget() // 重新检测按钮 MyPushButton *recheck = new MyPushButton(centerFont); recheck->setFixedSize(97, 36); - recheck->setText(tr("recheck")); + recheck->setText(tr("Recheck")); recheck->setEnabled(true); recheck->setAutoRepeat(true); hlayoutCenterFont5->addWidget(recheck); @@ -416,10 +416,10 @@ void GhostImage::initThirdWidget() dot2->setBackgroundColor(Qt::black); labelCheck1->setFontColor(Qt::black); labelCheck2->setFontColor(Qt::black); - // 还原过程中不要做其它操作,以防数据丢失 - labelCheck1->setDeplayText(tr("Check whether the restore environment meets the requirements")); - // 检测还原环境是否满足 - labelCheck2->setDeplayText(tr("Do not perform other operations during restore to avoid data loss")); + // 检测是否具备制作Ghost镜像条件 + labelCheck1->setDeplayText(tr("Check whether the conditions for creating an ghost image are met")); + // 制作Ghost镜像期间不要做其它操作,以防数据丢失 + labelCheck2->setDeplayText(tr("Do not perform other operations during creating an ghost image to avoid data loss")); preStep->setVisible(false); nextStep->setVisible(false); recheck->setVisible(false); @@ -714,7 +714,7 @@ void GhostImage::initForthWidget() // 取消按钮 MyPushButton *cancel = new MyPushButton(forth); cancel->setFixedSize(97, 36); - cancel->setText(tr("cancel")); + cancel->setText(tr("Cancel")); cancel->setEnabled(true); cancel->setAutoRepeat(true); hlayoutCenterFont3->addStretch(); @@ -1046,7 +1046,7 @@ void GhostImage::initLastWidget() // 返回首页 MyPushButton *homePage = new MyPushButton(centerFont); homePage->setFixedSize(97, 36); - homePage->setText(tr("home page")); + homePage->setText(tr("Home Page")); homePage->setEnabled(true); homePage->setAutoRepeat(true); hlayoutCenterFont5->addWidget(homePage); @@ -1054,7 +1054,7 @@ void GhostImage::initLastWidget() // 再试一次 MyPushButton *retry = new MyPushButton(centerFont); retry->setFixedSize(97, 36); - retry->setText(tr("retry")); + retry->setText(tr("Retry")); retry->setEnabled(true); retry->setAutoRepeat(true); hlayoutCenterFont5->addWidget(retry); diff --git a/kybackup/module/systembackup.cpp b/kybackup/module/systembackup.cpp index bda7321..0900170 100755 --- a/kybackup/module/systembackup.cpp +++ b/kybackup/module/systembackup.cpp @@ -230,7 +230,7 @@ void SystemBackup::initSecondWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(second); preStep->setGeometry(271, 176, 97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &SystemBackup::on_pre_clicked); @@ -238,7 +238,7 @@ void SystemBackup::initSecondWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(second); nextStep->setGeometry(389, 176, 97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -361,7 +361,7 @@ void SystemBackup::initThirdWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(centerFont); preStep->setFixedSize(97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &SystemBackup::on_pre_clicked); @@ -370,7 +370,7 @@ void SystemBackup::initThirdWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(centerFont); nextStep->setFixedSize(97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -381,7 +381,7 @@ void SystemBackup::initThirdWidget() // 重新检测按钮 MyPushButton *recheck = new MyPushButton(centerFont); recheck->setFixedSize(97, 36); - recheck->setText(tr("recheck")); + recheck->setText(tr("Recheck")); recheck->setEnabled(true); recheck->setAutoRepeat(true); connect(recheck, &MyPushButton::clicked, this, [=](bool checked) { @@ -657,7 +657,7 @@ void SystemBackup::initForthWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(forth); preStep->setGeometry(271, 268, 97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &SystemBackup::on_pre_clicked); @@ -665,7 +665,7 @@ void SystemBackup::initForthWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(forth); nextStep->setGeometry(389, 268, 97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -852,7 +852,7 @@ void SystemBackup::initFifthWidget() // 取消按钮 MyPushButton *cancel = new MyPushButton(fifth); cancel->setFixedSize(97, 36); - cancel->setText(tr("cancel")); + cancel->setText(tr("Cancel")); cancel->setAutoRepeat(true); hlayoutCenterFont3->addStretch(); hlayoutCenterFont3->addWidget(cancel); @@ -1183,7 +1183,7 @@ void SystemBackup::initLastWidget() // 返回首页 MyPushButton *homePage = new MyPushButton(centerFont); homePage->setFixedSize(97, 36); - homePage->setText(tr("home page")); + homePage->setText(tr("Home Page")); homePage->setEnabled(true); homePage->setAutoRepeat(true); hlayoutCenterFont5->addWidget(homePage); @@ -1191,7 +1191,7 @@ void SystemBackup::initLastWidget() // 再试一次 MyPushButton *retry = new MyPushButton(centerFont); retry->setFixedSize(97, 36); - retry->setText(tr("retry")); + retry->setText(tr("Retry")); retry->setEnabled(true); retry->setAutoRepeat(true); hlayoutCenterFont5->addWidget(retry); diff --git a/kybackup/module/systemrestore.cpp b/kybackup/module/systemrestore.cpp index ad9d9e2..4b8bf53 100755 --- a/kybackup/module/systemrestore.cpp +++ b/kybackup/module/systemrestore.cpp @@ -338,7 +338,7 @@ void SystemRestore::initSecondWidget() // 上一步按钮 MyPushButton *preStep = new MyPushButton(centerFont); preStep->setFixedSize(97, 36); - preStep->setText(tr("back")); + preStep->setText(tr("Back")); preStep->setEnabled(true); preStep->setAutoRepeat(true); connect(preStep, &MyPushButton::clicked, this, &SystemRestore::on_pre_clicked); @@ -347,7 +347,7 @@ void SystemRestore::initSecondWidget() // 下一步按钮 MyPushButton *nextStep = new MyPushButton(centerFont); nextStep->setFixedSize(97, 36); - nextStep->setText(tr("next")); + nextStep->setText(tr("Next")); nextStep->setEnabled(true); nextStep->setAutoRepeat(true); connect(nextStep, &MyPushButton::clicked, this, [=](bool checked) { @@ -358,7 +358,7 @@ void SystemRestore::initSecondWidget() // 重新检测按钮 MyPushButton *recheck = new MyPushButton(centerFont); recheck->setFixedSize(97, 36); - recheck->setText(tr("recheck")); + recheck->setText(tr("Recheck")); recheck->setEnabled(true); recheck->setAutoRepeat(true); hlayoutCenterFont5->addWidget(recheck); @@ -901,7 +901,7 @@ void SystemRestore::initLastWidget() // 返回首页 MyPushButton *homePage = new MyPushButton(centerFont); homePage->setFixedSize(97, 36); - homePage->setText(tr("home page")); + homePage->setText(tr("Home Page")); homePage->setEnabled(true); homePage->setAutoRepeat(true); hlayoutCenterFont5->addWidget(homePage); @@ -909,7 +909,7 @@ void SystemRestore::initLastWidget() // 再试一次 MyPushButton *retry = new MyPushButton(centerFont); retry->setFixedSize(97, 36); - retry->setText(tr("retry")); + retry->setText(tr("Retry")); retry->setEnabled(true); retry->setAutoRepeat(true); hlayoutCenterFont5->addWidget(retry); diff --git a/kybackup/qt_zh_CN.ts b/kybackup/qt_zh_CN.ts new file mode 100644 index 0000000..6c17bd0 --- /dev/null +++ b/kybackup/qt_zh_CN.ts @@ -0,0 +1,1988 @@ + + + + + AboutDialog + + + Dialog + 对话框 + + + + Close + 关闭 + + + + Backup & Restore + 备份还原 + + + + version: + 版本: + + + + The backup tool is a tool that supports system backup and data backup. When the user data is damaged or the system is attacked, the tool can flexibly restore the status of the backup node. A lot of optimization and innovation have been carried out for domestic hardware and software platforms. + 麒麟备份还原工具是一款支持系统备份还原和数据备份还原的工具,当用户数据损坏或系统遭受攻击时能够通过该工具灵活的还原到备份节点的状态。针对国产软硬件平台开展了大量的优化和创新。 + + + + Service & Support: %1 + 服务与支持团队:%1 + + + + BackupListWidget + + + File drag and drop area + 文件拖放区域 + + + + BackupPointListDialog + + + Dialog + 对话框 + + + + Backup Name + 备份名称 + + + + UUID + 备份标识 + + + + Backup Time + 备份时间 + + + + Backup Size + 备份大小 + + + + Position + 备份位置 + + + + No Backup + 无备份 + + + + DataBackup + + + Data Backup + 数据备份 + + + + Only files in the /home, /root, and /data directories can be backed up + 仅支持备份/home、/root、/data目录下的文件 + + + + Only files in the /home, /root, and /data/usershare directories can be backed up + 仅支持备份/home、/root、/data/usershare目录下的文件 + + + + Multi-Spot + 多点还原 + + + + Security + 安全可靠 + + + + Protect Data + 防止数据丢失 + + + + Convenient + 便捷快速 + + + + Start Backup + 开始备份 + + + + Update Backup + 更新备份 + + + + + Backup Management >> + 备份管理 >> + + + + Please select backup position + 请选择备份位置 + + + + + local default path : + 本地默认路径: + + + + + removable devices path : + 移动设备: + + + + + Select backup data + 选择备份数据 + + + + + Add + 添加 + + + + + Select + 选择 + + + + + Please select file to backup + 请选择备份文件 + + + + + + + Back + 上一步 + + + + + + + Next + 下一步 + + + + Default backup location + 默认备份位置 + + + + + + + checking + 环境检测 + + + + + + + preparing + 备份准备 + + + + + + + backuping + 备份中 + + + + + + + finished + 备份完成 + + + + Recheck + 重新检测 + + + + Checking, wait a moment ... + 正在检测,请稍等... + + + + Do not perform other operations during backup to avoid data loss + 备份过程中不要做其它操作,以防数据丢失 + + + + Check whether the remaining capacity of the backup partition is sufficient + 检测备份分区空间是否充足··· + + + + Check whether the remaining capacity of the removable device is sufficient + 检测移动设备空间是否充足··· + + + + Check success + 检测成功 + + + + The storage for backup is enough + 备份空间充足 + + + + Make sure the computer is plugged in or the battery level is above 60% + 请确保电脑已连接电源或电量超过60% + + + + Check failure + 检测失败 + + + + + Program lock failed, please retry + 程序锁定失败,请重试 + + + + + There may be other backups or restores being performed + 可能有其它备份/还原等任务在执行 + + + + + Unsupported task type + 不支持的任务类型 + + + + + No processing logic was found in the service + 没有找到相应的处理逻辑 + + + + + Failed to mount the backup partition + 备份分区挂载失败 + + + + + Check whether there is a backup partition + 检查是否有备份分区 + + + + The filesystem of device is vfat format + 移动设备的文件系统是vfat格式 + + + + Please change filesystem format to ext3、ext4 or ntfs + 请换成ext3、ext4、ntfs等文件系统格式 + + + + The device is read only + 移动设备是只读挂载的 + + + + Please chmod to rw + 请修改为读写模式 + + + + + The storage for backup is not enough + 备份空间不足 + + + + + Retry after release space + 建议释放空间后重试 + + + + + Other backup or restore task is being performed + 其它备份还原等操作正在执行 + + + + + Please try again later + 请稍后重试 + + + + Backup Name + 备份名称 + + + + + Name already exists + 名称已存在 + + + + Cancel + 取消 + + + + Do not use computer in case of data loss + 请勿使用电脑,以防数据丢失 + + + + Failed to create the backup point directory + 创建备份目录失败 + + + + Please check backup partition permissions + 请检查备份分区权限 + + + + The backup had been canceled + 备份已取消 + + + + Re-initiate the backup if necessary + 如需要可重新进行备份 + + + + An error occurred during backup + 备份期间发生错误 + + + + Error messages refer to log file : /var/log/backup.log + 错误信息请参考日志文件:/var/log/backup.log + + + + Home Page + 返回首页 + + + + Retry + 再试一次 + + + + The backup is successful + 备份成功 + + + + The backup is failed + 备份失败 + + + + DataRestore + + + Data Restore + 数据还原 + + + + Backed up first, then can be restored + 必须先进行数据备份,否则无法进行数据还原操作 + + + + Fast Recovery + 快速恢复 + + + + Security + 安全可靠 + + + + Protect Data + 解决数据丢失 + + + + Independent + 自主操作 + + + + Start Restore + 开始还原 + + + + + + checking + 环境检测 + + + + + + restoring + 还原中 + + + + + + finished + 还原完成 + + + + Back + 上一步 + + + + Next + 下一步 + + + + Recheck + 重新检测 + + + + Checking, wait a moment ... + 正在检测,请稍等... + + + + Check whether the restore environment meets the requirements + 检查恢复环境是否符合要求 + + + + Do not perform other operations during restore to avoid data loss + 还原期间不要做其它操作,以防数据丢失 + + + + Check success + 检测成功 + + + + + Do not use computer in case of data loss + 请勿使用电脑,以防数据丢失 + + + + Make sure the computer is plugged in or the battery level is above 60% + 请确保电脑已连接电源或电量超过60% + + + + Check failure + 检测失败 + + + + + Program lock failed, please retry + 程序锁定失败,请重试 + + + + + There may be other backups or restores being performed + 可能有其它备份/还原等任务在执行 + + + + + Unsupported task type + 不支持的任务类型 + + + + + No processing logic was found in the service + 没有找到相应的处理逻辑 + + + + + The .user.txt file does not exist + .user.txt文件不存在 + + + + + + + + + Backup points may be corrupted + 备份点可能被损坏 + + + + + The .exclude.user.txt file does not exist + .exclude.user.txt文件不存在 + + + + + The backup point data directory does not exist + 备份点数据目录不存在 + + + + Failed to rsync /boot/efi + 同步/boot/efi失败 + + + + Check the mounting mode of the /boot/efi partition + 请检查/boot/efi分区挂载方式 + + + + Failed to prepare the restore directory + 还原目录准备失败 + + + + Refer to log :/var/log/backup.log for more information + 更多信息请参考日志/var/log/backup.log + + + + An error occurred during restore + 还原时发生错误 + + + + Error messages refer to log file : /var/log/backup.log + 错误信息请参考日志文件:/var/log/backup.log + + + + Home Page + 返回首页 + + + + Retry + 再试一次 + + + + Reboot System + 重启系统 + + + + Successfully restoring the data + 数据还原成功 + + + + The system needs to reboot. Otherwise, some tools cannot be used. + 系统需要重启,否则某些工具可能无法使用 + + + + Restoring the data failed + 数据还原失败 + + + + DeleteBackupDialog + + + Dialog + 对话框 + + + + + Please wait while data is being removed + 正在删除数据,请稍候 + + + + Removing backup point... + 正在删除备份点... + + + + Ok + 确定 + + + + Other backup or restore task is being performed. + 其它备份还原等操作正在执行。 + + + + Program lock failed, please retry. + 程序锁定失败,请重试。 + + + + Unsupported task type. + 不支持的任务类型。 + + + + Deleted backup successfully. + 删除备份成功。 + + + + Failed to delete backup. + 删除备份失败。 + + + + FuncTypeConverter + + + System Backup + 系统备份 + + + + System Recovery + 系统还原 + + + + Data Backup + 数据备份 + + + + Data Recovery + 数据还原 + + + + Log Records + 操作日志 + + + + Ghost Image + Ghost镜像 + + + + GhostImage + + + Ghost Image + Ghost镜像 + + + + A ghost image file can only be created after backup system to local disk + 必须先进行本地系统备份,否则无法创建镜像文件 + + + + Simple + 操作简单 + + + + Fast + 创建速度快 + + + + Security + 安全可靠 + + + + Timesaving + 节省时间 + + + + Start Ghost + 创建镜像 + + + + Please select storage location + 请选择存储位置 + + + + local default path : + 本地默认路径: + + + + removable devices path : + 移动设备: + + + + + Back + 上一步 + + + + + Next + 下一步 + + + + + + checking + 环境检测 + + + + + + ghosting + 创建中 + + + + + + finished + 创建完成 + + + + Recheck + 重新检测 + + + + Checking, wait a moment ... + 正在检测,请稍等... + + + + Check whether the conditions for creating an ghost image are met + 检测是否具备制作Ghost镜像条件 + + + + Do not perform other operations during creating an ghost image to avoid data loss + 制作Ghost镜像期间不要做其它操作,以防数据丢失 + + + + Check success + 检测成功 + + + + The storage space is enough + 存储空间充足 + + + + Make sure the computer is plugged in or the battery level is above 60% + 请确保电脑已连接电源或电量超过60% + + + + Check failure + 检测失败 + + + + + Program lock failed, please retry + 程序锁定失败,请重试 + + + + + There may be other backups or restores being performed + 可能有其它备份/还原等任务在执行 + + + + + Unsupported task type + 不支持的任务类型 + + + + + No processing logic was found in the service + 没有找到相应的处理逻辑 + + + + + Failed to mount the backup partition + 备份分区挂载失败 + + + + + Check whether there is a backup partition + 检查是否有备份分区 + + + + + The filesystem of device is vfat format + 移动设备的文件系统是vfat格式 + + + + + Please change filesystem format to ext3、ext4 or ntfs + 请换成ext3、ext4、ntfs等文件系统格式 + + + + + The device is read only + 移动设备是只读挂载的 + + + + + Please chmod to rw + 请修改为读写模式 + + + + + The storage for ghost is not enough + Ghost存储空间不足 + + + + + + + Retry after release space + 建议释放空间后重试 + + + + + There is not enough space for temporary .kyimg file + 没有足够的空间存放临时.kyimg文件 + + + + + Other backup or restore task is being performed + 其它备份还原等操作正在执行 + + + + + Please try again later + 请稍后重试 + + + + + The backup node does not exist + 相应的备份节点不存在 + + + + + Check whether the backup point has been deleted + 请检查备份点是否已经被删除 + + + + Cancel + 取消 + + + + Do not use computer in case of data loss + 请勿使用电脑,以防数据丢失 + + + + The data is being compressed to the local disk, please wait patiently... + 正压缩数据到本地磁盘,请耐心等待... + + + + Transferring image file to mobile device, about to be completed... + 正在传输image文件到移动设备,即将完成... + + + + The image creation had been canceled + 已取消制作Ghost镜像 + + + + Re-initiate the image creation if necessary + 如需要可以重新进行Ghost镜像制作 + + + + An error occurred during make ghost image + 制作Ghost镜像时发生错误 + + + + Error messages refer to log file : /var/log/backup.log + 错误信息请参考日志文件:/var/log/backup.log + + + + Home Page + 返回首页 + + + + Retry + 再试一次 + + + + Ghost image creation is successful + Ghost镜像创建成功 + + + + You can view it in the directory : + 可以在后面目录中查看: + + + + Ghost image creation is failed + Ghost镜像创建失败 + + + + LeftsiderbarWidget + + + + Backup & Restore + 备份还原 + + + + MainDialog + + + Main menu + 主菜单 + + + + Minimize + 最小化 + + + + Close + 关闭 + + + + Theme + 主题 + + + + Auto + 跟随主题 + + + + Light + 浅色主题 + + + + Dark + 深色主题 + + + + Help + 帮助 + + + + About + 关于 + + + + Exit + 退出 + + + + Backup & Restore + 备份还原 + + + + ManageBackupPointList + + + System Backup Information + 系统备份信息 + + + + Data Backup Information + 数据备份信息 + + + + You can delete the backup that does not need, refer operation logs for more details + 您可以删除不需要的备份,更多细节请参考“操作日志” + + + + Delete + 删除 + + + + backup finished + 备份完成 + + + + backup unfinished + 备份未完成 + + + + OperationLog + + + No operation log + 无操作日志 + + + + Backup Name + 备份名称 + + + + UUID + 备份标识 + + + + Operation + 操作 + + + + Operation Time + 操作时间 + + + + new system backup + 新建系统备份 + + + + udpate system backup + 增量系统备份 + + + + new data backup + 新建数据备份 + + + + update data backup + 更新数据备份 + + + + restore system + 系统还原 + + + + restore retaining user data + 保留用户数据还原 + + + + restore data + 数据还原 + + + + delete backup + 删除备份 + + + + make ghost image + 制作ghost镜像 + + + + QObject + + + factory backup + 出厂备份 + + + + Factory Backup + 出厂备份 + + + + Backup State + 备份状态 + + + + PrefixPath + + + + + + + + + + + + + + + + + + + + + + + + Warning + 警告 + + + + Path already exists : + 路径已经存在: + + + + + + + + + + + + + + + + + + + Ok + 确定 + + + + The file or directory does not exist : + 文件或目录不存在 + + + + Only data that exists in the follow directorys can be selected: + 只有后面目录中的数据可以选择: + + + + This tool can only be used by administrator. + 系统备份还原只能由系统管理员使用。 + + + + + Ok + 确定 + + + + Error + 错误 + + + + Another user had opened kybackup, you can not start it again. + 其他用户已开启备份还原工具,不能再开启 + + + + kybackup + 备份还原工具 + + + + An exception occurred when mounting backup partition. + 挂载备份分区时发生错误。 + + + + There's no backup partition, can only backup to removable device. + 无备份分区。 + + + + Failed to mount backup partition. + 挂载备份分区失败。 + + + + + It's busy, please wait + 系统正忙,请稍等 + + + + + Please select a backup file or directory + 请选择一个备份文件或目录 + + + + + + Are you sure to cancel the operation? + 确定取消当前操作? + + + + + + + + + + Cancel + 取消 + + + + Contains the user's home directory, which need to reboot after restoration + 包含用户家目录,还原完成后需要重启 + + + + + + Continue + 继续 + + + + + Please select one backup to continue. + 请选择一个备份再继续。 + + + + Are you sure to delete the backup ? + 是否确定删除此备份? + + + + + Udisk Device: + 移动设备: + + + + + Local Disk: + 本地磁盘: + + + + Do you want to continue? + 是否继续? + + + + Other machine: + 异机备份: + + + + Restore factory settings, your system user data will not be retained + 恢复出厂设置,您的系统用户数据都将会消失。 + + + + SelectRestorePoint + + + System Backup Information + 系统备份信息 + + + + Data Backup Information + 数据备份信息 + + + + Ok + 确定 + + + + Udisk Device: + 移动设备: + + + + SystemBackup + + + System Backup + 系统备份 + + + + Can be restored when files are damaged or lost + 系统原始文件受损或丢失时可以进行还原 + + + + Multi-Spot + 多还原点 + + + + Small Size + 体积小 + + + + Security + 安全保障 + + + + Simple + 操作简单 + + + + Start Backup + 开始备份 + + + + + Backup Management >> + 备份管理 >> + + + + Please select backup position + 请选择备份位置 + + + + local default path : + 本地默认路径: + + + + removable devices path : + 移动设备: + + + + + + Back + 上一步 + + + + + + Next + 下一步 + + + + + + + checking + 环境检测 + + + + + + + preparing + 备份准备 + + + + + + + backuping + 备份中 + + + + + + + finished + 备份完成 + + + + Recheck + 重新检测 + + + + Checking, wait a moment ... + 正在检测,请稍等... + + + + Do not perform other operations during backup to avoid data loss + 备份期间不要做其它操作,以防数据丢失 + + + + Check whether the remaining capacity of the backup partition is sufficient + 检测备份分区空间是否充足··· + + + + Check whether the remaining capacity of the removable device is sufficient + 检测移动设备空间是否充足··· + + + + Check success + 检测成功 + + + + The storage for backup is enough + 备份空间充足 + + + + Make sure the computer is plugged in or the battery level is above 60% + 请确保电脑已连接电源或电量超过60% + + + + Check failure + 检测失败 + + + + + Program lock failed, please retry + 程序锁定失败,请重试 + + + + + There may be other backups or restores being performed + 可能有其它备份/还原等任务在执行 + + + + + Unsupported task type + 不支持的任务类型 + + + + + No processing logic was found in the service + 没有找到相应的处理逻辑 + + + + + Failed to mount the backup partition + 备份分区挂载失败 + + + + + Check whether there is a backup partition + 检查是否有备份分区 + + + + + The filesystem of device is vfat format + 移动设备的文件系统是vfat格式 + + + + + Please change filesystem format to ext3、ext4 or ntfs + 请换成ext3、ext4、ntfs等文件系统格式 + + + + + The device is read only + 移动设备是只读挂载的 + + + + + Please chmod to rw + 请修改为读写模式 + + + + + The storage for backup is not enough + 备份空间不足 + + + + + Retry after release space + 建议释放空间后重试 + + + + + Other backup or restore task is being performed + 其它备份还原等操作正在执行 + + + + + Please try again later + 请稍后重试 + + + + Backup Name + 备份名称 + + + + + Name already exists + 名称已存在 + + + + factory backup + 出厂备份 + + + + Cancel + 取消 + + + + Do not use computer in case of data loss + 请勿使用电脑,以防数据丢失 + + + + Failed to create the backup point directory + 创建备份目录失败 + + + + Please check backup partition permissions + 请检查备份分区权限 + + + + The system is being compressed to the local disk, please wait patiently... + 正压缩系统到本地磁盘,请耐心等待... + + + + Transferring image file to mobile device, about to be completed... + 正在传输image文件到移动设备,即将完成... + + + + The backup had been canceled + 已取消备份 + + + + Re-initiate the backup if necessary + 如需要可重新进行备份 + + + + + An error occurred during backup + 备份时发生错误 + + + + + Error messages refer to log file : /var/log/backup.log + 错误信息请参考日志文件:/var/log/backup.log + + + + Home Page + 返回首页 + + + + Retry + 再试一次 + + + + The backup is successful + 备份成功 + + + + The backup is failed + 备份失败 + + + + SystemRestore + + + System Restore + 系统还原 + + + + You can restore the system to its previous state + 在您遇到问题时可将系统还原到以前的状态 + + + + Simple + 操作简单 + + + + Security + 安全可靠 + + + + Repair + 修复系统损坏 + + + + Independent + 自主操作 + + + + Start Restore + 开始还原 + + + + Factory Restore + 出厂还原 + + + + Retaining User Data + 保留用户数据 + + + + + + checking + 环境检测 + + + + + + restoring + 还原中 + + + + + + finished + 还原完成 + + + + Back + 上一步 + + + + Next + 下一步 + + + + Recheck + 重新检测 + + + + Checking, wait a moment ... + 正在检测,请稍等... + + + + Check whether the restore environment meets the requirements + 检查恢复环境是否符合要求 + + + + Do not perform other operations during restore to avoid data loss + 还原期间不要做其它操作,以防数据丢失 + + + + Check success + 检测成功 + + + + The system will reboot automatically after the restore is successful + 还原成功后系统将自动重启 + + + + Make sure the computer is plugged in or the battery level is above 60% + 请确保电脑已连接电源或电量超过60% + + + + Check failure + 检测失败 + + + + + Program lock failed, please retry + 程序锁定失败,请重试 + + + + + There may be other backups or restores being performed + 可能有其它备份/还原等任务在执行 + + + + + Unsupported task type + 不支持的任务类型 + + + + + No processing logic was found in the service + 没有找到相应的处理逻辑 + + + + + The .user.txt file does not exist + .user.txt文件不存在 + + + + + + + + + Backup points may be corrupted + 备份点可能被损坏 + + + + + The .exclude.user.txt file does not exist + .exclude.user.txt文件不存在 + + + + + The backup point data directory does not exist + 备份点数据目录不存在 + + + + + Failed to rsync /boot/efi + 同步/boot/efi失败 + + + + + Check the mounting mode of the /boot/efi partition + 请检查/boot/efi分区挂载方式 + + + + Do not use computer in case of data loss + 请勿使用电脑,以防数据丢失 + + + + Failed to prepare the restore directory + 还原目录准备失败 + + + + Refer to log :/var/log/backup.log for more information + 更多信息请参考日志/var/log/backup.log + + + + An error occurred during restore + 还原时发生错误 + + + + Error messages refer to log file : /var/log/backup.log + 错误信息请参考日志文件:/var/log/backup.log + + + + Home Page + 返回首页 + + + + Retry + 再试一次 + + + + Successfully restoring the system + 系统还原成功 + + + + The system will automatically reboot + 系统将自动重启 + + + + Restoring the system failed + 系统还原失败 + + + + restore + + + system restore + + + + diff --git a/kybackup/resource/language/qt_zh_CN.qm b/kybackup/resource/language/qt_zh_CN.qm new file mode 100644 index 0000000..71715ae Binary files /dev/null and b/kybackup/resource/language/qt_zh_CN.qm differ