Opened 5 years ago

Closed 4 years ago

Last modified 20 months 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 5 years ago.

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by diegobz

comment:1 Changed 5 years ago by diegobz

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Accept to use more languages than just the ones available in Django to Allow to use other translation languages than just the ones available in Django

comment:2 Changed 5 years ago by ramiro

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

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 20 months ago by ramiro (previous) (diff)

comment:3 Changed 5 years ago by ramiro

  • Resolution wontfix deleted
  • Status changed from closed to reopened

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 5 years ago by ramiro

#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 5 years ago by ramiro

  • Needs documentation set
  • Needs tests set
  • Patch needs improvement set

comment:6 Changed 5 years ago by rasca

  • Triage Stage changed from Unreviewed to Accepted

Accepting it after talking to ramiro in IRC.

comment:7 Changed 4 years ago by jezdez

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

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 20 months ago by Claude Paroz <claude@…>

In b780d03d624e712d7b1f6b6796058b950e975675:

Removed obsolete locale restriction admonition

Refs #14461. Thanks Ramiro Morales for pointing this.

comment:9 Changed 20 months 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