News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

A tool to translate wxWidgets projects

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

Previous topic - Next topic

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

New release 'wxTranslatePluginForCB-0.3.3.7z'.
Fixed some minor bugs.
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

#17
OK, I've quickly taken a try and I stopped when wxTranslate warned me I've not poedit nor wxrc binded with C::B... To do next time :)

Well, but my feeback at this step (since it's the goal of the exchange ; to be positive) :

- Your help file (under "info") is quite complex to follow. For me, the installation and use are far easier and could be explained in some lines like (written quickly) :
 1) Copy the wxTranslate script in the C::B scripts directory
 2) Add the line "here-the-line-content" in the C::B startup script
 3) Launch the C::B console from the View menu to initialize the wxTranslate menu
 4) Launch a project and right-click on one of its virtual directories to display the wxTranslate menu
 5) Choose the "List" command to preview the strings to translate OR the "Extract" one to proceed for real

Also, maybe you should add some lines about the pre-requisite : how to exactly bind poedit.exe and wxrc.exe with C::B...

Have a good evening, LETARTARE
[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
Thank you for trying 'wxTranslate_plugin'.
Your feedback is sound, and I changed the file 'Readme.txt' and 'Alire.txt' adding the information that you suggest.
So I added the pre-requisites, and a simplified installation.
'Poedit' is not necessary, only 'xgettext.exe', 'msmerge.exe' are absolutely.
As for 'wxrc.exe', it is used only for extensions '.xrc', and '.wxs'.

Forgot :
If after using 'List active project' is abandoned : it remains temporary files '*.str' created by 'wxrc.exe'
As I prepare a new version (0.4.0 ?) to clean up these files if necessary.

Thank you again for your positive ratings.
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, I'll be back when you'll release the 0.4.0 ;)
[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

Version 0.4.0 is available :

- Improved handling of temporary files by context menu
- The console logs are used to display the workflow
- Illegal characters in the names we manage projects
- Placement 'wxrc.exe' is extended to multiple directories
- Explanatory files are updated

@BlueHazzard
Quotebut it should replace the illegal character with something like '_' or '-'
Now it asks the user if he wants replace illegal characters.

Cordially
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 just found an oversight in 'Read.me' ('Alire.txt) :
Quote3-1- Copy the 'wxTranslate_plugin' script in the script directory of  'Code::Blocks'
must be replaced by :
Quote3-1- Copy the 'wxTranslate_plugin' and 'tools' scripts in the script directory of  'Code::Blocks'
because 'wxTranslate_plugin.script'  load  'tools.script'.

Similar correction in  'infos/wxTranslate_exp.en' in E-2 (*.fr).
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

#22
OK, tried the 0.4.1 : it globally works :)

Well, to continue in the same spirit as the one from beginning, here are my constructive comments :

- I still think you complicate what is simple in your explanations (a lot of literature to say something) ;)
- During the list then extract, I received several security warnings (requiring to allow privilege to your scripts)
- At the end of listing (using the "List" command) it reported a duration as 0h 00 mn 0s : funny ! Maybe you could strip-out this info when time is below, say, 15 seconds, or indicate the miliseconds too.
- At the end of the extraction, you don't tell where have been generated the files (ie. under "trlocale" subdirectory).
- I've seen a message box talking about conversion of $$ and %% to $ and %, but I don't know what's about...

For sure, I'll use it when I'll be at localization stage ;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

#23
hello,
it is good news that you can use.

QuoteI still think you complicate what is simple in your explanations
I'll try to simplify ...

QuoteDuring the list then extract, I received several security warnings
- see  'wxTranslate_exp.en::NOTES-3-1'
- if it persists, it is better (especially if you have multiple versions installed 'Code::Blocks')
   1- install'' 'wxTranslatepluginforCB-xyz' in a working directory anywhere
   2- and from 'Settings->Scripting...->General->Add' add script,
so you can validate it or not, you have access to the tab 'Security' ..., it is more flexible to use.

Quoteit reported a duration as 0h 00 mn 0s
It is a mistake unresolved in script with macro '$(NOW_L) inside  'function duration(begin, end):L2649' for  'List'
Yet at the end of extraction, time seems correct.

QuoteAt the end of the extraction, you don't tell where have been generated the files
- see 'wxTranslate_exp.en::NOTES-3-1'
- I will indicate before ... 'trlocale\project_name.po'

QuoteI've seen a message box talking about conversion of $$ and %% to $ and %
- see 'wxTranslate_exp.en::USE ON SINGLE PROJECT-3.2'  : integrity check of file 'po'
   - removing its characters possibly "\r",
   - replacing its strings possibly "$$..." by "$..."
http://forums.next.codeblocks.org/index.php/topic,1022.msg66337.html#msg66337
   - replacing its strings possibly "%%..." by "%..."
   - modifying its header using a few macros of 'Code::Blocks'
-but you can answer 'no', and then it does nothing.

Thank you again for the constructive feedback. Because when you work alone, you do not see the point.
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

Version 0.4.2 is available :
https://sourceforge.net/projects/wxtranslate

- bug fix on contextual menus when using a project without the  *.xrc or *.wxs file
- try simplification of documentation ...


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

Tried this last version and it's OK for me (not applied in my real projects until now, but I'll do it soon). Better explanations in the readme/alire (I installed it in an independent path this time) ;)

About possible improvements (maybe) :
- Possibility to choose the name of the subdirectory in which the files are generated (currently "trlocale")
- Possibility to choose the final filename base (for example talking about a project named "test", I would prefer "test.po" rather than "test_alone.po", and "test_workspace.po" rather than "test.po" for a translated workspace)
- An option to do all steps with one click only (i.e. list -> extract -> delete temp files).

Sounds better from version to version... So, good job !
[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 for the positive test.

About possible improvements :

1- waiting for a fix, you can change the line 'wxtranslate_plugin.script:L93'
Dirlocale =  _T("trlocale") + ::wxFILE_SEP_PATH

2- I agree, it is more consistent ( -> v 0.4.3),

3- this is more difficult because it complicates the menus and allow many combinations to predict,
I put it on the list of requests.

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

Version 0.4.3 is available :
https://sourceforge.net/projects/wxtranslate

- Renaming of files po :
   - simple project -> '*.po'
   - cooperative project -> '*_workspace.po'

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

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

Version 0.4.5 is available :
https://sourceforge.net/projects/wxtranslate

- bug fix : did not take into account the target of type 'CommandsOnly'
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'