Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale en_GB.UTF-8 is hardcoded in install script #129

Closed
mlandauer opened this issue Jun 29, 2014 · 5 comments
Closed

Locale en_GB.UTF-8 is hardcoded in install script #129

mlandauer opened this issue Jun 29, 2014 · 5 comments

Comments

@mlandauer
Copy link

The documentation suggests using a script which sets by default the locale to GB https://github.com/mysociety/commonlib/blob/master/bin/install-site.sh#L217

Since mapit is a poplus component and should be international by default this should probably be generalised (or at least some instructions added about changing the locale)

@garethrees
Copy link
Member

Debian recommends setting the default as None so that the SSH session specifies the locale.

@dracos
Copy link
Member

dracos commented Jul 7, 2014

Yes, I think this was inherited from the FixMyStreet install, which uses that locale for its default translation and to have floating point numbers in URIs work correctly, but it should I guess be moved into the FixMyStreet specific script from the common one.

@dracos
Copy link
Member

dracos commented Jul 16, 2014

Have made PR at mysociety/commonlib#24 to only call this for FixMyStreet. I don't think anything else requires this, @mhl might know more.

@mlandauer
Copy link
Author

At least for the mapit install script it does look like some kind of locale needs to be set for the postgis install to go correctly. That's about the limit of my knowledge right now

@dracos
Copy link
Member

dracos commented Jul 18, 2014

It depends on what base server you're using. The script we use to set up postgis uses the -E UTF8 argument to createdb, so if your base server has been set up with a UTF-8 locale to begin with, it should be fine. I've just tested the install script, with my PR changes to not do anything locale specific, with Vagrant's puppetlabs/debian-7.4-64-nocm, puppetlabs/debian-6.0.9-64-nocm, and ubuntu/precise64 (all of which appear to have en_US.UTF-8 as the default) and they all run to completion successfully. If you were to run the install script on a server for which the default was a non-UTF-8 locale, then it would fail. So the install script has the choice of doing what it does now, installing a UTF-8 locale as the default and thus knowing it can run okay, doing nothing and hoping you're running on top of a base that has a UTF-8 locale already, or changing the default to None, installing all locales and hoping the one passed in by SSH is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants