fix: 修复任务栏上应用右键菜单存在英文的问题
修复任务栏上应用右键菜单存在英文的问题 Log: Task: https://pms.uniontech.com/task-view-146103.html Influence: 任务栏应用右键菜单语言显示正常 Change-Id: I4ea46b1ee756be66f9a2dc5cf00b692d6e335634
This commit is contained in:
@ -741,7 +741,7 @@ AppMenuItem Entry::getMenuItemLaunch()
|
||||
if (hasWindow()) {
|
||||
itemName = getName();
|
||||
} else {
|
||||
itemName = "Open";
|
||||
itemName = tr("Open");
|
||||
}
|
||||
|
||||
AppMenuAction fn = [this](uint32_t timestamp) {
|
||||
@ -780,7 +780,7 @@ AppMenuItem Entry::getMenuItemCloseAll()
|
||||
};
|
||||
|
||||
AppMenuItem item;
|
||||
item.text = "Close All";
|
||||
item.text = tr("Close All");
|
||||
item.action = fn;
|
||||
item.isActive = true;
|
||||
return item;
|
||||
@ -795,7 +795,7 @@ AppMenuItem Entry::getMenuItemForceQuit()
|
||||
};
|
||||
|
||||
AppMenuItem item;
|
||||
item.text = "Force Quit";
|
||||
item.text = tr("Force Quit");
|
||||
item.action = fn;
|
||||
item.isActive = active;
|
||||
return item;
|
||||
@ -817,7 +817,7 @@ AppMenuItem Entry::getMenuItemForceQuitAndroid()
|
||||
}
|
||||
|
||||
AppMenuItem item;
|
||||
item.text = "Force Quit";
|
||||
item.text = tr("Force Quit");
|
||||
item.action = fn;
|
||||
item.isActive = active;
|
||||
return item;
|
||||
@ -826,7 +826,7 @@ AppMenuItem Entry::getMenuItemForceQuitAndroid()
|
||||
AppMenuItem Entry::getMenuItemDock()
|
||||
{
|
||||
AppMenuItem item;
|
||||
item.text = "Dock";
|
||||
item.text = tr("Dock");
|
||||
item.action = [this](uint32_t) {
|
||||
qInfo() << "do MenuItem: Dock";
|
||||
requestDock();
|
||||
@ -839,7 +839,7 @@ AppMenuItem Entry::getMenuItemDock()
|
||||
AppMenuItem Entry::getMenuItemUndock()
|
||||
{
|
||||
AppMenuItem item;
|
||||
item.text = "Undock";
|
||||
item.text = tr("Undock");
|
||||
item.action = [this](uint32_t) {
|
||||
qInfo() << "do MenuItem: Undock";
|
||||
requestUndock();
|
||||
@ -852,7 +852,7 @@ AppMenuItem Entry::getMenuItemUndock()
|
||||
AppMenuItem Entry::getMenuItemAllWindows()
|
||||
{
|
||||
AppMenuItem item;
|
||||
item.text = "All Windows";
|
||||
item.text = tr("All Windows");
|
||||
item.action = [this](uint32_t) {
|
||||
qInfo() << "do MenuItem: All Windows";
|
||||
presentWindows();
|
||||
|
@ -59,4 +59,6 @@ target_include_directories(deepin-application-manager PUBLIC
|
||||
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# binary file
|
||||
install(TARGETS deepin-application-manager DESTINATION bin)
|
||||
|
||||
|
@ -72,6 +72,10 @@ int main(int argc, char *argv[])
|
||||
DLogManager::registerConsoleAppender();
|
||||
DLogManager::registerFileAppender();
|
||||
|
||||
QTranslator *translator = new QTranslator();
|
||||
translator->load(QString("/usr/share/dde-application-manager/translations/dde-application-manager_%1.qm").arg(QLocale::system().name()));
|
||||
QCoreApplication::installTranslator(translator);
|
||||
|
||||
new AppManager(ApplicationManager::instance());
|
||||
new LauncherManager(ApplicationManager::instance());
|
||||
new DockManager(ApplicationManager::instance());
|
||||
|
Reference in New Issue
Block a user