mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
plugin translations
Change-Id: Id922842e22b5b025feeb1d738d6942d5dd020c82
This commit is contained in:
parent
7e5718da45
commit
7208231084
Notes:
Deepin Code Review
2016-06-14 07:19:47 +00:00
Code-Review+2: <mr.asianwang@gmail.com> Verified+1: <mr.asianwang@gmail.com> Submitted-by: <mr.asianwang@gmail.com> Submitted-at: Thu, 08 Oct 2015 17:09:02 +0800 Reviewed-on: https://cr.deepin.io/7586 Project: dde/dde-dock Branch: refs/heads/master
@ -86,11 +86,11 @@ QString PluginItemWrapper::getMenuContent()
|
||||
bool canDisable = m_plugin->canDisable(m_id);
|
||||
|
||||
if (canRun || canDisable) {
|
||||
QJsonObject result = QJsonDocument::fromJson(menuContent.toLatin1()).object();
|
||||
QJsonObject result = QJsonDocument::fromJson(menuContent.toUtf8()).object();
|
||||
QJsonArray array = result["items"].toArray();
|
||||
|
||||
QJsonObject itemRun = createMenuItem(MenuItemRun, "Run", false, false);
|
||||
QJsonObject itemRemove = createMenuItem(MenuItemRemove, "Remove", false, false);
|
||||
QJsonObject itemRun = createMenuItem(MenuItemRun, tr("_Run"), false, false);
|
||||
QJsonObject itemRemove = createMenuItem(MenuItemRemove, tr("_Undock"), false, false);
|
||||
|
||||
if (canRun) array.insert(0, itemRun);
|
||||
if (canDisable) array.append(itemRemove);
|
||||
|
@ -37,6 +37,12 @@ int main(int argc, char *argv[])
|
||||
translator.load("/usr/share/dde-dock/translations/dde-dock_" + QLocale::system().name());
|
||||
a.installTranslator(&translator);
|
||||
|
||||
// translations from dde-control-center, used by those plugins provided by dde-control-center,
|
||||
// but below lines should be moved to individual plugins in the future.
|
||||
QTranslator translator1;
|
||||
translator1.load("/usr/share/dde-control-center/translations/dde-control-center_" + QLocale::system().name());
|
||||
a.installTranslator(&translator1);
|
||||
|
||||
LogManager::instance()->debug_log_console_on();
|
||||
LOG_INFO() << LogManager::instance()->getlogFilePath();
|
||||
|
||||
|
@ -88,6 +88,19 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PluginItemWrapper</name>
|
||||
<message>
|
||||
<location filename="../dde-dock/src/controller/plugins/pluginitemwrapper.cpp" line="92"/>
|
||||
<source>_Run</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dde-dock/src/controller/plugins/pluginitemwrapper.cpp" line="93"/>
|
||||
<source>_Undock</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PluginsSettingFrame</name>
|
||||
<message>
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.1">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>ClearTrashDialog</name>
|
||||
<message>
|
||||
@ -86,6 +88,19 @@
|
||||
<translation>通知区域设置</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PluginItemWrapper</name>
|
||||
<message>
|
||||
<location filename="../dde-dock/src/controller/plugins/pluginitemwrapper.cpp" line="92"/>
|
||||
<source>_Run</source>
|
||||
<translation>运行(R)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dde-dock/src/controller/plugins/pluginitemwrapper.cpp" line="93"/>
|
||||
<source>_Undock</source>
|
||||
<translation>移除驻留(U)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PluginsSettingFrame</name>
|
||||
<message>
|
||||
@ -107,4 +122,4 @@
|
||||
<translation>清空</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
</TS>
|
||||
|
Loading…
x
Reference in New Issue
Block a user