schmittjoh/JMSI18nRoutingBundle — pull request #27 by fritsjanb (2012-03-08 13:41:31+00:00)
Title: [WIP] Feature same pattern

An initial attempt for #25

On matching the route a new route is generated for the active host.

If this route is different, either a redirect is done or a RouteNotFoundException is thrown, depending on config.

Note that there is a small difference for BC: if two sites shared a non-default url (default is 'nl', but both 'de' and 'en' have a common url, which is different for 'nl') a redirect is no longer used.

As an example: take default locale = nl,
```
nl: /nieuws
de: /news
uk: /news```
(no, that's not the German word for news).

In the current system, the uk: /news would redirect to de: /news. This PR changes this behaviour (/nieuws on the 'de' host will still redirect to the 'nl' host)

Disabling a locale on a route when ```redirect_to_host = false``` does not work yet. Let default = 'nl', and let the news_overview route be enabled for 'nl' as '/nieuws', but disabled for 'en'. On url '/nieuws' the matcher finds the default route for '/nieuws' (news_overview).

Generating a new url for en_news_overview returns null (NotFoundHttpException). The thing is, the fact that en_news_overview doesn't exist could be because the route is simply not internationalized.

I'm not really sure how I should implement this check properly.
Any idea's / comments on the rest?