power: Display single digit minutes correctly

https://bugzilla.gnome.org/show_bug.cgi?id=705803
This commit is contained in:
Sebastian Keller 2013-08-11 19:54:22 +02:00 committed by Jasper St. Pierre
parent c1fb1ba94c
commit 0bbb2786f8

View File

@ -72,12 +72,12 @@ const Indicator = new Lang.Class({
if (state == UPower.DeviceState.DISCHARGING) { if (state == UPower.DeviceState.DISCHARGING) {
// Translators: this is <hours>:<minutes> Remaining (<percentage>) // Translators: this is <hours>:<minutes> Remaining (<percentage>)
return _("%d\u2236%d Remaining (%d%%)".format(hours, minutes, percentage)); return _("%d\u2236%02d Remaining (%d%%)".format(hours, minutes, percentage));
} }
if (state == UPower.DeviceState.CHARGING) { if (state == UPower.DeviceState.CHARGING) {
// Translators: this is <hours>:<minutes> Until Full (<percentage>) // Translators: this is <hours>:<minutes> Until Full (<percentage>)
return _("%d\u2236%d Until Full (%d%%)".format(hours, minutes, percentage)); return _("%d\u2236%02d Until Full (%d%%)".format(hours, minutes, percentage));
} }
// state is one of PENDING_CHARGING, PENDING_DISCHARGING // state is one of PENDING_CHARGING, PENDING_DISCHARGING