Edgewall Software

Changes between Version 1 and Version 2 of Ticket #12202


Ignore:
Timestamp:
Sep 7, 2015, 6:03:19 AM (9 years ago)
Author:
Jun Omae
Comment:

(modified description to use all locales)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12202 – Description

    v1 v2  
    1111>>> from trac.util.translation import get_available_locales
    1212>>> fmts = {}
    13 >>> for locale_id in sorted(get_available_locales()):
     13>>> for locale_id in 'ca cs da de el en_GB en_US eo es es_AR es_MX et fa fi fr gl he hu hy it ja ko nb nl pl pt pt_BR ro ru sl sv tr uk vi zh_CN zh_TW'.split():
    1414...   fmt = get_datetime_format('medium', locale_id)
    1515...   fmts.setdefault(fmt, []).append(locale_id)
    1616...
    17 >>> for fmt in fmts:
     17>>> for fmt in sorted(fmts):
    1818...   print('%r => %s' % (fmt, ' '.join(fmts[fmt])))
    1919...
     20u'{0} {1}' => vi
    2021u'{1} {0}' => ca cs da de el en_GB en_US eo es es_AR es_MX et fi fr gl he hu hy it ja ko nb nl pl pt pt_BR ru sl sv tr uk zh_CN zh_TW
    2122u'{1}, {0}' => ro
     23u'{1}\u060c \u0633\u0627\u0639\u062a {0}' => fa
    2224}}}
    2325
    2426{{{#!pycon
     27>>> import babel
    2528>>> babel.__version__
    2629'1.3'
     
    2831>>> from trac.util.translation import get_available_locales
    2932>>> fmts = {}
    30 >>> for locale_id in sorted(get_available_locales()):
     33>>> for locale_id in 'ca cs da de el en_GB en_US eo es es_AR es_MX et fa fi fr gl he hu hy it ja ko nb nl pl pt pt_BR ro ru sl sv tr uk vi zh_CN zh_TW'.split():
    3134...   fmt = get_datetime_format('medium', locale_id)
    3235...   fmts.setdefault(fmt, []).append(locale_id)
    3336...
    34 >>> for fmt in fmts:
     37>>> for fmt in sorted(fmts):
    3538...   print('%r => %s' % (fmt, ' '.join(fmts[fmt])))
    3639...
    37 u'{0} {1}' => nb
     40u'{0} {1}' => nb vi
     41u'{1} - {0}' => el
    3842u'{1} {0}' => ca cs da de en_GB eo es es_AR es_MX et fi fr gl hu it ja ko nl pt pt_BR sl sv tr uk zh_CN zh_TW
    3943u'{1}, {0}' => en_US he hy pl ro ru
    40 u'{1} - {0}' => el
     44u'{1}\u060c\u200f {0}' => fa
    4145}}}