WebReflection / i18n-utils

The i18n tag function utilitities
75 stars 5 forks source link

Phrase context is necessary for good translations. #6

Closed jpeg729 closed 6 years ago

jpeg729 commented 6 years ago

In English UIs we use the word "Done" quite a lot, but it can have two meanings.

  1. I am done dealing with the contents of this dialog box.
  2. Some processing has been completed.

The difference is the context, and many languages don't have a word that can serve for both. For example, if you translate "Done" into french as "Fait", then most of the time it comes across as weird and confusing.

My solution would be to write the original strings in nerdspeak rather than in plain English. For example...

donemsg = i18n`dialog:done`;

But of course, that doesn't solve the problem that it is hard for English people to realise when some context is necessary for better translations.

Then again maybe a more fleshed out sort of context support is necessary for other reasons that I haven't thought of.

WebReflection commented 6 years ago

as long as you can create different templates you should be fine with one solution or another.

As example, if your text is injected as HTML you could use comments:

i18n`Done <!-- as in a dialog -->`;
i18n`Done <!-- as completed -->`;

Would that work? It's visually effective/semantic

jpeg729 commented 6 years ago

That is clearer than my proposal. Are there other sorts of context that ought to be taken into account?

WebReflection commented 6 years ago

Are there other sorts of context that ought to be taken into account?

not sure I understand the question

WebReflection commented 6 years ago

Closing due no activity. If you'll explain your question I'll try to answer regardless, thanks.