#13936: django-admin makemessages generates PO files with an incorrect path to
source code files
--------------------------------------+-------------------------------------
          Reporter:  ciupicri         |         Owner:  nobody
            Status:  closed           |     Milestone:        
         Component:  django-admin.py  |       Version:  1.2   
        Resolution:  invalid          |      Keywords:        
             Stage:  Unreviewed       |     Has_patch:  0     
        Needs_docs:  0                |   Needs_tests:  0     
Needs_better_patch:  0                |  
--------------------------------------+-------------------------------------
Comment (by ciupicri):

 Replying to [comment:3 ramiro]:
 > Replying to [comment:2 ciupicri]:
 > > Replying to [comment:1 ramiro]:
 > > The root of the application.
 [http://bitbucket.org/chris1610/satchmo/src/tip/satchmo/apps/satchmo_ext/brand/
 Here] for example (as instructed in the
 [http://www.satchmoproject.com/docs/dev/translation.html documentation for
 Satchmo]).
 >
 > Contrarily to what I understand from the reply Poedit author gave you,
 the `xgettext` utility doesn't use paths relative to the location of the
 `.po` file being created/updated in the `#: admin.py:12` comments. It uses
 paths relative to the path where it was invoked from.

 I think that xgettext could be invoked from the directory of the PO file,
 but I'm not the Poedit author nor a (x)gettext expert. I've just started
 with this translation thing.

 > `makemessages` isn't working in a way different from xgettext here (in
 fact under the hood it executes `xgettext` recursively starting from the
 path you executed by following the the Satchmo docs you linked and the
 [http://docs.djangoproject.com/en/1.2/topics/i18n/localization/#message-
 files Django documentation], the resulting comments in the `.po` file are
 the same you'd get if you ran `xgettext` by hand and then merged all the
 resulting catalogs) and, although what you want to achieve as a translator
 usability detail is an acceptable wish, IMHO it isn't worth breaking that
 compatibility to accommodate one translator tool or workflow
 particularity.

 Break compatibility with what? As far as I know these are just comments.

 > So I'd be inclined to say this isn't a Django bug and I'm closing it.
 Please reopen it if you find any error in my reasoning.

 In this case what other translation tools would you recommend? Also, what
 about transforming it into a request for enhancement for 1.3 if the
 compatibility thing is such a deal breaker?

 > Workaround: If you want to be able to open `admin.py` (or, e.g.
 `templatetags/satchmo_brands.py`) from `poedit` you should execute it from
 the same directory you ran `makemessages`:
 >
 >
 > {{{
 > $ pwd
 > /home/user/src/satchmo/apps/satchmo_ext/brand
 >
 > $ poedit locale/ro/LC_MESSAGES/django.po
 > }}}
 >
 >
 > (disclaimer: I haven't tried this myself, I'm assuming Poedit open these
 files using paths relative to its current working dir and not relative to
 the `.po` file path).

 I've already tested this workaround before reporting the bug and it
 doesn't work. The paths are relative to the `.po` file (as expected at
 least by me).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13936#comment:4>
Django <http://code.djangoproject.com/>
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.

Reply via email to