[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: =?utf-8?q?=5Bkde-workspace=5D_powerdevil/daemon=3A_fix_plural_ha?=
From: Frederik Schwarzer <schwarzerf () gmail ! com>
Date: 2011-01-31 20:15:54
Message-ID: 20110131201554.20257A6094 () git ! kde ! org
[Download RAW message or body]
Git commit c167ff52b03273518645db8dcbd8b124ddd0e44d by Frederik Schwarzer.
Pushed by schwarzer into branch 'master'.
fix plural handling
CCMAIL: kde-i18n-doc@kde.org
M +31 -19 powerdevil/daemon/powerdevilcore.cpp
http://commits.kde.org/a5d5b61a/c167ff52b03273518645db8dcbd8b124ddd0e44d
diff --git a/powerdevil/daemon/powerdevilcore.cpp \
b/powerdevil/daemon/powerdevilcore.cpp index 45e128a..5b01341 100644
--- a/powerdevil/daemon/powerdevilcore.cpp
+++ b/powerdevil/daemon/powerdevilcore.cpp
@@ -192,31 +192,43 @@ void Core::checkBatteryStatus()
i != m_backend->capacities().constEnd(); ++i) {
if (i.value() < 50) {
// Notify, we have a broken battery.
- emitNotification("brokenbattery", i18np("Your battery capacity is %2%. \
This means your battery is broken "
- "and needs a replacement. Please \
contact your hardware vendor for more details.",
-
- "One of your batteries (ID %3) \
has a capacity of %2%. This means it is broken "
- "and needs a replacement. Please \
contact your hardware vendor for more details.",
- m_loadedBatteriesUdi.size(), \
i.value(), i.key()),
- "dialog-warning");
+ if (m_loadedBatteriesUdi.size() == 1) {
+ emitNotification("brokenbattery",
+ i18n("Your battery capacity is %1%. This means your \
battery is broken and " + "needs a replacement. \
Please contact your hardware vendor for more details.", + \
i.value()), + "dialog-warning");
+ } else {
+ emitNotification("brokenbattery",
+ i18n("One of your batteries (ID %2) has a capacity \
of %1%. This means it is broken " + "and needs a \
replacement. Please contact your hardware vendor for more details.", + \
i.value(), i.key()), + "dialog-warning");
+ }
}
}
// Any recalled batteries?
foreach (const BackendInterface::RecallNotice ¬ice, \
m_backend->recallNotices()) { // Notify, a battery has been recalled
- emitNotification("brokenbattery", i18np("Your battery might have been \
recalled by %2. Usually, when vendors recall the "
- "hardware, it is because of factory \
defects which are usually eligible for a "
- "free repair or substitution. Please \
check <a href=\"%3\">%2's website</a> to "
- "verify if your battery is \
faulted.",
-
- "One of your batteries (ID %4) might \
have been recalled by %2. "
- "Usually, when vendors recall the \
hardware, it is because of factory defects "
- "which are usually eligible for a \
free repair or substitution. "
- "Please check <a href=\"%3\">%2's \
website</a> to "
- "verify if your battery is \
faulted.",
- m_loadedBatteriesUdi.size(), \
notice.vendor, notice.url, notice.batteryId),
- "dialog-warning");
+ if (m_loadedBatteriesUdi.size() == 1) {
+ emitNotification("brokenbattery",
+ i18n("Your battery might have been recalled by %1. \
Usually, when vendors recall the " + "hardware, it \
is because of factory defects which are usually eligible for a " + \
"free repair or substitution. Please check <a href=\"%2\">%1's website</a> to " + \
"verify if your battery is faulted.", + \
notice.vendor, notice.url), + "dialog-warning");
+ } else {
+ emitNotification("brokenbattery",
+ i18n("One of your batteries (ID %3) might have been \
recalled by %1. " + "Usually, when vendors recall \
the hardware, it is because of factory defects " + \
"which are usually eligible for a free repair or substitution. " + \
"Please check <a href=\"%2\">%1's website</a> to " + \
"verify if your battery is faulted.", + \
notice.vendor, notice.url, notice.batteryId), + \
"dialog-warning"); + }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic