Re: [Django] #14924: I18N looks for translations in the reverse order of the apps

2011-02-01 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
+---
   Reporter:  vanschelven   | Owner:  nobody
 Status:  new   | Milestone:  1.3   
  Component:  Internationalization  |   Version:  1.2   
 Resolution:|  Keywords:
   Triage Stage:  Ready for checkin | Has patch:  1 
Needs documentation:  0 |   Needs tests:  0 
Patch needs improvement:  0 |  
+---
Changes (by jezdez):

  * stage:  Accepted => Ready for checkin
  * milestone:  => 1.3


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14924: I18N looks for translations in the reverse order of the apps

2011-01-31 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
+---
   Reporter:  vanschelven   | Owner:  nobody
 Status:  new   | Milestone:
  Component:  Internationalization  |   Version:  1.2   
 Resolution:|  Keywords:
   Triage Stage:  Accepted  | Has patch:  1 
Needs documentation:  0 |   Needs tests:  0 
Patch needs improvement:  0 |  
+---

Comment (by ramiro):

 `14924.2.diff` (ignore the #10765 reference in the ticket description ,
 should be #5494) contains a further evolution to the patch that:

  * Extends the changes to include building of !JavaScript catalog in the
 `javascript_catalog()` view making it more consistent with the one used
 for Python/templates code translations (paths listed in LOCALE_PATHS is
 taken in account.)
  * As per discussion with Jannis and Claude Paroz, starts the deprecation
 path for inclusion of translations located under the ''project path''.
 The LOCALE_PATH setting can be used for the same task by listing the
 filesystem path to the project level translations. Reationale for this:
* The project path has always been an elusive concept (it is actually
 the directory containing the settings) and there has been a shift in other
 parts of the framework from using it as a reference for location of assets
 at runtime.
* It fails when the settings module is a directory (#10765)
* The `project_dir/locale/` subdir can generate spurious error messages
 when the project directory is included in the python path (default
 behavior of `manage.py runserver`), e.g.:
 `/usr/lib/python2.6/gettext.py:49: ImportWarning: Not importing directory
 '/path/to/project/dir/locale': missing __init__.py`. See also
 http://groups.google.com/group/django-
 users/browse_thread/thread/e8bb9089d9e5be60?pli=1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14924: I18N looks for translations in the reverse order of the apps

2011-01-21 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
---+
  Reporter:  vanschelven   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Internationalization  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * has_patch:  0 => 1

Comment:

 The 14924.1.diff patch implements the modifcations discussed here and in
 the [http://groups.google.com/group/django-
 developers/browse_thread/thread/6c098e16da4c49ae?hl=en  mailing list
 thread]. Namely, to modify the precedence of loading of translations from
 compiled message files from the current situation (from higher to lesser):

   * The translation found in locale/ subdir of the the project dir.
   * The translations found in the apps listed in settings.INSTALLED_APPS
 with the latter ones having higher precedence.
   * The translations found in the paths listed in settings.LOCALE_PATHS
 with the latter ones having higher precedence.
   * The translations shipped with Django.

 To (also from higher to lesser precedence):

   * The translations found in the paths listed in settings.LOCALE_PATHS
 with the ones located first having higher precedence.
   * The translation found in locale/ subdir of the the project dir.
   * The translations found in the apps listed in settings.INSTALLED_APPS
 with the ones located first having higher precedence.
   * The translations shipped with Django.

 As proposed by vanschelven.

 Tests and docs were modified accordingly. Some of these tests/docs mods
 are tweaks that can be extracted and applied even if this ticket isn't
 accepted or committing of the patch is deferred.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14924: I18N looks for translations in the reverse order of the apps

2011-01-06 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
---+
  Reporter:  vanschelven   | Owner:  nobody
Status:  new   | Milestone:
 Component:  Internationalization  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * component:  Uncategorized => Internationalization

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14924: I18N looks for translations in the reverse order of the apps

2011-01-02 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
+---
  Reporter:  vanschelven| Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by vanschelven):

 I'd like to have some discussion on my own comment below:

 > Having looked at the original tests the most desirable order appears to
 be:
 >
 >  1. Project path locale
 >  2. Apps (in correct order)
 >  3. Locale-path
 >  4. Django's own translations

 I've got the above patch running in some production code now, and I'm
 feeling this is not the most logical order. (The order was originally
 established by looking at the existing tests and code, and matching that
 order as closely as possible while making sure the apps are evaluated in
 the correct, not reverse, order).

 In my mind, locale path should be the first to be evaluated. The reason
 someone would put up a specific path for locales pretty much has to be to
 override the existing behavior (which would be found in project and apps).

 Input (discussion) on this is much appreciated. I'll gladly put in a new
 patch once a decision is reached. If this is a separate issue, I'm also
 fine on opening a separate ticket. (it could be argued that we can move
 forward on the original bug report as a separate issue more easily, since
 it's "obviously broken").

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14924: I18N looks for translations in the reverse order of the apps

2010-12-31 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
+---
  Reporter:  vanschelven| Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.2   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by russellm):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #14924: I18N looks for translations in the reverse order of the apps

2010-12-20 Thread Django
#14924: I18N looks for translations in the reverse order of the apps
---+
 Reporter:  vanschelven|   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.2   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 I18N should look for translation strings in the order of apps as given in
 INSTALLED_APPS. Translations in apps that appear earlier in that list
 should be used rather than translations later in that list in case there
 are conflicts.


 As described in #14910 as "point 2". I'm reproducing the important parts
 here:


 Django's default template loader is documented here:[[BR]]


 http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#template-
 loaders

 {{{
 ('django.template.loaders.filesystem.Loader',
  'django.template.loaders.app_directories.Loader')
 }}}


 Having looked at the original tests the most desirable order appears to
 be:

  1. Project path locale
  2. Apps (in correct order)
  3. Locale-path
  4. Django's own translations

 The attached patch is a reflection of
  1. The order mentioned above
  2. Non-destructive dictionary updates
  3. I had to move the monkey-patching code into the _merge function,
 because the first actually found locale is no longer known in advance.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.