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 ec1a13a325
commit f7423967b6

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 {