MONTREAL — A Quebec man has been sentenced to five years in prison after pleading guilty to charges including hate speech against Jews and the 3D printing of firearms.