History: time not in correct form

Bug #672229 reported by Greg A
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-center (Ubuntu)
Fix Released
Low
Robert Roth

Bug Description

Binary package hint: software-center

According to the wiki [1] ' The time should be of the form “4:08 PM”. ' however in the 10.10 Software Centre the form "19:21:38" is used. I certainly believe the seconds should be removed, presumably the 12 hour clock was also chosen for a reason.

Note: I guess the ideal would be to read this from a system wide setting somewhere.

[1] https://wiki.ubuntu.com/SoftwareCenter#History section

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: software-center 3.0.5
ProcVersionSignature: Ubuntu 2.6.35-23.37-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic i686
Architecture: i386
Date: Sun Nov 7 17:54:34 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100803.1)
PackageArchitecture: all
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: software-center

Related branches

Revision history for this message
Greg A (etulfetulf) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

IIRC, when I implemented the history view I didn't fully respect the specification because of the lack of a way to express the time in a localized form without including the seconds.

All python offers is the "%X" format [1]: "locale’s appropriate time representation".

As to using the 12 hour clock, it's not correct in all locales, so I expect the specification implicitly means "where applicable". mpt, can you confirm?

[1] http://docs.python.org/library/time.html#time.strftime

Changed in software-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

It seems that a common, clean solution to overcome python's limitations is to do the following:

    t.strftime(_('%H:%M'))

and have translators for each language provide the suitable format for the string, e.g. '%I:M %p' for en_US, and '%H:%M' for fr_FR.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Note that if British English is considered as the default (untranslated) language for the UI, then to honour the specification the default format to be localized by translators should be '%I:M %p', not '%H:%M'.

Also note that an explicit comment should be added for translators to understand what is expected.

Kiwinote (kiwinote)
Changed in software-center (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Robert Roth (evfool)
Changed in software-center (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Robert Roth (evfool)
Revision history for this message
Robert Roth (evfool) wrote :

In fact, '%I:%M %p' is still not the best option, as the hour is zero-padded, thus does not exactly match the "5:44 PM" specified in the specs, it will look like "05:44 PM". Does anyone know of a way how to use space-padded hours instead of 0-padded?

Robert Roth (evfool)
Changed in software-center (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.7 KiB)

This bug was fixed in the package software-center - 3.1.25

---------------
software-center (3.1.25) natty; urgency=low

  [ Kiwinote ]
  * data/ui/SoftwareCenter.ui:
    - mark the back/forward actions as translatable (LP: #742129)
  * softwarecenter/db/database.py,
    softwarecenter/models/appstore.py,
    softwarecenter/view/availablepane.py,
    others:
    - make custom lists work (LP: #712903)
  * softwarecenter/app.py,
    softwarecenter/distro/Ubuntu.py,
    softwarecenter/view/widgets/pathbar_gtk_atk.py:
    - when the supported filter is set to supported_only, navigate up if:
      - we are in a details view of an app which is not supported (LP: #480827)
      - we are in a list view which becomes empty
  * softwarecenter/app.py,
    softwarecenter/view/catview_gtk.py:
    - correctly count the nr of apps displayed in the recommended category and
      update it when needed (LP: #735634)
    - only display subcategories if they are non-empty (LP: #419270)
  * softwarecenter/backend/weblive.py:
    - don't crash if we try to delete a non-existent file (LP: #743511)
  * softwarecenter/db/reviews.py,
    softwarecenter/distro/Ubuntu.py:
    - fallback to ReviewLoaderJsonAsync when we can't use multiprocessing
      (LP: #741069)
    - fixes to make ReviewLoaderJsonAsync 'work' (ie most common cases)
  * softwarecenter/db/update.py:
    - don't import softwarecenter.log
  * softwarecenter/view/appdetailsview_gtk.py:
    - don't draw random boxes when we have an error layout (LP: #739269)
    - retire share button as we now have full microblogging support in the
      review dialog (LP: #592619, LP: #743765)
  * softwarecenter/view/appview.py:
    - correctly refresh listview when supported filters are changed
  * softwarecenter/view/catview.py:
    - if a category has subcategories, then category.query should include all
      items included in the subcategories, not a subset of these
  * softwarecenter/view/widgets/pathbar_gtk_atk.py:
    - avoid having a half-height pathbar (LP: #743614)
  * refresh .pot file

  [ Gary Lasker ]
  * softwarecenter/view/widgets/reviews.py:
    - fix crash if app_version is not defined when
      calling upstream_version_compare (LP: #746120)
  * softwarecenter/view/purchaseview.py:
    - disconnect webkit signal handlers when the webkit view
      is not showing (LP: #696861)
    - support 'user_cancelled' from the software-center-agent
      (LP: #641321)
  * softwarecenter/view/softwarepane.py,
    softwarecenter/view/widgets/actionbar.py:
    - animate the action bar show/hide
  * softwarecenter/view/appview.py:
    - in the AppViewFilter, also consider apps in the for-purchase
      channel as available; this allows them to show up in
      e.g. What's New (LP: #746679)

  [ Michael Vogt ]
  * softwarecenter/db/update.py:
    - ensure the iconname that comes from the software-center-agent
      does not contain a ".", the icon cache gets confused otherwise
  * merged lp:~evfool/software-center/sfix672229, many thanks to
    Robert Roth (LP: #672229)
  * merged lp:~alexeftimie/software-center/fix-704719-briefly-wrong-display,
    many thanks to Alex Eftimie (LP: #704719)
  * softwarecenter/view/purc...

Read more...

Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.