* bug 128924 【虚拟机】【virtualbox】【安装】安装进入选择语言界面默认设置为中文,但是实际为英文(需要点击一下中文才会变为中文)
* bug 127932 【本地安装】【legacy】legacy模式默认为英语,但选中的显示为中文 * bug 116614 【2204】【安装】slidshow背景图片未更新为2204图片 * bug 70413 【用户反馈】【系统安装】手动安装未选择data分区和backup分区,点击下一步会提示“没有数据分区”或“备份还原分区” * bug 127724 【系统安装】【创建用户】用户名设置的报错提醒全部为英文未汉化
|
@ -1,5 +1,5 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
QMAKE_POST_LINK += make clean
|
||||
SUBDIRS += \
|
||||
src/plugins/VirtualKeyboard \
|
||||
src/plugins/Reflex \
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.11.0, 2022-04-15T11:05:58. -->
|
||||
<!-- Written by QtCreator 4.11.0, 2022-07-20T19:28:25. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{1772e99f-9971-470e-88dc-a299543e69ad}</value>
|
||||
<value type="QByteArray">{081497a1-504b-4c7b-b2bd-59dfdbd205c5}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
|
@ -54,26 +54,29 @@
|
|||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{d72b6a79-5369-4aef-b502-3250cd82b20f}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{774c2f61-bfd3-4ca5-8a41-3a70b6ee4dd0}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/l/git/gitee/me/kylin-os-installer</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
|
@ -114,7 +117,7 @@
|
|||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/l/git/gitee/me/build-Kylin-Installer-unknown-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
|
@ -162,7 +165,7 @@
|
|||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/l/git/gitee/me/build-Kylin-Installer-unknown-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
|
@ -240,11 +243,6 @@
|
|||
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
|
@ -282,9 +280,8 @@
|
|||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Installer_main2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/lifa/mygit2/ukylin/kylin-os-installer/src/Installer_main/Installer_main.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/lifa/mygit2/ukylin/kylin-os-installer/src/Installer_main/Installer_main.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/l/git/gitee/me/kylin-os-installer/src/Installer_main/Installer_main.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/l/git/gitee/me/kylin-os-installer/src/Installer_main/Installer_main.pro</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
|
@ -295,7 +292,7 @@
|
|||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Debug/src/Installer_main</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/l/git/gitee/me/kylin-os-installer/src/Installer_main</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
kylin-os-installer (0.2.1-0k7) yangtze; urgency=medium
|
||||
|
||||
* bug 128924 【虚拟机】【virtualbox】【安装】安装进入选择语言界面默认设置为中文,但是实际为英文(需要点击一下中文才会变为中文)
|
||||
* bug 127932 【本地安装】【legacy】legacy模式默认为英语,但选中的显示为中文
|
||||
* bug 116614 【2204】【安装】slidshow背景图片未更新为2204图片
|
||||
* bug 70413 【用户反馈】【系统安装】手动安装未选择data分区和backup分区,点击下一步会提示“没有数据分区”或“备份还原分区”
|
||||
* bug 127724 【系统安装】【创建用户】用户名设置的报错提醒全部为英文未汉化
|
||||
|
||||
-- lifa <lifa@kylinos.cn> Wed, 20 Jul 2022 17:19:54 +0800
|
||||
|
||||
kylin-os-installer (0.2.1-0k6) yangtze; urgency=medium
|
||||
|
||||
* 替换正式源
|
||||
|
|
1610
language/en_US.ts
1538
language/zh_CN.ts
Before Width: | Height: | Size: 648 KiB |
Before Width: | Height: | Size: 386 KiB |
Before Width: | Height: | Size: 381 KiB |
Before Width: | Height: | Size: 375 KiB |
Before Width: | Height: | Size: 401 KiB |
Before Width: | Height: | Size: 399 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 290 KiB |
Before Width: | Height: | Size: 212 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 271 KiB |
Before Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 163 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 650 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 602 KiB |
|
@ -205,8 +205,7 @@ void InstallingFrame::showErrorFrame()
|
|||
gridLayout->addWidget(m_mainTitle1,0,1,1,1,Qt::AlignCenter);
|
||||
|
||||
QLabel* littleTitle1=new QLabel;
|
||||
littleTitle1->setText(tr("Sorry, KylinOS cannot continue the installation. Please feed back the error log below so that we can better solve the problem for you."));
|
||||
//littleTitle1->setText("非常抱歉kylinOS无法继续安装。请反馈下方错误日志,以便我们更好的为您解决问题.");
|
||||
littleTitle1->setText(tr("Sorry, System cannot continue the installation. Please feed back the error log below so that we can better solve the problem for you."));
|
||||
gridLayout->addWidget(littleTitle1,1,1,1,1,Qt::AlignCenter);
|
||||
|
||||
gridLayout->addItem(new QSpacerItem(32,53, QSizePolicy::Minimum, QSizePolicy::Preferred),7,1,1,1);
|
||||
|
|
|
@ -213,16 +213,19 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
setenv("LANGUAGE", "zh_CN.UTF-8",1);
|
||||
QString default_language = QString(getenv("LANGUAGE")).section('.',0,0);
|
||||
QTranslator* translator = new QTranslator;
|
||||
QString path = KServer::GetKylinInstallPath() + "/language/" + QLocale::system().name() + ".qm";
|
||||
QString path = KServer::GetKylinInstallPath() + "/language/" + default_language + ".qm";
|
||||
translator->load(path);
|
||||
qApp->installTranslator(translator);
|
||||
|
||||
QTranslator* translator1 = new QTranslator;
|
||||
translator1->load(KServer::GetKylinInstallPath() + "/language/qt_zh_CN.qm");
|
||||
translator1->load(KServer::GetKylinInstallPath() + "/language/qt"+default_language+".qm");
|
||||
qApp->installTranslator(translator1);
|
||||
|
||||
|
||||
int result = a.exec();
|
||||
if(w_auto) {
|
||||
delete w_auto;
|
||||
|
|
|
@ -16,12 +16,6 @@
|
|||
<file>data/png/pan-up-symbolic.svg</file>
|
||||
<file>data/svg/success.svg</file>
|
||||
<file>data/svg/failed.svg</file>
|
||||
<file>data/png/slidershow/1.png</file>
|
||||
<file>data/png/slidershow/3.png</file>
|
||||
<file>data/png/slidershow/2.png</file>
|
||||
<file>data/png/slidershow/4.png</file>
|
||||
<file>data/png/slidershow/5.png</file>
|
||||
<file>data/png/slidershow/6.png</file>
|
||||
<file>data/png/slidershow/prev.svg</file>
|
||||
<file>data/png/slidershow/next.svg</file>
|
||||
<file>data/qss/MessageBox.css</file>
|
||||
|
@ -43,17 +37,16 @@
|
|||
<file>data/svg/loading/ukui-loading-5.svg</file>
|
||||
<file>data/svg/loading/ukui-loading-6.svg</file>
|
||||
<file>data/svg/loading/ukui-loading-7.svg</file>
|
||||
<file>data/png/slidershow/1e.png</file>
|
||||
<file>data/png/slidershow/2e.png</file>
|
||||
<file>data/png/slidershow/3e.png</file>
|
||||
<file>data/png/slidershow/4e.png</file>
|
||||
<file>data/png/slidershow/5e.png</file>
|
||||
<file>data/png/slidershow/6e.png</file>
|
||||
<file>data/svg/finger.png</file>
|
||||
<file>data/svg/code.svg</file>
|
||||
<file>data/svg/plaincode.png</file>
|
||||
<file>data/png/bg.jpg</file>
|
||||
<file>data/png/percent.png</file>
|
||||
<file>data/png/sp2-bk@1x.png</file>
|
||||
<file>data/png/slidershow/openkylin-slideshow/1.png</file>
|
||||
<file>data/png/slidershow/openkylin-slideshow/2.png</file>
|
||||
<file>data/png/slidershow/openkylin-slideshow/3.png</file>
|
||||
<file>data/png/slidershow/openkylin-slideshow/4.png</file>
|
||||
<file>data/png/slidershow/openkylin-slideshow/5.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -4,17 +4,19 @@
|
|||
#include <QFile>
|
||||
#include <QDebug>
|
||||
#include <QTextStream>
|
||||
#include "../PluginService/ui_unit/xrandrobject.h"
|
||||
#include "../PluginService/ksystemsetting_unit.h"
|
||||
#include "../PluginService/ui_unit/xrandrobject.h"
|
||||
#include <QPainter>
|
||||
#define RATIO_1 0.6
|
||||
|
||||
#define IMG_PATH ":/data/png/slidershow/openkylin-slideshow"
|
||||
namespace KInstaller {
|
||||
using namespace KServer;
|
||||
SlideShow::SlideShow(QWidget *parent) : QWidget(parent),
|
||||
m_currentIndex(0)
|
||||
{
|
||||
fileInfo();
|
||||
initUI();
|
||||
|
||||
timer = new QTimer(this);
|
||||
timer->setInterval(5000);
|
||||
|
||||
|
@ -24,45 +26,86 @@ SlideShow::SlideShow(QWidget *parent) : QWidget(parent),
|
|||
this->setFocus();
|
||||
}
|
||||
|
||||
int SlideShow::fileInfo()
|
||||
|
||||
QImage SlideShow::addtransterstr(QImage &image, QRect rct, QString str,QFont font,QColor color)
|
||||
{
|
||||
QDir *dir = new QDir(":/data/png/slidershow/");
|
||||
QStringList filter;
|
||||
filter << "*.png";
|
||||
dir->setNameFilters(filter);
|
||||
|
||||
QFileInfoList fileInfoList = dir->entryInfoList(filter);
|
||||
num =fileInfoList.count() / 2;
|
||||
return num ;
|
||||
QPainter painter(&image);
|
||||
painter.setCompositionMode(QPainter::CompositionMode_SourceOut);
|
||||
|
||||
QPen pen = painter.pen();
|
||||
pen.setColor(color);
|
||||
painter.setPen(pen);
|
||||
painter.setFont(font);
|
||||
painter.drawText(rct, Qt::AlignHCenter|Qt::TextWordWrap, str);
|
||||
return image;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SlideShow::loadSlides()
|
||||
{
|
||||
sliderWidget = new QStackedWidget();
|
||||
QRect rect = KServer::GetScreenRect();
|
||||
|
||||
|
||||
QFont ft1,ft2;
|
||||
ft1.setFamily(QStringLiteral("bold"));
|
||||
ft1.setBold(true);
|
||||
ft1.setPointSize(24);
|
||||
|
||||
ft2.setFamily(QStringLiteral("bold"));
|
||||
ft2.setBold(true);
|
||||
ft2.setPointSize(12);
|
||||
|
||||
|
||||
|
||||
//载入背景图
|
||||
QDir *dir = new QDir(IMG_PATH);
|
||||
QStringList filter;
|
||||
filter << "*.png";
|
||||
dir->setNameFilters(filter);
|
||||
|
||||
QFileInfoList fileInfoList = dir->entryInfoList(filter);
|
||||
int num =fileInfoList.count();
|
||||
|
||||
for (int i = 1; i <= num; i++) {
|
||||
Slide *slide = new Slide(this);
|
||||
slide->setObjectName("slide_"+QString::number(i));
|
||||
// slide->hide();
|
||||
if(KServer::ReadSettingIni("config", "language") == "en_US") {
|
||||
QImage image(QString(":/data/png/slidershow/%1e.png").arg(i));
|
||||
image = image.scaledToHeight(rect.height() * RATIO_1, Qt::SmoothTransformation);
|
||||
slide->setPixmap(QPixmap::fromImage(image));
|
||||
slide->setScaledContents(true);
|
||||
} else {
|
||||
QImage image(QString(":/data/png/slidershow/%1.png").arg(i));
|
||||
image = image.scaledToHeight(rect.height() * RATIO_1, Qt::SmoothTransformation);
|
||||
slide->setPixmap(QPixmap::fromImage(image));
|
||||
slide->setScaledContents(true);
|
||||
}
|
||||
sliderWidget->addWidget(slide);
|
||||
QString titlestr="";
|
||||
switch (i) {
|
||||
case 1:titlestr=tr("主流硬件平台@支持Intel,AND,RISC_V等硬件平台");break;
|
||||
case 2:titlestr=tr("更高兼容性的内容@基于linux5.15LTS内核,前沿技术尽在其中");break;
|
||||
case 3:titlestr=tr("全新桌面环境@支持Wayland,PC平板二合一,界面时尚简洁");break;
|
||||
case 4:titlestr=tr("集成开发基础套件@自研SDK,提供多种工具和接口,兼容多种系统架构");break;
|
||||
case 5:titlestr=tr("【寻光】,【和印】华丽来袭@一键切换桌面主题,设计风格兼顾个性和品味");break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
QImage image(QString(IMG_PATH).append("/%1.png").arg(i));
|
||||
|
||||
//统一标准,将图片缩放至固定大小便于写字
|
||||
image = image.scaledToHeight(500, Qt::SmoothTransformation);
|
||||
QRect rect1,rect2;
|
||||
rect1=QRect(0,10,image.width(),50);
|
||||
rect2=QRect(0,60,image.width(),30);
|
||||
|
||||
image = addtransterstr(image, rect1,titlestr.section('@',0,0),ft1,QColor(220,220,220));
|
||||
image = addtransterstr(image, rect2,titlestr.section('@',1,1),ft2,QColor(220,220,220));
|
||||
|
||||
image = image.scaledToHeight(rect.height() * RATIO_1, Qt::SmoothTransformation);
|
||||
|
||||
slide->setPixmap(QPixmap::fromImage(image));
|
||||
slide->setScaledContents(true);
|
||||
sliderWidget->addWidget(slide);
|
||||
}
|
||||
sliderWidget->setCurrentIndex(m_currentIndex);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SlideShow::initUI()
|
||||
{
|
||||
QHBoxLayout* hlayout = new QHBoxLayout(this);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <QStackedWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QKeyEvent>
|
||||
#include <QImage>
|
||||
namespace KInstaller {
|
||||
class SlideShow : public QWidget
|
||||
{
|
||||
|
@ -18,8 +19,7 @@ public:
|
|||
void initAllConnect();
|
||||
void addStyleSheet();
|
||||
void loadSlides();
|
||||
int fileInfo();
|
||||
QImage pixmapScale(const QImage& image, const double & index);
|
||||
QImage addtransterstr(QImage &image, QRect rct, QString str,QFont font,QColor color);
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -85,7 +85,7 @@ void LanguageFrame::setBoardTabOrder()
|
|||
|
||||
void LanguageFrame::initBtn()
|
||||
{
|
||||
m_curSystenlocal = QLocale::system().name();
|
||||
m_curSystenlocal = QString(getenv("LANGUAGE")).section('.',0,0);
|
||||
if (m_curSystenlocal == "en_US") {
|
||||
m_ENUSBtn->setLabelShow(true);
|
||||
m_ENUSBtn->setChecked(true);
|
||||
|
@ -119,6 +119,7 @@ void LanguageFrame::changeLanguageEn()
|
|||
// QProcess::execute("export LC_ALL=C");
|
||||
// std::setlocale(LC_ALL, "C");
|
||||
unsetenv("LANG");
|
||||
setenv("LANGUAGE", "en_US.UTF-8",1);
|
||||
writeSettingIni();
|
||||
}
|
||||
|
||||
|
@ -143,6 +144,7 @@ void LanguageFrame::changeLanguageZh()
|
|||
setenv("LANG", "zh_CN.UTF-8",1);
|
||||
// QProcess::execute("export LC_ALL=\"\"");
|
||||
// std::setlocale(LC_ALL, "");
|
||||
setenv("LANGUAGE", "zh_CN.UTF-8",1);
|
||||
writeSettingIni();
|
||||
}
|
||||
|
||||
|
@ -155,7 +157,7 @@ void LanguageFrame::initLanguageBox()
|
|||
// ComboxDelegate* delegate = new ComboxDelegate;
|
||||
ComboxDelegate delegate;
|
||||
m_languageBox->setItemDelegate(&delegate);
|
||||
m_curSystenlocal = QLocale::system().name();
|
||||
m_curSystenlocal = QString(getenv("LANGUAGE")).section('.',0,0);
|
||||
QModelIndex index = m_model->getIndex(m_curSystenlocal);
|
||||
if (index.isValid()) {
|
||||
m_comboxItem = m_model->getItemLanguage(index);
|
||||
|
@ -183,29 +185,6 @@ void LanguageFrame::writeSettingIni()
|
|||
WriteSettingToIni("config", "language", m_curSystenlocal);
|
||||
}
|
||||
|
||||
void LanguageFrame::changeLanguage(int row)
|
||||
{
|
||||
QModelIndex index = m_model->index(row);
|
||||
QTranslator* curTranslator = new QTranslator;
|
||||
QString langPath = GetKylinInstallPath() + "/language/";
|
||||
if (index.isValid()) {
|
||||
ItemLanguage item = m_model->getItemLanguage(index);
|
||||
if (!m_comboxItem.systemlocal.isEmpty()) {
|
||||
if (curTranslator->load(langPath + m_curSystenlocal + ".qm")) {
|
||||
qApp->removeTranslator(curTranslator);
|
||||
}
|
||||
}
|
||||
m_comboxItem = item;
|
||||
m_curSystenlocal = item.itemname;
|
||||
if (curTranslator->load(langPath + m_curSystenlocal + ".qm")) {
|
||||
qApp->installTranslator(curTranslator);
|
||||
} else {
|
||||
qWarning() << "Failed to load Translator file.";
|
||||
}
|
||||
}
|
||||
translateStr();
|
||||
}
|
||||
|
||||
void LanguageFrame::changeEvent(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
|
|
|
@ -36,8 +36,6 @@ public:
|
|||
signals:
|
||||
void signalPageChanged(int flag);
|
||||
public slots:
|
||||
void changeLanguage(int row); //读写systemsetting.ini文件
|
||||
void changeLanguage();
|
||||
void changeLanguageEn();
|
||||
void changeLanguageZh();
|
||||
void clickNextButton();
|
||||
|
|
|
@ -513,8 +513,7 @@ void CreatePartitionFrame::changeMountFile(const QString &text)
|
|||
if(text.contains("/boot", Qt::CaseInsensitive)) {
|
||||
tipLabel->setText(tr("Recommended boot partition size is between 500MiB and 2GiB."));//boot分区大小推荐500MiB到2GiB之间
|
||||
} else if(text == "/") {
|
||||
tipLabel->setText(tr("Root partition size is greater than 15GiB, \n"
|
||||
"but Huawei machines require greater than 25GiB."));//根分区大小大于15GiB,华为机器要求大于25GiB
|
||||
tipLabel->setText(tr("Recommended Root partition size is greater than 15GiB"));//根分区大小大于15GiB,华为机器要求大于25GiB
|
||||
} else {
|
||||
tipLabel->setText("");
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ ValidateStates CustomPartitiondelegate::validate() const
|
|||
}
|
||||
efiPartition = partition;
|
||||
qint64 efi_real_bytes=partition->getByteLength();
|
||||
efi_size_enough = !(efi_real_bytes > efi_maxsize || efi_real_bytes < efi_minsize);
|
||||
// efi_size_enough = !(efi_real_bytes > efi_maxsize || efi_real_bytes < efi_minsize);
|
||||
qDebug()<<"efi_real_bytes="<<efi_real_bytes<<";efi_maxsize="<<efi_maxsize<<";efi_minsize="<<efi_minsize<<";efi_size_enough="<<efi_size_enough;
|
||||
}
|
||||
|
||||
|
@ -407,12 +407,12 @@ ValidateStates CustomPartitiondelegate::validate() const
|
|||
}
|
||||
}
|
||||
}
|
||||
if(checkSpecialModel() == 0 && bootPartition.isNull()) {
|
||||
states.append(ValidateState::BootMissing);
|
||||
}
|
||||
if(!bootPartition.isNull() && !boot_size_enough) {
|
||||
states.append(ValidateState::BootTooSmall);
|
||||
}
|
||||
// if(checkSpecialModel() == 0 && bootPartition.isNull()) {
|
||||
// states.append(ValidateState::BootMissing);
|
||||
// }
|
||||
// if(!bootPartition.isNull() && !boot_size_enough) {
|
||||
// states.append(ValidateState::BootTooSmall);
|
||||
// }
|
||||
// if(!efiPartition.isNull() && !efi_size_enough){
|
||||
// states.append(ValidateState::EfiSizeError);
|
||||
// }
|
||||
|
@ -472,9 +472,6 @@ ValidateStates CustomPartitiondelegate::validate() const
|
|||
continue;
|
||||
}
|
||||
if(knownmounts.contains(partition->m_mountPoint)) {
|
||||
if(/*partition->m_mountPoint.contains("/data") || */partition->m_mountPoint.contains("/backup")) {
|
||||
bldatabackup++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if(partition->getByteLength() < partition_minsize_bytes) {
|
||||
|
@ -482,9 +479,6 @@ ValidateStates CustomPartitiondelegate::validate() const
|
|||
}
|
||||
}
|
||||
}
|
||||
if(bldatabackup < 1) {
|
||||
states.append(ValidateState(ValidateState::DataORBackupPartition));
|
||||
}
|
||||
|
||||
//检测是否存在备份还原分区
|
||||
|
||||
|
|
|
@ -306,7 +306,8 @@ void EncryptSetFrame::markLineEditCorrect(LabelState state, bool flag)
|
|||
checkpwd1->setPixmap(QPixmap(":/res/svg/error.svg"));
|
||||
m_pwd1->m_lineEdit->setStyleSheet("QLineEdit{border-color: red }"
|
||||
"QLineEdit:hover { background: rgba(0, 0, 0, 0.15);border: 2px solid #5BADFF;}");
|
||||
m_info->setText(tr("Two password entries are inconsistent!"));
|
||||
m_info->setText(QObject::tr("Two password entries are inconsistent!"));
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -406,21 +406,20 @@ int MainPartFrame::validatePartition()
|
|||
validateMessage.append(tr("No root partition\n"));
|
||||
return 0;
|
||||
case ValidateState::RootTooSmall:
|
||||
validateMessage.append(tr("Root partition size is greater than 15GiB,\n"
|
||||
"but Huawei machines require greater than 25GiB.\n"));//根分区大小大于15GiB,华为机器要求大于25GiB
|
||||
validateMessage.append(tr("Recommended Root partition size greater than 15GiB"));//根分区大小大于15GiB,华为机器要求大于25GiB
|
||||
return 0;
|
||||
case ValidateState::PartitionTooSmall:
|
||||
validateMessage.append(tr("Partition too small\n"));
|
||||
break;
|
||||
case ValidateState::BackUpPartitionTooSmall:
|
||||
validateMessage.append(tr("BackUp partition too small\n"));
|
||||
break;
|
||||
// case ValidateState::BackUpPartitionTooSmall:
|
||||
// validateMessage.append(tr("BackUp partition too small\n"));
|
||||
// break;
|
||||
case ValidateState::RepeatedMountPoint:
|
||||
validateMessage.append(tr("Repeated mountpoint\n"));
|
||||
return 0;
|
||||
case ValidateState::DataORBackupPartition:
|
||||
validateMessage.append(tr("No backup partition\n"));
|
||||
return -1;//
|
||||
// case ValidateState::DataORBackupPartition:
|
||||
// validateMessage.append(tr("No backup partition\n"));
|
||||
// return -1;//
|
||||
// case ValidateState::HUAWEIKirin990:
|
||||
// validateMessage.append(tr("HUAWEI Kirin 990 format EFI partition to fat16"));
|
||||
// return 0;
|
||||
|
|
|
@ -354,7 +354,7 @@ void UserFrame::checkCPasswd(QString cpwd)
|
|||
else
|
||||
{
|
||||
m_cpwdstate=CPPASSWD_DIFF;
|
||||
m_cpwderr=QString(tr("Two password entries are inconsistent!"));
|
||||
m_cpwderr=(QObject::tr("Two password entries are inconsistent!"));
|
||||
}
|
||||
markLineEditCorrect();
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ void UserFrame::markLineEditCorrect()
|
|||
m_hostErrorTip->setText("");
|
||||
}
|
||||
else{
|
||||
m_hosterr=tr("Your hostname only letters,numbers,underscore and hyphen are allowed, no more than 64 bits in length.");
|
||||
m_hosterr=QObject::tr("Your hostname only letters,numbers,underscore and hyphen are allowed, no more than 64 bits in length.");
|
||||
m_hostErrorTip->setText(m_hosterr);
|
||||
}
|
||||
|
||||
|
@ -513,14 +513,14 @@ void UserFrame::translateStr()
|
|||
|
||||
|
||||
|
||||
m_mainTitle->setText(tr("Create User"));
|
||||
m_username->setPlaceholderText(tr("username"));
|
||||
m_hostname->setPlaceholderText(tr("hostname"));
|
||||
m_passwd->setPlaceholderText(tr("new password"));
|
||||
m_confirm_passwd->setPlaceholderText(tr("enter the password again"));
|
||||
m_nextBtn->setText(tr("Next"));
|
||||
pwLoginCKBox->setText(tr("Automatic login on boot"));
|
||||
fingerprinttip->setText(tr("Biometric [authentication] device detected / unified login support"));
|
||||
m_mainTitle->setText(QObject::tr("Create User"));
|
||||
m_username->setPlaceholderText(QObject::tr("username"));
|
||||
m_hostname->setPlaceholderText(QObject::tr("hostname"));
|
||||
m_passwd->setPlaceholderText(QObject::tr("new password"));
|
||||
m_confirm_passwd->setPlaceholderText(QObject::tr("enter the password again"));
|
||||
m_nextBtn->setText(QObject::tr("Next"));
|
||||
pwLoginCKBox->setText(QObject::tr("Automatic login on boot"));
|
||||
fingerprinttip->setText(QObject::tr("Biometric [authentication] device detected / unified login support"));
|
||||
|
||||
checkUserName(m_username->getLineEditText());
|
||||
checkHostName(m_hostname->getLineEditText());
|
||||
|
|
|
@ -12,7 +12,7 @@ KLinguist *KLinguist::m_linguist = nullptr;
|
|||
KLinguist::KLinguist()
|
||||
{
|
||||
trans = new QTranslator;
|
||||
currentLanguage = QLocale::system().name();
|
||||
currentLanguage = QString(getenv("LANGUAGE")).section('.',0,0);
|
||||
qDebug() << "72b:"<< currentLanguage;
|
||||
// currentLanguage = "zh_CN";
|
||||
changeLanguage(currentLanguage);
|
||||
|
|