Share » Forums » General » Translation of variables

Translation of variables

Translation of variables

Sunday 27 August 2006 3:59:34 am - 3 replies

Author Message

Thomas Nunninger

Sunday 27 August 2006 6:04:58 am

Hi Claudia,

I'm no C programmer. But I guess the solution is in file 'fetchtr_tpl.cpp'. Around line 164 I find:

        if ( endpos < 0 )
        {
            qWarning( filename + ":error: Found non-quoted context, skipping translation" );
            exit( 1 );
//             continue;
        }

Perhaps it's enough to comment the exit and uncomment the continue... I would try if it skips variables correctly then. Also I would make a diff of the result of translation.ts before and after changing the C code to ensure that everything works as expected (of course without variables in the templates to translate).

Additionally you can change the qWarning function like:

qWarning( filename + ":error: Found non-quoted context, skipping translation" + "content: " + content );

Then you should see the skipped content strings.

If you got an other error message just search for it in the code and try to solve it in a similar way. There are only two other exit commands between line 144 and 174. Shouldn't be that hard... With printing the content variable it should be solvable.

But I don't know if you will run in some other problems of wrong strings where e.g. only one quotation marks exists (or whatever). (Perhaps there is a reason for the exit instead of continue...)

Would be nice to hear if it works.

Have a nice day

Thomas

Claudia Kosny

Sunday 27 August 2006 11:35:48 pm

Hi Thomas

Thank you for the tips. I tried it yesterday but unfortunately I seem to have some problems with qt on my computer, so I will have to try it again whenI have more time to solve this.

I'll post my results once I get it done.

Claudia

Ludovic André

Thursday 08 February 2007 7:00:52 am

Hi Claudia,

just to give a little feedback about changing the C code of ezlupdate, I did this today... I encountered the same problem as you, and yeah it's really boring to remove the things from the template, generate the file, then replace the stuff in the template.
I removed the exit(1) called when empty source, and uncommented the continue line.

It appeared to be working properly as of now...

Hope it helps!

Regards

Ludovic André

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu