Crowdin question: multiple translations for the same word

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Crowdin question: multiple translations for the same word

Post by chrisb »

While translating to german a question came up concerning translating the word "solid". As a noun e.g. in Part workbench it means a "filled body". However, in TechDraw it is used as a an adjective for the line style - which would be translated as "full line". Can these two be translated differently in different modules?
That having said it may in this special case be even better to use "Continous line", see ISO 128-24, but the general question remains.
wandererfan wrote:ping
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: Crowdin question: multiple translations for the same word

Post by kisolre »

Homonyms you cant simply translate words without context. How does the translation engine handle this?
User avatar
papyblaise
Veteran
Posts: 7872
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Crowdin question: multiple translations for the same word

Post by papyblaise »

An old graduate draftman like me is frustrated that drawing standards are often treated lightly, especially in the Techdraw wb
If the software wants to be taken seriously, it must be respected
ISO 128-24 has been translated for a very long time in all countries, and there should be no other interpretations
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crowdin question: multiple translations for the same word

Post by wmayer »

kisolre wrote: Fri Feb 14, 2020 7:55 am Homonyms you cant simply translate words without context. How does the translation engine handle this?
String literals have a context, namely the class name of where it's used. This works automatically for all classes derived from QObject and the string only has to be marked with tr(), e.g. tr("Solid").

However, many string literals are used in classes that do not inherit from QObject and there the string is marked with QObject::tr("Solid") so that its context name is "QObject". If we now have multiple places where a string literal has the context "QObject" but have different meanings in the target language then we have a problem.

Therefore I recommend to avoid QObject::tr() as much as possible. One alternative is to use QCoreApplication::translate("ContextOne", "Solid") or add Q_DECLARE_TR_FUNCTIONS to the class declaration, like Q_DECLARE_TR_FUNCTIONS(TechDrawGui::MyClass)
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Crowdin question: multiple translations for the same word

Post by wandererfan »

chrisb wrote: Fri Feb 14, 2020 6:47 am That having said it may in this special case be even better to use "Continous line", see ISO 128-24, but the general question remains.
Should be changed from "Solid" to "Continuous" after this git commit 1c276115c8.

Lost the "Q_DECLARE_TR..." bit in git somewhere. Will make another patch for that.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Crowdin question: multiple translations for the same word

Post by chrisb »

Thanks!
Is there some automatism to get the english notions to Crowdin so that we can translate it or is this done only shortly before the next release?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Crowdin question: multiple translations for the same word

Post by wmayer »

Yorik usually triggers the upload by running a script. I think it makes sense to update the translation files on crowdin so that people can already start to translate. Then just some weeks before the final release the file on crowdin can be updated again.
Post Reply