CSPro 8 compile error when tr function has parentheses

Other discussions about CSPro
Post Reply
Harry
Posts: 20
Joined: June 17th, 2021, 7:16 pm
Location: Costa Rica

CSPro 8 compile error when tr function has parentheses

Post 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
justinlakier
Posts: 152
Joined: November 21st, 2022, 4:41 pm

Re: CSPro 8 compile error when tr function has parentheses

Post 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
Harry
Posts: 20
Joined: June 17th, 2021, 7:16 pm
Location: Costa Rica

Re: CSPro 8 compile error when tr function has parentheses

Post 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
Attachments
tr_test.zip
(2.85 KiB) Downloaded 7 times
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: CSPro 8 compile error when tr function has parentheses

Post 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.
Post Reply