fixed warnings and error in $locales

strict standards