stephenmcd/mezzanine — pull request #540 by wrwrwr (2013-02-03 14:27:13+00:00)
Title: Fix page browsing in multilingual setups

Pages are not found when using ``i18n_patterns``. Reproducing requires setting up a multilingual project:
-- create a new Mezzanine project, run ``createdb``;
-- add some ``LANGUAGES`` and toggle ``USE_I18N`` in settings;
-- add ``LocaleMiddleware`` where it should be;
-- replace ``patterns`` with ``i18n_patterns`` in url configuration.
(Documentation: [languages and middleware](https://docs.djangoproject.com/en/dev/topics/i18n/translation/#how-django-discovers-language-preference) and [i18n_patterns](https://docs.djangoproject.com/en/dev/topics/i18n/translation/#internationalization-in-url-patterns), and here's a [diff with all the needed changes](https://gist.github.com/4701985)).

Then run the server and click on say the about page link (``en/about``) or just run core tests. Pages are not found, because the middleware tries to lookup slugs without stripping the language prefix from the path first.