test msginit: share common code for --locale