Issue #2288793 by YesCT, jamesdixon, xq1003, fran seva, Les Lim: Add missing and fix some types in core docblocks and add some typehinting for locale module.