Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11598 closed (invalid)

The javascript catalog asumes that the main language is English

Reported by: tolano Owned by: nobody
Component: Internationalization Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I've created a website using Spanish as the main language. After that, I had to translate the site to English so the main language in the .po files is Spanish. My language settings are:

LANGUAGE_CODE = 'es'
ugettext = lambda s: s
LANGUAGES = (
  ('es', ugettext(u'Español')),
  ('en', ugettext(u'English')),
)

But the javascript catalog won't work this way. I have changed a little bit the code and it works now. I attach the patch to this ticket so you can tell me if it's ok, and if it could be applied to the trunk.

Thank you.

Attachments (1)

i18n.py.diff (561 bytes) - added by tolano 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by tolano

comment:1 Changed 5 years ago by tolano

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I have realized the patch is not good. It works for me but something is wrong.

comment:2 Changed 5 years ago by tolano

  • Resolution set to invalid
  • Status changed from new to closed

comment:3 Changed 5 years ago by tolano

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:4 Changed 5 years ago by dc

  • Resolution set to invalid
  • Status changed from reopened to closed

JavaScript catalog loads english language for defaults. Looks like it is not a Django error. Please ask on django-users or #django channel and reopen with more info if it is a Django bug.

comment:5 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.