schmittjoh/JMSI18nRoutingBundle — pull request #33 by fritsjanb (2012-03-27 22:20:19+00:00)
Title: Router's context's locale not set during I18nRouter::match()

When the match function is called the context's locale is not yet set. (It IS set when generate is called)

When the hostMap is used this results in two types of unwanted behaviour:
Patterns are matched when the corresponding route is turned off for the host.
Patterns are matched when the corresponding route is active for the host, but the pattern does not match the host's locale.

Note that none of the testcases failed because during all the tests the context's locale was set.

Earlier @schmittjoh mentioned the following:

--------------------------------------------------------------------------------------------------------------------------------
The locale detection part should ideally be refactored along the lines of:
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/servlet/i18n/package-summary.html

Don't know when I'll have time for that, so if someone else wants to take a stab feel free.

--------------------------------------------------------------------------------------------------------------------------------
As I myself haven't got time for this refactor either I decided to make a hotfix PR to fix the issue described above.