Convert any comments in source code to another language
- Zebuddi123
- Enthusiast
- Posts: 794
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Convert any comments in source code to another language
mac version sometime today!!!
Update 23/6/12
Linux 32bit added
MD5 f7990b162caa2cb02c2a585280cb0d18
http://goo.gl/2sBMI
Zebuddi.
X64 bit added
MD5 96ff71c1d9b9e8351cee31e39afdeabb
http://goo.gl/zsC8F
Hi to All.
I have written a tool to convert any comments in any language in the source files to another language via google translate.
Operation
1. load a pb source file ( comments are automatically stripped form the file and copied to the clipboard
2. your browser is automatically opened at google translate page
3. click paste in the google translate page
4. process translation to the language of your choice
5. select highlight all the strings in the translation page and click copy
6. click the paste translated comments button in the app
7. original file is backed up and the new source file with the same name is created with the translated comments and opened in PB Ide
job done.
any comments requests etc welcome
adding more enhancements in next version
free to use
MD5 45b9265c32e19ec9ceb702ca16f09561
http://goo.gl/TdXA9
Zebuddi.
Update 23/6/12
Linux 32bit added
MD5 f7990b162caa2cb02c2a585280cb0d18
http://goo.gl/2sBMI
Zebuddi.
X64 bit added
MD5 96ff71c1d9b9e8351cee31e39afdeabb
http://goo.gl/zsC8F
Hi to All.
I have written a tool to convert any comments in any language in the source files to another language via google translate.
Operation
1. load a pb source file ( comments are automatically stripped form the file and copied to the clipboard
2. your browser is automatically opened at google translate page
3. click paste in the google translate page
4. process translation to the language of your choice
5. select highlight all the strings in the translation page and click copy
6. click the paste translated comments button in the app
7. original file is backed up and the new source file with the same name is created with the translated comments and opened in PB Ide
job done.
any comments requests etc welcome
adding more enhancements in next version
free to use
MD5 45b9265c32e19ec9ceb702ca16f09561
http://goo.gl/TdXA9
Zebuddi.
Last edited by Zebuddi123 on Sat Jun 23, 2012 3:21 am, edited 2 times in total.
malleo, caput, bang. Ego, comprehendunt in tempore
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Convert any comments in source code to another language
That is really sweet Zebuddi123, works extremely well. Mind you, Goggle is not very good at Chinese
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- Zebuddi123
- Enthusiast
- Posts: 794
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Re: Convert any comments in source code to another language
Thanks glad its of use and the chinese 也不是我 your right just tried it
Zebuddi.
Zebuddi.
malleo, caput, bang. Ego, comprehendunt in tempore
Re: Convert any comments in source code to another language
Good job! Thanks for sharing.
I tested the app on Mac with an emulator (virtual Box + Windows XP) and it runs fine.
Is it possible to port this to Mac, so it's running native with OS X?
I tested the app on Mac with an emulator (virtual Box + Windows XP) and it runs fine.
Is it possible to port this to Mac, so it's running native with OS X?
michel51
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
- Zebuddi123
- Enthusiast
- Posts: 794
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Re: Convert any comments in source code to another language
Yes Possibly i have mac and linux too just dont use them much i`ll hook the mac up later today tomoz and recompile for mac and linux and post them
Zebuddi
Zebuddi
malleo, caput, bang. Ego, comprehendunt in tempore
-
- Addict
- Posts: 1654
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: Convert any comments in source code to another language
Google can't be good at "Chinese" because "Chinese" is a label affixed to a bucket full of different languages spoken throughout China
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Convert any comments in source code to another language
It's true that China is a land of many languages, but there are only two official languages, Mandarin (all of China) and Cantonese (Hong Kong and Guanxi region).
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Convert any comments in source code to another language
I'll wait....Zebuddi123 wrote:Yes Possibly i have mac and linux too just dont use them much i`ll hook the mac up later today tomoz and recompile for mac and linux and post them
Zebuddi
The app would be more perfectly, if it is able to translate the quoted strings too (see example)
Code: Select all
Message$ + "Ligne: " + Str(XMLErrorLine(#XML)) + " CaractÈre: " + Str(XMLErrorPosition(#XML))
MessageRequester("Information","Sauvegarde effectuÈe.")
Hope it's not a big problem.
michel51
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
Mac OS X Snow Leopard (10.6.8 ) Intel
PureBasic V 5.21(x64), V 5.22beta
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Convert any comments in source code to another language
... add for support .pbi | .txt | *.* file extensions ?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- Zebuddi123
- Enthusiast
- Posts: 794
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Re: Convert any comments in source code to another language
Hi IdeasVacuum
Yes I`am doing, just had a set back with some translations of the strings (Google translates a bugger for reordering some char`s about) going to remove some procedures (parts of) with strings from the translation
hope to make it modular with plugins for other languages C, C++ Java etc.
looking into possibly use translate api directly.
see where it develops from there.
Zebuddi.
Ps just finishing off my brothers "Laser Tattoo Removal --- Business software" then i will be concentrating on this full time as its only been done in bits and bobs so far.
Yes I`am doing, just had a set back with some translations of the strings (Google translates a bugger for reordering some char`s about) going to remove some procedures (parts of) with strings from the translation
hope to make it modular with plugins for other languages C, C++ Java etc.
looking into possibly use translate api directly.
see where it develops from there.
Zebuddi.
Ps just finishing off my brothers "Laser Tattoo Removal --- Business software" then i will be concentrating on this full time as its only been done in bits and bobs so far.
malleo, caput, bang. Ego, comprehendunt in tempore
Re: Convert any comments in source code to another language
I still work on XP (32 bit) on a PC and it doesn't run here.michel51 wrote:I tested the app on Mac with an emulator (virtual Box + Windows XP) and it runs fine.
Any chance you compile it for XP (or open the source) ?
Thanks.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
- Zebuddi123
- Enthusiast
- Posts: 794
- Joined: Wed Feb 01, 2012 3:30 pm
- Location: Nottinghamshire UK
- Contact:
Re: Convert any comments in source code to another language
Hi Joris only just seen this post. If your still interested the code is at http://www.purebasic.fr/english/viewtop ... lc#p459540
zebuddi.
zebuddi.
malleo, caput, bang. Ego, comprehendunt in tempore