Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Semi-automated translation for U++
Semi-automated translation for U++ [message #34434] Tue, 22 November 2011 15:26
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
Hi guys!
I wanted to see U++ library available in my language. I read these instrutions http://www.ultimatepp.org/srcdoc$Core$Translating$en-us.html and found it very tedious job.

So I coded a little Tcl script to automate this for me.

How does it work?
Well, first of all it's not fully automated, it just helps a little bit.

Step 1:
Generate the .tr file with the instructions at the U++ docs.
I got the attached PT-BR.UTF-8.tr file.


Step 2:
Go to http://translate.google.com and translate the file above.
Automatic translation should save some time, but it's not perfect.
Copy and paste it and save it as translated.txt. I got the attached translated.txt file.

Step3:
Run my attached Tcl script as follows:
$ tclsh parse.tcl PT-BR.UTF-8.tr translated.txt > test.txt

I got the attached test.txt file. Which is already in U++ translation format, but the translation is not perfect because it was translated by Google translate.
But now the job is half done. Most of the strings are already translated right. I just need to fix the broken ones.

Step 4:
The final step is to fix the broken translations (hopefully very few if Google does its job fine).

That's it. I hope you like my tool. Attached are the files including the Tcl script.
To run the script you need Tcl installed. On Ubuntu you can install it with "sudo apt-get install tcl8.5" if it's not already isntalled.
You can get a self-contained script interpreter here: http://equi4.com/tclkit/ for all platforms including Windows.
In this case run "tclkit parse.tcl PT-BR.UTF-8.tr translated.txt > test.txt".

Conclusion:
I just wanted to share this. I'll upload the fixed ptBR translation when I have some time to edit the file.


  • Attachment: PT-BR.UTF-8.tr
    (Size: 18.34KB, Downloaded 338 times)
  • Attachment: translated.txt
    (Size: 17.59KB, Downloaded 501 times)
  • Attachment: test.txt
    (Size: 22.63KB, Downloaded 477 times)
  • Attachment: parse.tcl
    (Size: 0.30KB, Downloaded 341 times)
Previous Topic: TheIDE editor and accented words
Next Topic: Export and import .tr files in other languages than english<-->LANG
Goto Forum:
  


Current Time: Fri Mar 29 03:36:04 CET 2024

Total time taken to generate the page: 0.01031 seconds