move translation compensation to its own function

Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>