While that is true from the perspective of electrical engineering, I think it is reasonable to expect that "generator" colloquially refers to an engine that converts fuel into electricity. Since you can't really "pour fuel" into a battery (at least that I know of), I personally wouldn't call it a "generator".