Currently the mediawiki api does not support language variants. That means that anything returned from the api from zh.wikipedia.org is not necessarily the right variant. I saw there were previous bugs written regarding the api and variants but those were related to getting the raw wikitext and not the parsed output. Since this is post transform presumably it should be ok to to do variant conversion here.
Version: unspecified
Severity: enhancement