Author Topic: error translation in 'ccdebuginfo.cpp'  (Read 3874 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
error translation in 'ccdebuginfo.cpp'
« on: November 25, 2022, 05:13:00 pm »
In 'cb-13062\src\plugins\codecompletion\parser\ccdebuginfo.cpp:L202'

Code
txtFilter = new wxTextCtrl(Panel1, ID_TEXTCTRL1, _("*"), wxDefaultPosition, wxSize(401,21), 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));

Who could change this code  ? :
Quote
_("*") => "*"
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: error translation in 'ccdebuginfo.cpp'
« Reply #1 on: November 25, 2022, 05:27:06 pm »
This line is generated automatically by wxSmith, we can remove the _() but it will be there again whenever the wxs is opened.

Making wxSmith smarter may be a solution: if the string is empty or it only contains symbols, numbers or whitespace do not surround it with _().

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: error translation in 'ccdebuginfo.cpp'
« Reply #2 on: November 25, 2022, 05:35:18 pm »
@Miguel Gimenez
Thanks you.

I would wait for this improvement.
In the meantime I will try to filter this entry.
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: error translation in 'ccdebuginfo.cpp'
« Reply #3 on: November 25, 2022, 05:58:47 pm »
There is another place where a single * is found: line 69 in \src\plugins\contrib\SpellChecker\wxspellchecker\tools\AspellDictionaryDownloader.cpp.
It can be corrected here.
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: error translation in 'ccdebuginfo.cpp'
« Reply #4 on: November 25, 2022, 07:23:26 pm »
That file is not part of any project. Anyway, I have removed _() from most strings (and added it to others) in r13069.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: error translation in 'ccdebuginfo.cpp'
« Reply #5 on: November 26, 2022, 10:04:38 am »
r13070 removes _() in wxSmith-generated code if the string contains only non-alpha characters.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: error translation in 'ccdebuginfo.cpp'
« Reply #6 on: November 26, 2022, 11:53:50 am »
@Miguel Gimenez
The question has hardly been asked and the answer has arrived !!
I thank you for your permanent availability and your speed in solving problems.
I'm going back to the keyboard to test your solution with 'cb13071-wx321'
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: error translation in 'ccdebuginfo.cpp'
« Reply #7 on: November 26, 2022, 12:39:10 pm »
How to regenerate the code of  "...\cb-13071\src\plugins\codecompletion\parser\ccdebuginfo.cpp" and "*.h" ?


CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: error translation in 'ccdebuginfo.cpp'
« Reply #8 on: November 26, 2022, 02:15:41 pm »
If I understand correctly your question, open ccdenbuginfo.wxs from within C::B, change anything and revert the change. This will force rewriting of the cpp file.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: error translation in 'ccdebuginfo.cpp'
« Reply #9 on: November 27, 2022, 04:52:44 pm »
Yes, this is the procedure I followed, but without success !
In nightly builds 'cb-13074' the file 'ccdebuginfo.cpp' still has a '_("*")' in it

Essay with : Win-7, cb-13071, wx-321, gcc-810

I have analysed the modified code of 'wxscodinglang.cpp' and I propose the following modification
Quote
replace 'wxChar' by 'wxUniChar'  in line 196 :
Code
if (std::any_of(Source.begin(), Source.end(), [] (wxUniChar c) {return wxIsalpha(c);}))
This solved the problem in my configuration:
Code
 '_("*")' => _T("*")'
Good Sunday.
« Last Edit: November 27, 2022, 05:29:00 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: error translation in 'ccdebuginfo.cpp'
« Reply #10 on: November 27, 2022, 05:41:39 pm »
Strange, it worked here (wx3.2.1 32-bit). Fixed in r13077, thank you.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: error translation in 'ccdebuginfo.cpp'
« Reply #11 on: November 27, 2022, 06:18:25 pm »
I forgot: Win-7::64bits.
I would test tomorrow under Leap-15.4::64bits.
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl