Commit 5fe9fde0 authored by Frederik Schwarzer's avatar Frederik Schwarzer
Browse files

fix plural handling

CCMAIL: kde-i18n-doc@kde.org
parent 4ed7b902
......@@ -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 &notice, 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");
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment