Cherry-pick 1415f6d6 e0656091d b9dcb7aea5

https://mingle.corp.wikimedia.org/projects/internationalization/cards/3854

Conflicts:

	api/ApiQueryMessageGroups.php

Change-Id: I8417e0bae370c04d2f63bdc0702905116f5e95d7