News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

A tool to translate wxWidgets projects

Started by LETARTARE, August 05, 2013, 11:43:59 PM

Previous topic - Next topic

LETARTARE

I suggest a plugin script for translating project using Code::Blocks wxWidgets.
This extension of  Code::Blocks will be offered on:
https://sourceforge.net/projects/wxtranslate/
and is called :
QuotewxTranslate_plugin.script
I will lay the deposit in a few days.

It scans all files (project, or workspace) then creates the file '*.po' we give Poedit.
It uses 'xgettext.exe' and 'wxrc.exe (tools wxWidgets).

If this tool is interest on the forum ,  I will write a wiki page to describe its use.

Sincerely

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'

BlueHazzard

Hello!
it's a squirrel plug-in?

Seems to be useful, also a separate sourceforge page is great, so the plug-in doesn't get lost!

greetings!

eranon

[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

LETARTARE

Thank you.
Yes, it's a squirrel plugin (78 kb !!) that dialogue with executable.
This is the first time as I use a SVN repository I also gently so as not to make mistakes.
A soon.
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

You can browse the source at :
https://sourceforge.net/projects/wxtranslate/
then get a zip file (or a 7z file).
Version 0.3.1, follow the instructions in the 'infos' (English and French).

Good use.
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

You will find some new pictures of the use on the download site.
https://sourceforge.net/projects/wxtranslate/
A soon.
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'

BlueHazzard

#6
Hi.
i tried your script with c::b ;) and got this error, witch seems legit:

The project name 'Code::Blocks wx2.8.x - Unix' contains an illegal character ':'

i think this should not be a error message, but it should replace the illegal character with something like '_' or '-' ....

I'm also running linux, and i have problems with the ".exe" thing.... it is to hard to implement a check wit "PLATFORM" and remove the .exe from execute string.

greetings

LETARTARE

#7
@BlueHazzard
Thank you for trying.

Yes it's normal ':' is an illegal caracter and  '::' also.
Under Wndows, the name of a file must not use certain characters   ( _T("[:*?\"<>|]") ).
You must change the project name with 'Properties' for example :
QuoteCode::Blocks wx2.8.x - Unix -> CodeBlocks_wx2.8.x_Unix
See "function filenameOk(namefile)":L2379.

I made it clear in the documentation that this script is currently working ONLY for Windows.
Obviously the 'exe' can not be considered under Linux.
I have no running Linux and I can not do testing machine.

Sincerely.
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

I fixed an error in 'wxTranslate_plugin.script':L80 :
Rexe = _T("wxrc294.exe") -> 'Rexe = _T("wxrc.exe")'
new version'0.3.2'

I changed the site, but the download is still on the old version 0.3.1 ??
Also you need to make the change by hand, until 'SourceForge' make changes.
thanks
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'

eranon

Hello. No time to use it right now (an my current project is not at translation stage - oops), but I've seen the screenshots and quickly downloaded then read in diagonal (big explanation file :o)... It sounds promising ;) Do you plan to enter in the contrib plugins which are installable from the plugin manager ?

Also, I didn't understood a line (and maybe others, but not read sequentially) :
Quoteit is assumed that 'codeblocks.exe' is installed in '$(cb_exe)'
What does it means ? Does $(cb_exe) a variable defined somewhere ?
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

LETARTARE

Thank you very much for recovered 'wxTranslateplugin'.

QuoteDo you plan to enter in the contrib plugins which are installable from the plugin manager
For now we must first test to remove all existing errors ...
Then it would make adaptation to Linux and Mac ...

QuoteDoes $(cb_exe) a variable defined somewhere
this is a mistake, it lacks '#'
Quote$(cb_exe) -> $(#cb_exe)
is to indicate the installation path 'codeblocks.exe' in explanations, but it is not necessary to declare this global variable in 'Settings-> Global variables', because it is not used by the script plugin.

The deposit is updated 'wxTranslate-0.3.2'.

Thank you again for pointing me this oversight, but it is probably more.
I remain at your disposal for any explanation.

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'

eranon

OK, better understood about the C::B's cb_exe variable. Also, maybe a tiny thing, but the zip I've downloaded was called Translator.zip : why not use a more explicit filename like wxTranslatePluginForCB_vNNN.zip ?

Good night
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

LETARTARE

@eranon
yes it'possible, but actually it is called 'Translator-0.3.2.zip' or *.7z.
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'

eranon

Yes, I know ;) And it's the reason why of my request... Just because when you have hundreds of GB of piece of software, "Translator" is not very speaking... But it's your plugin of course and I can absolutely rename it locally to be able to retrieve it easily... ;D
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

LETARTARE

@eranon
yes , indeed you are right, I will modify the next release.
Have you tried ?
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'