GNOME Bugzilla – Bug 635728
Power Status Indicator: Show remaining battery time in hours:minutes
Last modified: 2010-12-01 23:50:58 UTC
Right now the power status indicator shows the remaining battery time only in minutes. Would be better to show it in hours and minutes. 192 minutes remaining is quite unreadable.
Created attachment 175322 [details] [review] PowerStatus: show separate hour and minutes for primary device Show "%d hours %d minutes" instead of "%d minutes", for better readability.
Comment on attachment 175322 [details] [review] PowerStatus: show separate hour and minutes for primary device >+ timestring = Gettext.ngettext("%d hour", "%d hours", minutes / 60).format(minutes / 60); >+ if (minutes % 60 != 0) >+ timestring += ' ' + Gettext.ngettext("%d minute", "%d minutes", minutes % 60).format(minutes % 60); Concatenating multiple calls to gettext together and assuming the result will be grammatical is generally guaranteed to fail for some language. Look at how gnome-power-manager/src/gpm-common.c:gpm_get_timestring() does it.
Created attachment 175541 [details] [review] PowerStatus: show separate hour and minutes for primary device Show "%d hours %d minutes" instead of "%d minutes", for better readability.
Comment on attachment 175541 [details] [review] PowerStatus: show separate hour and minutes for primary device good. oh, it looks like js/ui/status/power.js isn't listed in po/POTFILES.in, so please fix that too
Created attachment 175682 [details] [review] Fix display of remaining time When there is less than an hour remaining, there was a format() call missing which made the power status menu display "%d minutes remaining".
Review of attachment 175682 [details] [review]: Makes sense
Attachment 175682 [details] pushed as 7b73df7 - Fix display of remaining time