修改翻译方式

This commit is contained in:
jzxc95 2022-09-05 09:50:18 +08:00
parent 6b56647cfe
commit 9210e6c5c7
2 changed files with 100 additions and 2 deletions

View File

@ -4,7 +4,8 @@
KylinAgent::KylinAgent(QObject *parent) : QObject(parent)
{
QString locale = QLocale::system().name();
QLocale local;
QString locale = /*QLocale::system().*/local.name();
QTranslator* translator = new QTranslator(this);
if (translator->load(":/translations/kylin-keyring_"+ locale + ".qm")) {
QApplication::installTranslator(translator);

View File

@ -603,6 +603,94 @@ static const unsigned char qt_resource_data[] = {
0x0,0x6,0x0,0x0,0x0,0xa,0x75,0x73,0x65,0x72,0x41,0x6e,0x64,0x50,0x77,0x64,
0x7,0x0,0x0,0x0,0x10,0x4b,0x79,0x6c,0x69,0x6e,0x53,0x65,0x63,0x72,0x65,0x74,
0x41,0x67,0x65,0x6e,0x74,0x1,
// /home/crush/project/kylin-nm-dev/kylin-keyring/translations/kylin-keyring_bo_CN.qm
0x0,0x0,0x5,0x47,
0x3c,
0xb8,0x64,0x18,0xca,0xef,0x9c,0x95,0xcd,0x21,0x1c,0xbf,0x60,0xa1,0xbd,0xdd,0x42,
0x0,0x0,0x0,0x58,0x3,0x4b,0x57,0xb5,0x0,0x0,0x1,0xd8,0x4,0x98,0x49,0xbc,
0x0,0x0,0x0,0x7f,0x6,0x83,0x5e,0x14,0x0,0x0,0x4,0x6a,0x7,0x21,0xfd,0x94,
0x0,0x0,0x1,0x24,0x7,0x97,0x97,0x41,0x0,0x0,0x3,0xd2,0x8,0xaa,0xe1,0xe4,
0x0,0x0,0x2,0xd1,0xa,0x65,0x4b,0xe4,0x0,0x0,0x0,0xca,0xc,0x47,0x3c,0xa5,
0x0,0x0,0x3,0x7e,0xc,0x67,0xa8,0xa1,0x0,0x0,0x3,0x1e,0xf,0x73,0xac,0x43,
0x0,0x0,0x0,0x0,0xf,0x8f,0xc6,0x49,0x0,0x0,0x2,0x50,0x69,0x0,0x0,0x4,
0xd5,0x3,0x0,0x0,0x0,0x42,0x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f,0x42,0xf,0x66,0xf,0x63,0xf,0xb,0xf,0x60,0xf,0x51,0xf,0x7a,0xf,0x56,
0xf,0x66,0xf,0xb,0xf,0x46,0xf,0xb,0xf,0x60,0xf,0x55,0xf,0xb2,0xf,0x72,
0xf,0x53,0xf,0xd,0x8,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x1d,0x6b,0x79,
0x6c,0x69,0x6e,0x20,0x6e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x20,0x64,0x65,0x73,0x6b,
0x74,0x6f,0x70,0x20,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x7,0x0,0x0,0x0,0x10,
0x4b,0x79,0x50,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x44,0x69,0x61,0x6c,0x6f,0x67,
0x1,0x3,0x0,0x0,0x0,0x3c,0xf,0x42,0xf,0x66,0xf,0x44,0xf,0xb,0xf,0x56,
0xf,0xb,0xf,0x51,0xf,0x44,0xf,0xb,0xf,0x42,0xf,0x66,0xf,0x44,0xf,0xb,
0xf,0x56,0xf,0x60,0xf,0x72,0xf,0xb,0xf,0x63,0xf,0xa1,0xf,0x7a,0xf,0xb,
0xf,0x58,0xf,0x72,0xf,0x42,0xf,0xb,0xf,0x51,0xf,0x42,0xf,0x7c,0xf,0x66,
0xf,0xd,0x8,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x20,0x6e,0x65,0x65,0x64,
0x73,0x20,0x70,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x20,0x6f,0x72,0x20,0x65,0x6e,
0x63,0x72,0x79,0x70,0x74,0x69,0x6f,0x6e,0x20,0x6b,0x65,0x79,0x7,0x0,0x0,0x0,
0x10,0x4b,0x79,0x50,0x61,0x73,0x73,0x77,0x6f,0x72,0x64,0x44,0x69,0x61,0x6c,0x6f,
0x67,0x1,0x3,0x0,0x0,0x0,0x20,0xf,0x42,0xf,0x66,0xf,0x44,0xf,0xb,0xf,
0x56,0xf,0x60,0xf,0x72,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0x41,0x67,0x65,0x6e,0x74,0x1,
};
@ -623,6 +711,12 @@ static const unsigned char qt_resource_name[] = {
0x0,0x6b,
0x0,0x79,0x0,0x6c,0x0,0x69,0x0,0x6e,0x0,0x2d,0x0,0x6b,0x0,0x65,0x0,0x79,0x0,0x72,0x0,0x69,0x0,0x6e,0x0,0x67,0x0,0x5f,0x0,0x7a,0x0,0x68,0x0,0x5f,
0x0,0x43,0x0,0x4e,0x0,0x2e,0x0,0x71,0x0,0x6d,
// kylin-keyring_bo_CN.qm
0x0,0x16,
0x4,0xc8,0x4b,0xfd,
0x0,0x6b,
0x0,0x79,0x0,0x6c,0x0,0x69,0x0,0x6e,0x0,0x2d,0x0,0x6b,0x0,0x65,0x0,0x79,0x0,0x72,0x0,0x69,0x0,0x6e,0x0,0x67,0x0,0x5f,0x0,0x62,0x0,0x6f,0x0,0x5f,
0x0,0x43,0x0,0x4e,0x0,0x2e,0x0,0x71,0x0,0x6d,
};
@ -634,8 +728,11 @@ static const unsigned char qt_resource_struct[] = {
0x0,0x0,0x0,0x1e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
0x0,0x0,0x1,0x80,0xdf,0x58,0x2d,0xf4,
// :/translations
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x3,
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x3,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
// :/translations/kylin-keyring_bo_CN.qm
0x0,0x0,0x0,0x70,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x24,0xd5,
0x0,0x0,0x1,0x82,0xce,0x6d,0x8b,0x37,
// :/translations/kylin-keyring_zh_CN.qm
0x0,0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x21,0x8a,
0x0,0x0,0x1,0x81,0x4b,0xbe,0x4f,0x40,