News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

error translation in 'ccdebuginfo.cpp'

Started by LETARTARE, November 25, 2022, 05:13:00 PM

Previous topic - Next topic

LETARTARE

In 'cb-13062\src\plugins\codecompletion\parser\ccdebuginfo.cpp:L202'

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

Who could change this code  ? :
Quote_("*") => "*"
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Miguel Gimenez

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 _().

LETARTARE

@Miguel Gimenez
Thanks you.

I would wait for this improvement.
In the meantime I will try to filter this entry.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

gd_on

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 (25H2), svn C::B (last version or almost!), wxWidgets 3.3.2, Msys2 Compilers 16.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Miguel Gimenez

That file is not part of any project. Anyway, I have removed _() from most strings (and added it to others) in r13069.

Miguel Gimenez

r13070 removes _() in wxSmith-generated code if the string contains only non-alpha characters.

LETARTARE

@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-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

How to regenerate the code of  "...\cb-13071\src\plugins\codecompletion\parser\ccdebuginfo.cpp" and "*.h" ?


CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Miguel Gimenez

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.

LETARTARE

#9
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
Quotereplace 'wxChar' by 'wxUniChar'  in line 196 :
if (std::any_of(Source.begin(), Source.end(), [] (wxUniChar c) {return wxIsalpha(c);}))
This solved the problem in my configuration: '_("*")' => _T("*")'
Good Sunday.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

Miguel Gimenez

Strange, it worked here (wx3.2.1 32-bit). Fixed in r13077, thank you.

LETARTARE

I forgot: Win-7::64bits.
I would test tomorrow under Leap-15.4::64bits.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'