Author Topic: A tool to translate wxWidgets projects  (Read 73701 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: A tool to translate wxWidgets projects
« Reply #15 on: August 12, 2013, 08:15:52 pm »
Have you tried ?

Not yet, but when I'll do I'll tell you for sure ;)
[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"]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: A tool to translate wxWidgets projects
« Reply #16 on: August 12, 2013, 09:20:34 pm »
New release 'wxTranslatePluginForCB-0.3.3.7z'.
Fixed some minor bugs.
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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: A tool to translate wxWidgets projects
« Reply #17 on: August 13, 2013, 10:10:14 pm »
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
« Last Edit: August 13, 2013, 10:13:22 pm by 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"]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: A tool to translate wxWidgets projects
« Reply #18 on: August 16, 2013, 06:40:37 pm »
@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-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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: A tool to translate wxWidgets projects
« Reply #19 on: August 18, 2013, 10:33:34 pm »
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"]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: A tool to translate wxWidgets projects
« Reply #20 on: August 19, 2013, 06:32:33 pm »
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
Quote
but it should replace the illegal character with something like '_' or '-'
Now it asks the user if he wants replace illegal characters.

Cordially
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: A tool to translate wxWidgets projects
« Reply #21 on: August 21, 2013, 10:48:13 am »
I just found an oversight in 'Read.me' ('Alire.txt) :
Quote
3-1- Copy the 'wxTranslate_plugin' script in the script directory of  'Code::Blocks'
must be replaced by :
Quote
3-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-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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: A tool to translate wxWidgets projects
« Reply #22 on: August 25, 2013, 06:36:56 pm »
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
« Last Edit: August 25, 2013, 06:54:24 pm by 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"]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: A tool to translate wxWidgets projects
« Reply #23 on: August 26, 2013, 12:34:21 am »
hello,
it is good news that you can use.

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

Quote
During 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.

Quote
it 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.

Quote
At 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'

Quote
I'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.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.


« Last Edit: August 26, 2013, 12:06:03 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 LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: A tool to translate wxWidgets projects
« Reply #24 on: August 28, 2013, 02:25:06 am »
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-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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: A tool to translate wxWidgets projects
« Reply #25 on: September 22, 2013, 05:30:41 pm »
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"]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: A tool to translate wxWidgets projects
« Reply #26 on: September 23, 2013, 11:47:45 am »
Thank you for the positive test.

About possible improvements :

1- waiting for a fix, you can change the line 'wxtranslate_plugin.script:L93'
Code
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-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: A tool to translate wxWidgets projects
« Reply #27 on: September 24, 2013, 10:56:16 am »
Version 0.4.3 is available :
https://sourceforge.net/projects/wxtranslate

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

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: A tool to translate wxWidgets projects
« Reply #28 on: September 26, 2013, 06:13:12 pm »
Version 0.4.4 is available :
https://sourceforge.net/projects/wxtranslate
- bug fix name '*.po'
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: A tool to translate wxWidgets projects
« Reply #29 on: September 29, 2013, 08:58:26 am »
Version 0.4.5 is available :
https://sourceforge.net/projects/wxtranslate

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