The sorting and trafficking of lysosomal proteins.