Currently, translate_source_text is a variable that provides the source text being translated. A new variable, translate_target_language, should be created to provide the language that is being translated into.
Use case:
Filters can be used to detect if a translation is oddly short or long based on the size relative to the source text length[1]. However, this is not ideal when the target language is, for example, Chinese or Korean - the lengths should be quite different, because they are fundamentally different in structure.
Implementation:
In TranslateHooks::onAbuseFilterFilterAction, ::onAbuseFilterComputeVariable, and onAbuseFilterBuilder, register a new variable that is computed using $handle->getCode()
[1] Example: https://www.mediawiki.org/wiki/Special:AbuseFilter/76