"I only like salty food. I don't like sweet food."
"Salty" is used by non-native English speakers more widely than by native speakers. Native English speakers only use it for foods that have too much salt or at least where salt is a major part of the flavour, like snacks you eat at a bar. Non native speakers can use it for pretty much any food that is not sweet. For that meaning there's a more accurate word that native speakers use, "savoury". We use that for non-sweet, for spicy, and also for salty food that's not too salty. Like mushrooms, meat, pizza, cheese, etc.
So it's extremely rare that somebody "only likes salty food" but quite common that someone only likes savoury food.
I went with "我只喜欢咸菜， 不喜欢甜菜."
I've got two issues with this translation: first, it does not say "I only like TO EAT salty food..." Without that I don't see a reason to assume 吃 should be in the sentence. Maybe they're talking about what food they like to make, or any other criteria that was not specified.
Second, every previous lesson had "Adj + 的" as "the adjective one." So based on this pattern their Chinese sentence should translate to "I only like to eat the salty one, I don't like the sweet one." Someone help! (either Duolingo correct or someone correct my understanding)
Richard, You are absolutely right about "hit or miss". However, they are getting better. I made many suggestions on improvements and they have fixed quite a few of them. Almost all my suggestions were about their English translations since there are usually several ways to correctly phrase the same sentence.