This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
========================================
PoTrans python3 library and console tool
========================================

Purpose
-------

Automatically translate gettext's *.po files to specified language, using Yandex Translate

Install
-------

::
# pip3 install potrans


Usage of library
----------------

To use it, use must acquire Yandex Translator API key here: https://tech.yandex.ru/keys/get/?service=trnsl
it looks like "trnsl.1.1.20160716T101753Z.a0378f5552843fb4.c5a82afc2a581d1e3717f92d4c753f3f798deb2a"

::
from potrans import Translator

key = "trnsl.1.1.20160716T101753Z.a0378f5552843fb4.c5a82afc2a581d1e3717f92d4c753f3f798deb2a"
translator = Translator(key)
translator.open_po_file("./en_US.po")
translator.go_translate("en", "de")
translator.save_po_file("./de_DE.po")
translator.save_mo_file("./de_DE.mo")

Usage of console script
-----------------------

Translate from Russian to Italian and save result to po-file:

::
potrans translate -i ./ru_RU.po -il ru -ol it -o ./it_IT.po --key trnsl.1.1.20160716T101753Z.a0378f5552843fb4.c5a82afc2a581d1e3717f92d4c753f3f798deb2a

if you don't like to specify key every time, you can put it into ~/.config/potrans.key:

::
echo "trnsl.1.1.20160716T101753Z.a0378f5552843fb4.c5a82afc2a581d1e3717f92d4c753f3f798deb2a" >> ~/.config/potrans.key

now, you can run the same command without key:

::
potrans translate -i ./ru_RU.po -il ru -ol it -o ./it_IT.po

Translate and save result to *.po and *.mo files:

::
potrans translate -i ./ru_RU.po -il ru -ol it -o ./it_IT.po -om ./it.IT.mo

Translate with outputting all the phrases and it's translate strings:

::
potrans translate --debug -i ./ru_RU.po -il ru -ol it -o ./it_IT.po

Translate, using msgid in case msgstr is empty:

::
potrans translate --usemsgid -i ./ru_RU.po -il ru -ol it -o ./it_IT.po

Just convert *.po to *.mo without translation:

::
potrans convert -i ./ru_RU.po -o ./ru_RU.mo


Change Log
==========
0.1.6 - Changed cli, so, yandex_api key no longer needed to convert *.po to *.mo
Added cli.py script to run package cli interface in development

0.1.5 - Added changelogs to a package info

0.1.4 - Added some info to README.rst

0.1.0 - Initial release


Release History

Release History

0.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PoTrans-0.1.6-py3-none-any.whl (7.2 kB) Copy SHA256 Checksum SHA256 py3 Wheel Aug 16, 2016
PoTrans-0.1.6.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Aug 16, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting