Opened 15 years ago

Closed 14 years ago

Last modified 12 years ago

#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)

no_format.diff (1.9 KB ) - added by Jon 15 years ago.
Norwegian (bokmal) formats
pt_BR_format.diff (1.8 KB ) - added by Guilherme Gondim <semente@…> 15 years ago.
Brazilian Portuguese formats
formats_ka.patch (2.1 KB ) - added by David Avsajanishvili 15 years ago.
Georgian localization of date/time formats
formats-ko-11304.py (2.0 KB ) - added by Spike^ekipS 15 years ago.
formats_nl.diff (3.2 KB ) - added by Rudolph Froger 15 years ago.
Dutch formats.py patch
locale_de.patch (1.1 KB ) - added by Florian Sening 15 years ago.
German formats
danish.diff (1.1 KB ) - added by finngruwier 15 years ago.
Formats for Danish (da).
01-formats_sr_and_sr-latn.diff (4.2 KB ) - added by Janoš 14 years ago.
formats for Serbian and Serbian latin
11637-es-ar-deactivate-tests.diff (34.0 KB ) - added by Ramiro Morales 14 years ago.
Argentinina formats, plus other test changes
11637-cs.diff (1.4 KB ) - added by Honza Král 14 years ago.
test.txt (100 bytes ) - added by Simon Meers 14 years ago.
Test upload; ignore. Debugging Internal Server Error in djangoproject.com.
en_GB.diff (112.8 KB ) - added by Simon Meers 14 years ago.
British English (and therefore Australian, etc) formats (+ locale init)
sv_format.diff (1.0 KB ) - added by algestam 14 years ago.
Swedish formats
pt_format.diff (1.5 KB ) - added by olifante 14 years ago.
added missing formats for pt locale

Download all attachments as: .zip

Change History (30)

by Jon, 15 years ago

Attachment: no_format.diff added

Norwegian (bokmal) formats

by Guilherme Gondim <semente@…>, 15 years ago

Attachment: pt_BR_format.diff added

Brazilian Portuguese formats

by David Avsajanishvili, 15 years ago

Attachment: formats_ka.patch added

Georgian localization of date/time formats

comment:1 by Marc Garcia, 15 years ago

(In [11403]) [soc2009/i18n] Norwegian bokmal and Brazilian portuguese formats added. See #11637.

comment:2 by Spike^ekipS, 15 years ago

Attached the Korean patch formats-ko-11034.py, based on revision [source:root/django/branches/soc2009/i18n-improvements/django/conf/locale/ko/formats.py]

by Spike^ekipS, 15 years ago

Attachment: formats-ko-11304.py added

comment:3 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

by Rudolph Froger, 15 years ago

Attachment: formats_nl.diff added

Dutch formats.py patch

by Florian Sening, 15 years ago

Attachment: locale_de.patch added

German formats

by finngruwier, 15 years ago

Attachment: danish.diff added

Formats for Danish (da).

by Janoš, 14 years ago

formats for Serbian and Serbian latin

comment:4 by Jannis Leidel, 14 years ago

Keywords: i18n-rf added
milestone: 1.2
Owner: changed from Marc Garcia to Jannis Leidel
Status: newassigned

comment:5 by Jannis Leidel, 14 years ago

Patch needs improvement: set
Summary: [soc2009/i18n] Formats missing for most localesFormats missing for most locales

comment:6 by Jannis Leidel, 14 years ago

I've added all formats up to 01-formats_sr_and_sr-latn.diff to trunk in r11964.

by Ramiro Morales, 14 years ago

Argentinina formats, plus other test changes

comment:7 by Ramiro Morales, 14 years ago

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 use es-ar anymore to verify the fallback to es. Changed it to es-us (just like we are doing in the tests for the Accept-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.

by Honza Král, 14 years ago

Attachment: 11637-cs.diff added

comment:8 by Jannis Leidel, 14 years ago

(In [11975]) Updated Czech format strings. Thanks Honza Král. Refs #11637.

comment:9 by Jannis Leidel, 14 years ago

(In [11976]) Updated i18n tests a little to handle test failures better and updated Argentinian Spanish format strings. Thanks to Ramiro Morales. Refs #11637.

comment:10 by Jannis Leidel, 14 years ago

(In [12455]) Fixed #12868 - Updated French format file. Thanks stephaner and claudep.

Refs #11637.

comment:11 by Simon Meers, 14 years ago

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.

by Simon Meers, 14 years ago

Attachment: test.txt added

Test upload; ignore. Debugging Internal Server Error in djangoproject.com.

by Simon Meers, 14 years ago

Attachment: en_GB.diff added

British English (and therefore Australian, etc) formats (+ locale init)

by algestam, 14 years ago

Attachment: sv_format.diff added

Swedish formats

by olifante, 14 years ago

Attachment: pt_format.diff added

added missing formats for pt locale

comment:12 by Jannis Leidel, 14 years ago

(In [13051]) Updated Portugese locale formats. Refs #11637.

comment:13 by Jannis Leidel, 14 years ago

(In [13052]) Updated Swedish locale formats. Refs #11637.

comment:14 by Jannis Leidel, 14 years ago

(In [13053]) Added British English translation. Refs #11637.

comment:15 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: assignedclosed

Closing this now since we are close to the 1.2 rc. Format updates should be dealt with like any other contribution.

comment:16 by Jacob, 12 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top