Opened 17 years ago
Closed 15 years ago
#6380 closed (fixed)
make-messages.py don't follow symlinks
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | make-messages symlinks follow symbolic links | |
Cc: | aribao@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
I have created a repository with my apps, and when I need one for one of my projects, I link the code from the repository to the project path. This give me a problem.
When I want to use make-messages to extract all the translation strings, it doesn't follow this symbolic links.
I have patched make-messages.py to be able to extract the strings from the applications linked to the project.
I hope it helps.
Attachments (1)
Change History (6)
by , 17 years ago
Attachment: | make-messages.py.diff added |
---|
comment:1 by , 17 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 17 years ago
I'd like to make some improvements in this patch, what should I do? Something missing?
Thank you.
comment:3 by , 17 years ago
If you want to upload a new patch, just do so. We'll only ever worry about the last patch.
There are a few improvements needed here, though:
- It doesn't need a nested function like this. Just declare a top-level function. It's much easier to read because there's no confusion about which code belongs to which function.
- Needs to be formatted as per PEP 8. In particular, no spaces after parentheses and spaces after commas.
- You seem to be going to a lot of effort to reinvent the behaviour of os.walk here. Why not just continue to use os.walk() to descend the directories and use the tip in the Python docs for os.walk for handling symlinks? That would require less extra code, I suspect, plus will use the already debugged os.walk() function instead of having to reinvent our own version.
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch to allow make-messages.py follow symbolic links