# HG changeset patch # User jruigrok # Date 1248861632 0 # Node ID c92473b5141197440a572f0b9e50eaff05eb7829 # Parent 622c4ecce7f70035d5c868c63f71fce366dea19f First changes to accomodate CLDR 1.7's changes. diff --git a/babel/core.py b/babel/core.py --- a/babel/core.py +++ b/babel/core.py @@ -572,7 +572,7 @@ >>> Locale('en', 'US').date_formats['short'] >>> Locale('fr', 'FR').date_formats['long'] - + :type: `dict` """) diff --git a/babel/dates.py b/babel/dates.py --- a/babel/dates.py +++ b/babel/dates.py @@ -123,9 +123,9 @@ format. >>> get_date_format(locale='en_US') - + >>> get_date_format('full', locale='de_DE') - + :param format: the format to use, one of "full", "long", "medium", or "short" @@ -160,7 +160,7 @@ >>> get_time_format(locale='en_US') >>> get_time_format('full', locale='de_DE') - + :param format: the format to use, one of "full", "long", "medium", or "short" @@ -473,7 +473,7 @@ >>> from pytz import timezone >>> format_datetime(dt, 'full', tzinfo=timezone('Europe/Paris'), ... locale='fr_FR') - u'dimanche 1 avril 2007 17:30:00 HEC' + u'dimanche 1 avril 2007 17:30:00 Heure avanc\u00e9e de l\u2019Europe centrale' >>> format_datetime(dt, "yyyy.MM.dd G 'at' HH:mm:ss zzz", ... tzinfo=timezone('US/Eastern'), locale='en') u'2007.04.01 AD at 11:30:00 EDT' @@ -531,7 +531,7 @@ >>> tzinfo = timezone('Europe/Paris') >>> t = tzinfo.localize(t) >>> format_time(t, format='full', tzinfo=tzinfo, locale='fr_FR') - u'15:30:00 HEC' + u'15:30:00 Heure avanc\u00e9e de l\u2019Europe centrale' >>> format_time(t, "hh 'o''clock' a, zzzz", tzinfo=timezone('US/Eastern'), ... locale='en') u"09 o'clock AM, Eastern Daylight Time" @@ -552,10 +552,10 @@ >>> t = time(15, 30) >>> format_time(t, format='full', tzinfo=timezone('Europe/Paris'), ... locale='fr_FR') - u'15:30:00 HEC' + u'15:30:00 Heure normale de l\u2019Europe centrale' >>> format_time(t, format='full', tzinfo=timezone('US/Eastern'), ... locale='en_US') - u'3:30:00 PM ET' + u'3:30:00 PM Eastern Standard Time' :param time: the ``time`` or ``datetime`` object; if `None`, the current time in UTC is used @@ -604,9 +604,9 @@ """Return a time delta according to the rules of the given locale. >>> format_timedelta(timedelta(weeks=12), locale='en_US') - u'3 months' + u'3 mths' >>> format_timedelta(timedelta(seconds=1), locale='es') - u'1 segundo' + u'1 s' The granularity parameter can be provided to alter the lowest unit presented, which defaults to a second. @@ -622,7 +622,7 @@ >>> format_timedelta(timedelta(hours=23), threshold=0.9, locale='en_US') u'1 day' >>> format_timedelta(timedelta(hours=23), threshold=1.1, locale='en_US') - u'23 hours' + u'23 hrs' :param delta: a ``timedelta`` object representing the time difference to format, or the delta in seconds as an `int` value diff --git a/babel/support.py b/babel/support.py --- a/babel/support.py +++ b/babel/support.py @@ -93,7 +93,7 @@ >>> fmt = Format('en_US') >>> fmt.timedelta(timedelta(weeks=11)) - u'3 months' + u'3 mths' :see: `babel.dates.format_timedelta` """ diff --git a/babel/tests/dates.py b/babel/tests/dates.py --- a/babel/tests/dates.py +++ b/babel/tests/dates.py @@ -201,7 +201,7 @@ tz = timezone('Europe/Paris') t = time(15, 30, tzinfo=tz) fmt = dates.DateTimeFormat(t, locale='fr_FR') - self.assertEqual(u'heure d’Europe centrale', fmt['vvvv']) + self.assertEqual(u'Heure de l\u2019Europe centrale', fmt['vvvv']) def test_hour_formatting(self): l = 'en_US'