Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize Pootle source directories #2217

Closed
julen opened this issue Jun 15, 2012 · 5 comments
Closed

Reorganize Pootle source directories #2217

julen opened this issue Jun 15, 2012 · 5 comments
Assignees
Milestone

Comments

@julen
Copy link
Contributor

julen commented Jun 15, 2012

As part of bug translate/translate-project#2204 it's necessary to provide a more flexible way to define settings. Since we are making such a change, we should use this occasion to reorganize directories and remove really old stuff.

@julen
Copy link
Contributor Author

julen commented Jun 15, 2012

The first result of this is available at https://github.com/julen/pootle/tree/directory-reorganization/

I think we should remove really old stuff and move things a little bit more:

  • Remove 'import_old_prefs' and therefore 'legacy'
  • Move 'auth' somewhere else; what could be its natural place?
    • Same for 'middleware' and 'i18n'
  • Rename 'html' into 'static'; the latter is widely used.

@julen
Copy link
Contributor Author

julen commented Jun 15, 2012

Changes done, available at my GH fork. Will push at the main repo during the next few days.

@friedelwolff
Copy link
Member

This is not easy to evaluate, and I don't have a lot of experience with these. Just a few very simple notes (which I guess can even be ignored):

  • the top-level directory is mostly clean, so that is nice
  • I think we can remove Changelog, or at least indicate in the file that it is not updated any more.
  • I wonder if the wsgi.py file is in the right/meaningful place?
  • there is no obvious way to run Pootle from the top-level. Also, we'll need to update documentation in the README/INSTALL files (and the wiki)
  • the pootle/ directory is a bit crowded
  • in general, I would take out everything that isn't python or some kind of code out of a directory with init.py. So things like po/ and mo/ look a bit weird inside the pootle package.
  • I guess all our imports now need to have "from pootle..... " in front, right? Or are we adding pootle/ and pootle/apps/ to the PYTHONPATH?

@julen
Copy link
Contributor Author

julen commented Jun 18, 2012

(In reply to BZ-IMPORT::comment #3)

This is not easy to evaluate, and I don't have a lot of experience with
these. Just a few very simple notes (which I guess can even be ignored):

  • the top-level directory is mostly clean, so that is nice
  • I think we can remove Changelog, or at least indicate in the file that it
    is not updated any more.

Agreed. I would also remove the TODO file.

  • I wonder if the wsgi.py file is in the right/meaningful place?

I think we can remove that once bug translate/translate-project#2204 is fixed, since that will provide a wsgi file as a template for deploying.

  • there is no obvious way to run Pootle from the top-level. Also, we'll
    need to update documentation in the README/INSTALL files (and the wiki)

It's not the intended way to run it from the top-level.

  • the pootle/ directory is a bit crowded

That's mostly because that directory was existing before with content.

  • in general, I would take out everything that isn't python or some kind of
    code out of a directory with init.py. So things like po/ and mo/ look a
    bit weird inside the pootle package.

I wouldn't, at least not for the pootle project. If you look at any other projects, they all have their translations within the code, because actually it's part of it.

In our case the separation is a little bit weird. I think the more standard way of doing things would be:

  • Separate the pootle project from 'podirectory' (which is '/po/' right now).
  • Create a locale/LC_MESSAGES/code/ structure for pootle translations. So essentially move all the files in the pootle project there, and when translations are compiled, store them there.
  • With the previous change, '/mo/' would go away.
  • Relocate 'podirectory' out of the 'pootle' package into the top-level dir.

But I realize this might have issues with live translation. I ignore if it's actually possible to make the change or not though.

  • I guess all our imports now need to have "from pootle..... " in front,
    right? Or are we adding pootle/ and pootle/apps/ to the PYTHONPATH?

They are added in 'syspath_override', so the imports work fine as they are.

@julen
Copy link
Contributor Author

julen commented Jun 18, 2012

Directories reorganized in commits fd329b9 .. 6ef6d90

I filed bug #2245 for the translation files' directories and bug #2246 for splitting settings into more sensible files.

@julen julen added this to the 2.5 milestone Jul 27, 2014
@julen julen self-assigned this Jul 27, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants