Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#14461 closed (fixed)

Allow to use other translation languages than just the ones available in Django

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

Description

Django doen't allow to activate a language available in a project, but that it is not present in the django/conf/locale/.

I've noticed it's because of the check_for_language function.

Not sure if it's the best way to fix it, but I'm providing a patch that can resolve the issue.

Attachments (1)

accept_more_langs.diff (907 bytes) - added by diegobz 6 years ago.

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by diegobz

Attachment: accept_more_langs.diff added

comment:1 Changed 6 years ago by diegobz

Summary: Accept to use more languages than just the ones available in DjangoAllow to use other translation languages than just the ones available in Django

comment:2 Changed 6 years ago by Ramiro Morales

Resolution: wontfix
Status: newclosed

I know this is a design decision, and has been like this for a long time. This ticket certainly made me ask myself what would be the reason for such a decision. Fortunately the answer is in the docs: http://docs.djangoproject.com/en/1.2/topics/i18n/localization/#how-to-create-language-files (Locale restrictions box).

I will close the ticket for now. Were a patch like this to be accepted it would need to update the documentation and add tests. Also, it seems to me it needs to deal with updating the LANGUAGES setting somehow because adding the translation path to the path search list isn't enough.

Last edited 3 years ago by Ramiro Morales (previous) (diff)

comment:3 Changed 6 years ago by Ramiro Morales

Resolution: wontfix
Status: closedreopened

After further discussion with Jannis on IRC, actually this could be an old restriction that might be worth reviewing and possibly removing provided no existing behavior is affected and all the necessary pieces of the user locale language preferences selection are modified accordingly so the translations added using this mechanism are effectively made available.

comment:4 Changed 6 years ago by Ramiro Morales

#14530 was about the documentation side of this issue. It was closed in favor of a complete (including documentation fixes) solution to this ticket.

comment:5 Changed 6 years ago by Ramiro Morales

Needs documentation: set
Needs tests: set
Patch needs improvement: set

comment:6 Changed 6 years ago by rasca

Triage Stage: UnreviewedAccepted

Accepting it after talking to ramiro in IRC.

comment:7 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: reopenedclosed

In [15507]:

Fixed #14461 -- Look also in LOCALE_PATHS when checking if a language is supported. Thanks to Diego Búrigo for the initial patch.

comment:8 Changed 3 years ago by Claude Paroz <claude@…>

In b780d03d624e712d7b1f6b6796058b950e975675:

Removed obsolete locale restriction admonition

Refs #14461. Thanks Ramiro Morales for pointing this.

comment:9 Changed 3 years ago by Claude Paroz <claude@…>

In 3c8879f092be25f0b60051d8e0c3a77dca354af3:

[1.6.x] Removed obsolete locale restriction admonition

Refs #14461. Thanks Ramiro Morales for pointing this.
Backport of b780d03d62 from master.

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