#11637 closed (fixed)
Formats missing for most locales
Reported by: | Marc Garcia | Owned by: | Jannis Leidel |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | i18n-rf | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
In [11377] incomplete formats for every locale has been added to Django. It's pending that translators complete those formats files, to be able to format data correctly for every locale.
Attachments (14)
Change History (30)
Changed 14 years ago by
Attachment: | no_format.diff added |
---|
Changed 14 years ago by
Attachment: | formats_ka.patch added |
---|
Georgian localization of date/time formats
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Attached the Korean patch formats-ko-11034.py, based on revision [source:root/django/branches/soc2009/i18n-improvements/django/conf/locale/ko/formats.py]
Changed 14 years ago by
Attachment: | formats-ko-11304.py added |
---|
comment:3 Changed 14 years ago by
Triage Stage: | Unreviewed → Accepted |
---|
Changed 14 years ago by
Attachment: | 01-formats_sr_and_sr-latn.diff added |
---|
formats for Serbian and Serbian latin
comment:4 Changed 14 years ago by
Keywords: | i18n-rf added |
---|---|
milestone: | → 1.2 |
Owner: | changed from Marc Garcia to Jannis Leidel |
Status: | new → assigned |
comment:5 Changed 14 years ago by
Patch needs improvement: | set |
---|---|
Summary: | [soc2009/i18n] Formats missing for most locales → Formats missing for most locales |
comment:6 Changed 14 years ago by
I've added all formats up to 01-formats_sr_and_sr-latn.diff to trunk in r11964.
Changed 14 years ago by
Attachment: | 11637-es-ar-deactivate-tests.diff added |
---|
Argentinina formats, plus other test changes
comment:7 Changed 14 years ago by
Week starts on Sundays on Argentina, that's the only item that differs from the 'es'
formats.py but warrants creation of a es_AR/formats.py
.
This led to the following sequence:
- Now that
es_AR/formats.py exists
, [source:trunk/tests/regressiontests/i18n/tests.py?rev=11964#L287 this test] (test_dates_and_numbers
) can't usees-ar
anymore to verify the fallback toes
. Changed it toes-us
(just like we are doing in the tests for theAccept-Language
HTTP header tests.) - This led to this test failure:
====================================================================== FAIL: test_dates_and_numbers (regressiontests.i18n.tests.TranslationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/r/django/es_ar_fmts/tests/regressiontests/i18n/tests.py", line 288, in test_dates_and_numbers self.assertEqual(u'31 de Diciembre de 2009', date_format(d)) AssertionError: u'31 de Diciembre de 2009' != u'31 de diciembre de 2009'
This is because previously even when the es_AR formats file didn't exist and the formats machinery was falling back to es
, the 'F'
format specifier still used the es_AR
translation (Django es
translation of December is diciembre', es_AR
translation is 'Diciembre'). I don't know if this can be considered a bug and didn't pursue it further. I corrected the test by just changing the expected string to contain 'diciembre'.
- The above test failure causes also this other one:
====================================================================== FAIL: test_lazy_objects (regressiontests.i18n.tests.TranslationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/r/django/es_ar_fmts/tests/regressiontests/i18n/tests.py", line 13, in test_lazy_objects self.assertEqual(u'Add Ringo', s % d) AssertionError: u'Add Ringo' != u'A\xf1adir Ringo'
This is because the assertEqual
-generated exception left an activate()
call not paired with a deactivate()
call and the next test (in this case test_lazy_objects
) got an unclean environment. I solved this by putting the assert*
calls after an activate()
call inside try blocks with deactivate
in the finally
branch.
I can split the patch in two if needed and put the 'non-es-ar formats' part on another ticket.
Changed 14 years ago by
Attachment: | 11637-cs.diff added |
---|
comment:8 Changed 14 years ago by
comment:9 Changed 14 years ago by
comment:10 Changed 14 years ago by
comment:11 Changed 14 years ago by
Have just tried uploading en_GB patch, but am getting Internal Server Errors! Will keep trying...
It includes formats for British English (and therefore Australian, etc) and necessary code to initialise the new locale.
Changed 14 years ago by
Test upload; ignore. Debugging Internal Server Error in djangoproject.com.
Changed 14 years ago by
Attachment: | en_GB.diff added |
---|
British English (and therefore Australian, etc) formats (+ locale init)
comment:15 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Closing this now since we are close to the 1.2 rc. Format updates should be dealt with like any other contribution.
Norwegian (bokmal) formats