power: indicate 1 hour remaining correctly

Before 60 minutes remaining were displayed
as "0 minutes" now it is "1 hour".

https://bugzilla.gnome.org/show_bug.cgi?id=687958
This commit is contained in:
Sebastian Keller 2012-11-09 05:09:53 +01:00 committed by Bastien Nocera
parent 6f2da1baf1
commit e757b06987

View File

@ -96,7 +96,7 @@ const Indicator = new Lang.Class({
let minutes = time % 60;
let hours = Math.floor(time / 60);
let timestring;
if (time > 60) {
if (time >= 60) {
if (minutes == 0) {
timestring = ngettext("%d hour remaining", "%d hours remaining", hours).format(hours);
} else {