Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 357878 Details for
Bug 482034
www-apps/trac-1.0.1 - migrate to distutils-r1.eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/trac-1.0.1-changeset_11776.diff
trac-1.0.1-changeset_11776.diff (text/plain), 1.67 KB, created by
Bertrand Jacquin
on 2013-09-04 22:22:00 UTC
(
hide
)
Description:
files/trac-1.0.1-changeset_11776.diff
Filename:
MIME Type:
Creator:
Bertrand Jacquin
Created:
2013-09-04 22:22:00 UTC
Size:
1.67 KB
patch
obsolete
>------------------------------------------------------------------------ >r11776 | jomae | 2013-04-10 15:12:49 +0200 (Wed, 10 Apr 2013) | 4 lines > >1.0.2dev: search locale with territory in preferred languages for "first week day" before using `babel.core.LOCALE_ALIASES` > >A part of #10757. > > >Index: trac/util/datefmt.py >=================================================================== >--- trac/util/datefmt.py (revision 11775) >+++ trac/util/datefmt.py (revision 11776) >@@ -32,7 +32,7 @@ > return [] > else: > from babel import Locale >- from babel.core import LOCALE_ALIASES >+ from babel.core import LOCALE_ALIASES, UnknownLocaleError > from babel.dates import ( > format_datetime as babel_format_datetime, > format_date as babel_format_date, >@@ -373,6 +373,19 @@ > if locale == 'iso8601': > return 1 # Monday > if babel and locale: >+ if not locale.territory: >+ # search first locale which has the same `langauge` and territory >+ # in preferred languages >+ for l in req.languages: >+ l = l.replace('-', '_').lower() >+ if l.startswith(locale.language.lower() + '_'): >+ try: >+ l = Locale.parse(l) >+ if l.territory: >+ locale = l >+ break >+ except UnknownLocaleError: >+ pass > if not locale.territory and locale.language in LOCALE_ALIASES: > locale = Locale.parse(LOCALE_ALIASES[locale.language]) > return (locale.first_week_day + 1) % 7 > >------------------------------------------------------------------------
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 482034
:
356648
|
356650
|
356652
|
357850
|
357858
|
357860
|
357862
|
357864
|
357866
|
357868
|
357870
|
357872
|
357874
|
357876
| 357878 |
357880
|
357882
|
357884
|
357886
|
357888
|
376934
|
377034
|
377036
|
377038