Last modified: 2012-10-14 20:30:46 UTC
For production use, ULS should use an internal system (same as fundraising?) for geolocation, rather than freegeoip.net. Wikimedia already has https://bits.wikimedia.org/geoiplookup for central notice and other stuff and sure it could somehow be adapted for use in the ULS also or ULS be adapted to use that.
There is no dependency. freegeoip is default implementation which can be turned off and uls was designed so that the geoiplookup of WMF will work without further changes. It is not used by default because it only works for Wikimedia, which is of course a show stopper :)
https://bits.wikimedia.org/geoiplookup provides the country code in item country but http://freegeoip.net/json/ uses country_code (and that's the member expected by resources/js/ext.uls.init.js:76)
Grumble. Not too hard to fix I hope.
See gerrit Id8d7356e
Not exactly what I had mind when I said proper interface but fixes the issue.
The patch looks good. Thanks Santhosh! PS - https://bits.wikimedia.org/geoiplookup is intended for Wikimedia use but don't see why it can't be the default settings and used on third-party ULS installs. It would be nice to make it the default ULS setting, which of course people could set to something else in their own instances if they prefer.
Aude: it's not available to third parties. XMLHttpRequest cannot load http://bits.wikimedia.org/geoiplookup. Origin http://translatewiki.net is not allowed by Access-Control-Allow-Origin.
It would work in a <script> tag. Of course, it shouldn't be used by translatewiki if wmf ops don't like it.