padrino/padrino-contrib — pull request #23 by t-yamo (2013-10-04 07:04:35+00:00)
Title: Added support for passenger_base_uri to auto_locale

I use nginx and passenger, and passenger_base_uri.
But auto_locale remove passenger_base_uri from the path.

e.g. There are two padrino projects ( app1 and app2).
```
server {
server_name www.example.com;
passenger_base_uri /app1;
passenger_base_uri /app2;
...
}
```
result:
```
[ access to http://www.example.com/app1/ ] -> [ redirect ] -> http://www.example.com/en/
http://www.example.com/app1/en/ -> [ switch_to_lang(:ja) ] -> http://www.example.com/ja/
http://www.example.com/app2/en/ -> [ switch_to_lang(:ja) ] -> http://www.example.com/ja/
```
We should use url([ target_path ], false) or request.script_name in auto_locale.