This is something humans (i.e., experienced translators) excel at. It is something computers cannot do except at a very basic level — they lack the cultural knowledge and autonomous connection making capability needed.
In Dutch I could translate 'not my cup of tea' in many ways depending on the context. Some examples:
Neutral translation in lieu of additional context: „Dit is niet naar mijn smaak.”
Young person in a social context: „Dit is niet echt mijn ding, nee.”
Middle age manager in a white collar office environment: „Nee, dit is 'not my cup of tea', zeg maar.”¹
Ironic and/or cynical down-to-earth jocular fellow: „Dit is niet mijn kopje thee.”²
1: Note the literal borrowing of English. 2: A literal translation used humorously, knowing full well that this is not 'correct'.
You would, in effect, have to train an artificial intelligence with a brain capable of mimicking ours by raising it as a child in our society (sometimes cheerfully acknowledged by sci-fi writers who employ such characters), and even then you would need to have a brain that processes certain events, happenings, and subtle hints the way a human being roughly does.
Perhaps someone will manage to train one in a suitable manner one day (far far away — not in our lifetime), but I wouldn't want to be responsible for debugging it.
Someone will manage to make one that is good enough for some purposes though. Plenty of semi-gibberish manuals included with products that strongly reek of machine translation these days.
Only if translated literally word for word