Page 1 of 1

CSPro 8 compile error when tr function has parentheses

Posted: February 12th, 2024, 4:32 pm
by Harry
Dear CSPro team,
today I installed CSPro 8 and compiled one application that works in CSPro 7.7, it gave me a lot of compiling errors, saying one " is missing in the message file. After reviewing them, I noticed the errors were proceduced when I have parentheses inside the string in the tr function, like tr("aa (bb) cc"). The errorrs are reported in the corresponding translation line in the message file, like ES("aa (bb) cc") xx (yy) zz.
Thanks in advance.
Harry Hernandez

Re: CSPro 8 compile error when tr function has parentheses

Posted: February 20th, 2024, 6:23 pm
by justinlakier
Hello,

My testing of tr() with internal parentheses did not reproduce this issue. Please attach (or email to cspro@lists.census.gov if confidential) a zip file of your application so that we can demo it and see why this compilation error is occurring.

Thank you,
Justin

Re: CSPro 8 compile error when tr function has parentheses

Posted: February 24th, 2024, 6:27 pm
by Harry
Thanks Justing for your answer.
I am attaching a tiny application just to show the error message. When I wrote it the CSPro 8.0 gave no errors, but in the moment that I added the language ES to the dictionnary the compiling error appeared.
Regards,
Harry

Re: CSPro 8 compile error when tr function has parentheses

Posted: February 26th, 2024, 8:55 am
by Gregory Martin
This is embarrassing (since I'm the one who programmed this). You're right that this is a bug which occurs if you include a right parenthesis in the translated string literal. We'll fix it for CSPro 8.0.1.

In the meantime, a workaround would be to use a different style of parenthesis,()instead of ().

Thanks for reporting this bug, and sorry for the inconvenience.