mysociety/fixmystreet — Issue #215: Cobrand mapping needs improving to enable unmessy i18n
Author: handelaar
Created: 2012-02-06 15:21:00+00:00
State: open

(Sadly this is outwith my own perl skills, particularly given that I spent an hour last evening and couldn't actually find the routine that chooses which cobrand to use.)

It seems that FMS will use a cobrand for the current page request if the lowercased name of the cobrand appears as a substring of the lowercased domain name in the URI, and that name is in ALLOWED_COBRANDS. That would stop the casual installer from using 'fixmystreet' as my country-level-specific domain without forking the project. Forking is bad.

The slightly code-magic-y cobrand picking should really be replaced with an explicit mapping of hostname:cobrand pairs, probably in conf/general.yml.