mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 21:02:04 +08:00
添加翻译(终于)
This commit is contained in:
12
src/main.cpp
12
src/main.cpp
@@ -1,5 +1,6 @@
|
||||
#include <QApplication>
|
||||
#include <QPushButton>
|
||||
#include <QTranslator>
|
||||
#include <spklogging.h>
|
||||
#include "spkui_general.h"
|
||||
#include "spkstore.h"
|
||||
@@ -16,6 +17,17 @@ int main(int argc, char *argv[])
|
||||
|
||||
QString LogPath = "";
|
||||
|
||||
QTranslator tr;
|
||||
QLocale loc;
|
||||
QString trDir;
|
||||
#ifndef NDEBUG
|
||||
trDir = ".";
|
||||
#else // Translation files (zh.qm etc) installed to this path!
|
||||
trDir = "/usr/share/spark-store/translations/";
|
||||
#endif
|
||||
if(tr.load(loc, "", "", "."))
|
||||
a.installTranslator(&tr);
|
||||
|
||||
SpkStore store(false, LogPath);
|
||||
|
||||
// SpkDownloadMgr dl;
|
||||
|
||||
Reference in New Issue
Block a user