tags and a stray

. We need to keep them as is? The instruction: "Keep all HTML tags intact." So we should not modify tags, just translate text nodes. So we need to translate the visible text while preserving tags exactly as they appear. Let's examine the HTML:

So, There’s A Scientific Reason Why We Always Have Room For Dessert

Dessert stomach. We’ve all experienced this gustatory sensation. It only happens every damned time we eat a meal. It’s basically part of the human condition.

You eat a delicious, satisfying dinner, feel full to the brim, but when the beautiful question ‘Should we get dessert?’ comes around, it’s always a yes — much to our stomach’s dismay afterwards.

It’s true, we always have room for desserts, whether we indulge that sensation with dessert or not (kudos if you have the willpower). But why exactly does this happen?

According to Russell Keast — a professor in sensory and food science and the director of the Centre for Advanced Sensory Science at Deakin University — there’s a scientific reason for the phenomenon called sensory … Continue Reading


Source: https://www.huffingtonpost.com.au/2017/01/26/so-theres-a-scientific-reason-why-we-always-have-room-for-dess_a_21684541/

there is text: "You eat a delicious, satisfying dinner, feel full to the brim, but when the beautiful question ‘Should we get dessert?’ comes around, it’s always a yes — much to our stomach’s dismay afterwards." - Next

text: "It’s true, we always have room for desserts, whether we indulge that sensation with dessert or not (kudos if you have the willpower). But why exactly does this happen?" - Next

text: "According to Russell Keast — a professor in sensory and food science and the director of the Centre for Advanced Sensory Science at Deakin University — there’s a scientific reason for the phenomenon called sensory … " plus link "Continue Reading" - Then


- Then

Source: URL

- Then

(self-closing) - Then stray closing tags. We need to translate the text nodes, but keep HTML tags unchanged. We also need to preserve HTML entities like ’ etc. Should we keep them? The original uses HTML entities for apostrophes and quotes. We can keep them as they are, but we need to translate the text while preserving the entities. For example, "There’s" becomes "C’è" maybe but we need to keep the apostrophe entity? We could use the same entity for apostrophe: "C’è". However, we might also just write "C’è" as a literal character; but to keep consistency maybe we should keep the entity. The instruction: "Keep all HTML tags intact." It doesn't mention entities, but they are part of the text. We can replace them with appropriate Italian characters, but we might keep them as is for readability. However, the translation should be correct. Better to keep the same HTML entities for apostrophes and quotes. So we need to replace "There’s" with "C’è". Similarly, "We’ve" becomes "Abbiamo". Actually "We’ve all experienced this gustatory sensation." In Italian: "Abbiamo tutti provato questa sensazione gustativa." So we need to translate the whole sentence. We need to handle the HTML entities for apostrophe and quotes: ’ is right single quotation mark (’). ‘ is left single quotation mark (‘). — is em dash (—). … is ellipsis (…). So we can keep them as they are. Thus we need to produce Italian translation with same entities. Let's translate each sentence. First: "So, There’s A Scientific Reason Why We Always Have Room For Dessert" Italian: "Quindi, c’è una ragione scientifica per cui abbiamo sempre spazio per il dessert" But we need to preserve the apostrophe entity: "c’è". Also "c’è" with accent. Use entity: "c’è". So final: "Quindi, c’è una ragione scientifica per cui abbiamo sempre spazio per il dessert" But note original "So, There’s A Scientific Reason Why We Always Have Room For Dessert" capital letters. We can keep capital letters: "Quindi, C’è una ragione scientifica per cui abbiamo sempre spazio per il dessert". Should we keep "A" capital? Not needed. We'll produce proper Italian. Second paragraph: "Dessert stomach. We’ve all experienced this gustatory sensation. It only happens every damned time we eat a meal. It’s basically part of the human condition." Translate: "Stomaco da dessert. Abbiamo tutti provato questa sensazione gustativa. Succede ogni maledetta volta che mangiamo un pasto. È fondamentalmente parte della condizione umana." We need to keep apostrophe entity for "È". Use ’? Actually "È" is capital E with grave accent, not apostrophe. So we can just write "È". But we might keep as plain character. Third: after

text: "You eat a delicious, satisfying dinner, feel full to the brim, but when the beautiful question ‘Should we get dessert?’ comes around, it’s always a yes — much to our stomach’s dismay afterwards." Translate: "Mangiate una cena deliziosa e soddisfacente, vi sentite pieni fino all’orlo, ma quando arriva la splendida domanda ‘Dovremmo prendere il dessert?’ è sempre un sì — con grande disappunto del nostro stomaco in seguito." Need to preserve left single quote entity ‘ and right single quote ’ around the question. So we need to keep them: ‘Dovremmo prendere il dessert?’. Also preserve em dash entity —. Also apostrophe in "it's" -> "è". Use "è". Not need entity. Fourth: "It’s true, we always have room for desserts, whether we indulge that sensation with dessert or not (kudos if you have the willpower). But why exactly does this happen?" Translate: "È vero, abbiamo sempre spazio per i dessert, che ci concediamo quella sensazione con il dessert o meno (complimenti se hai la forza di volontà). Ma perché succede esattamente?" Preserve apostrophe entity for "È". Use "È". Keep parentheses. Fifth: "According to Russell Keast — a professor in sensory and food science and the director of the Centre for Advanced Sensory Science at Deakin University — there’s a scientific reason for the phenomenon called sensory … Continue Reading" Translate: "Secondo Russell Keast — professore di scienze sensoriali e alimentari e direttore del Centre for Advanced Sensory Science presso la Deakin University — c’è una ragione scientifica per il fenomeno chiamato sensoriale … Continua a leggere" Need to preserve em dash entity — before and after. Also apostrophe entity for "c’è". Use "c’è". Also ellipsis entity …. Also link text "Continue Reading" translate to "Continua a leggere". Keep link unchanged. Now source line: "Source: URL" Should we translate "Source:"? Yes. So "Fonte:". Now we need to keep tags exactly as they appear. So we need to replace text inside tags but not modify tags. Let's reconstruct HTML with translations. Original:

So, There’s A Scientific Reason Why We Always Have Room For Dessert

We replace with:

Quindi, C’è una ragione scientifica per cui abbiamo sempre spazio per il dessert

But note