← Back to team overview

kicad-developers team mailing list archive

Re: Building strings

 

On 5/11/2010 6:37 PM, Alain Portal wrote:
> Hi,
> 
> When parsing my language po file to try to improve it, I found some strings 
> very difficult to translate because lack of context.
> 
> As a sample, here is something that developers don't have to do, a building 
> sentence using "Tips and  tricks", beacause it is finally untranslatable.
> 
> librari.cpp, line 702
> 
>     if( aDisplayDialog )
>     {
>         msg  = _( "Component " ); msg += Name_Cmp;
>         msg += added ? _( " added in " ) : _( " replaced in " );
>         msg += aLibName;
>         Affiche_Message( msg );
>     }
> 
> This code create 3 strings to translate:
> - "Component "
> - " added in "
> - " replaced in "
> 
> In the GUI, this code create 2 sentences:
> 
> Because the 2 sentences, this isn't a good example to me ;-)
> Forget the second (replaced in).
> 
> There is 2 strings to translate, 2 strings that build a sentence:
> "Component MACHIN added in TRUC."
> 
> Translator see only:
> - "Component "
> - " added in "

Alain,

I agree with you that this not a very good way to build strings for
translators.  I've seen this kind of code many places throughout Kicad.
 I know it is the C++ way ( along with the << operator ) to build
strings but it is very translator unfriendly.  The GNU gettext manual
has some good information on proper string etiquette.  We developers
really need to do a better job with this to help make life easier for
our translators.

Wayne

> 
> not the context of the sentence, even here the sentence...
> 
> What does means the string "Component "?
> A component?
> The component?
> Component:
> 
> There is a lot of meanings, mostly when strings are shorts.
> 
> Such building don't easier tranlators work...
> 
> I agree to track and fix such building, but only if a such work can be merge, 
> and if I can test my fixes before sumitting, so being able to rebuild the 
> stringg files (*.po and *.mo) to see the changes in the GUI.
> 
> See my previous posts ;-)
> 
> Regards,
> Alain
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp



References