Opened 14 years ago

Closed 13 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 14 years ago.
Norwegian (bokmal) formats
pt_BR_format.diff (1.8 KB) - added by Guilherme Gondim <semente@…> 14 years ago.
Brazilian Portuguese formats
formats_ka.patch (2.1 KB) - added by David Avsajanishvili 14 years ago.
Georgian localization of date/time formats
formats-ko-11304.py (2.0 KB) - added by Spike^ekipS 14 years ago.
formats_nl.diff (3.2 KB) - added by Rudolph Froger 14 years ago.
Dutch formats.py patch
locale_de.patch (1.1 KB) - added by Florian Sening 14 years ago.
German formats
danish.diff (1.1 KB) - added by finngruwier 14 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 13 years ago.
Swedish formats
pt_format.diff (1.5 KB) - added by olifante 13 years ago.
added missing formats for pt locale

Download all attachments as: .zip

Change History (30)

Changed 14 years ago by Jon

Attachment: no_format.diff added

Norwegian (bokmal) formats

Changed 14 years ago by Guilherme Gondim <semente@…>

Attachment: pt_BR_format.diff added

Brazilian Portuguese formats

Changed 14 years ago by David Avsajanishvili

Attachment: formats_ka.patch added

Georgian localization of date/time formats

comment:1 Changed 14 years ago by Marc Garcia

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

comment:2 Changed 14 years ago by Spike^ekipS

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 Spike^ekipS

Attachment: formats-ko-11304.py added

comment:3 Changed 14 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

Changed 14 years ago by Rudolph Froger

Attachment: formats_nl.diff added

Dutch formats.py patch

Changed 14 years ago by Florian Sening

Attachment: locale_de.patch added

German formats

Changed 14 years ago by finngruwier

Attachment: danish.diff added

Formats for Danish (da).

Changed 14 years ago by Janoš

formats for Serbian and Serbian latin

comment:4 Changed 14 years ago by Jannis Leidel

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

comment:5 Changed 14 years ago by Jannis Leidel

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

comment:6 Changed 14 years ago by Jannis Leidel

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

Changed 14 years ago by Ramiro Morales

Argentinina formats, plus other test changes

comment:7 Changed 14 years ago by Ramiro Morales

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.

Changed 14 years ago by Honza Král

Attachment: 11637-cs.diff added

comment:8 Changed 14 years ago by Jannis Leidel

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

comment:9 Changed 14 years ago by Jannis Leidel

(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 Changed 14 years ago by Jannis Leidel

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

Refs #11637.

comment:11 Changed 14 years ago by Simon Meers

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 Simon Meers

Attachment: test.txt added

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

Changed 14 years ago by Simon Meers

Attachment: en_GB.diff added

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

Changed 13 years ago by algestam

Attachment: sv_format.diff added

Swedish formats

Changed 13 years ago by olifante

Attachment: pt_format.diff added

added missing formats for pt locale

comment:12 Changed 13 years ago by Jannis Leidel

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

comment:13 Changed 13 years ago by Jannis Leidel

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

comment:14 Changed 13 years ago by Jannis Leidel

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

comment:15 Changed 13 years ago by Jannis Leidel

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 Changed 12 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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