question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Translation with context

See original GitHub issue

Motivation

  • One phrase can have different meanings in different contexts.
  • Fixing an incorrect translation in one context makes the translation incorrect in another context.

Get a feeling of the problem: https://www.youtube.com/watch?v=GAgp7nXdkLU Solution: Translations must be context-specific.

Examples

Phrase Context Translation (German)
Submit Accounting Buchen
Submit Comment Senden
Change amount POS Rückgeld
Change amount Stock Menge ändern

Proposal

  • Call the translation function frappe._() with a second parameter context.
_("Submit", context="Submit a DocType")
# ...
_("Submit", context="Submit a Comment")

Alternatively, we could use IDs wherever the text should be inserted and extract some context automatically.

  • Per default, there is the same translation for all contexts (see 1.)

  • The translator has the option to provide a different translation for a specific context (see 3.)

translation_portal

The context could also take a different form, such as the route of the view, a screenshot of the UI, or even a dict with more detailed information such as the gender of the user.

Additional considerations

  • It should be possible to lock correct translations. (The current system of status points proved to be insufficient for this.)

  • Consistency of translations across the system must be assured.

  • The project’s terminology and concepts should be defined (for all languages).

    • How do we address the user (formal or informal)?
    • How to use common terms (“E-Mail” or “eMail” or “email”)?
    • Example

See also

Bounty

This feature request is backed financially by the following companies. The bounty is dedicated to an effort to make good translations possible, for which the proposed feature is a necessary basis. If some part of the budget will be left, please propose additional improvements.

USD 500.00 by ALYF GmbH (@alyf-de) USD 500.00 by itsdave (@itsdaveit) USD 500.00 by Libracore (@libracore) USD 500.00 by LIS Engineering GmbH USD 500.00 by //SEIBERT/MEDIA (@seibert-media)

USD 2500.00 Total

Please leave a comment or text me, if you’d like to contribute as well. Discuss: https://discuss.erpnext.com/t/translations-should-be-context-specific/46114

Final thought: a good translation tool could also pay for itself.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:23
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
mseibertcommented, Feb 26, 2019

Sounds like something desperately needed for all translations.

3reactions
derthimmcommented, Jan 2, 2020

In NAVISION (Microsoft Dynamics NAV, …) for example every “Object” is identified and has its own translations.

What is an object in this case? Every field in a table, every control (Button, Label, …) in a Form/Page/Report or label in a report etc. If a field in a Form/Report is related to a field of a table the translation will be inherited - but this translation can be overidden.

The disadvantage is that every object has to be translated. And that is a lot of work. There is no “gettext” to make things simple. The advantage is that there is always the correct translation available (if the developer or consultant has added the translation 😃. Moreover there is an automatic fallback to the English original. Obviously developers have build functions to make things easier. But it is always possible to see the context and this makes the translation secure.

In ERPnext some of translations are totally wrong which leads to misunderstandings. For the user it is sometimes funny seeing the strange translation. Funny things will get embarrasing or unprofessional if the “funny” translation find their way into official documents like invoices or quotations.

Just my 2 cents.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reverso Context | Translation in context - Arabic, German ...
Get relevant translations in context with real-life examples for millions of words and expressions, using our natural language search engine applied on ...
Read more >
Translation Context: How Context Leads to Better Translations
We build context around our message to help express our ideas clearly. The same is true for translators working to convey an idea...
Read more >
Context in Translation, a Comic Secret
The context influences the meaning of a phrase or sentence. It is linked to the environment in which the communication takes place. In...
Read more >
How Context-Based Translation Influences Local Markets
Translation is the process of interpreting the meaning of words from one language into another. Generally, a human translator or machine translation tool ......
Read more >
No Context, No Quality. Give Translators Context to Get Better ...
Context makes the translation process less challenging and helps translators interpret the source accurately. You, in return, get translations ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found