mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix:Task bar power plugin, get charging time if 0, need to prompt is in the calculation
任务栏电源插件,获取充电时间如果为0,需要提示正在计算中,产品回复计算中用“....”表示
This commit is contained in:
parent
26aac7425b
commit
dfda7f325e
@ -235,8 +235,10 @@ void PowerPlugin::refreshTipsData()
|
||||
uint hour = time.toString("hh").toUInt();
|
||||
uint min = time.toString("mm").toUInt();
|
||||
QString tips;
|
||||
|
||||
if (hour == 0) {
|
||||
if(timeToFull == 0) {
|
||||
tips = tr("Charging %1 ....").arg(value);
|
||||
}
|
||||
else if (hour == 0) {
|
||||
tips = tr("Charging %1, %2 min until full").arg(value).arg(min);
|
||||
}
|
||||
else {
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="en" version="2.1">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en">
|
||||
<context>
|
||||
<name>AbstractPluginsController</name>
|
||||
<message>
|
||||
@ -213,6 +215,10 @@
|
||||
<source>Charging %1, %2 hr %3 min until full</source>
|
||||
<translation>Charging %1, %2 hr %3 min until full</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Charging %1 ....</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ShowDesktopPlugin</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user