Ubuntu Contributor
July 31, 2008
As a eventual contributor to Ubuntu [1] at Launchpad [2][4], sometimes I contribute with English->Portuguese translations. Well, sometimes I use a good tool known as Open-Tran [3], written by Jacek Sliwerski, to help me with technical or language specificities on translation.
The beautiful of this tool (open-tran) is the Python xml-rpc support. Then, translation can be done in this way:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from xmlrpclib import ServerProxy
lang = "pt_br"
server = ServerProxy("http://open-tran.eu/RPC2")
if __name__ == "__main__":
if sys.argv.__len__() == 2:
for sugg in server.suggest(sys.argv[1],lang):
print sugg
else:
print "Usage: %s <words_to_translate>" % sys.argv[0]
sys.exit(1)
sys.exit(0)
Now, I can translate a text:
translate.py "I feel happy"
Easily, yeah ?!
If you are a Brazilian and wants to help Ubuntu and Open Source cause, you can do it through Launchpad. Visit the Brazilian community at http://launchpad.net/~ubuntu-l10n-pt-br
Meet at https://launchpad.net/~n1ghtcr4wler
Useful links:







