Slide 1

Slide 1 text

Getting Started Zanata Python Client

Slide 2

Slide 2 text

Why to localize apps make Some non-english users want to give a try to your app. Probably you have plans to launch your app in a new territory say - Japan!! { “my_app”: “brand_new”} { “my_app”: “i18n-ed”} { “my_app”: “l10n-ed”} { “my_app”: “ship_ready”} Translation Platform i18n: Engineering Changes l10n: Extract - Push - Translate - Pull - Merge g11n

Slide 3

Slide 3 text

Where Zanata lies which Zanata is a web-based system for translators, content creators and developers to manage localisation projects. http://zanata.org/ Open Source Translation Platform well adopted in communities - https://translate.zanata.org/ - https://fedora.zanata.org/ - https://translate.openstack.org/ - https://translate.jboss.org/ Docs: http://docs.zanata.org/en/release/ Projects - Versions Groups Languages Glossaries REST API https://zanata.ci.cloudbees.com/job/zanata-api-site/site/zanata-common-api/rest-api-docs/index.html Push Pull

Slide 4

Slide 4 text

Interact with Zanata… ls ZNTA z-p-c zanata-cli zanata-js tmgmt_zanata sync I18next-node- zanata-backend

Slide 5

Slide 5 text

Zanata Python Client help Usage: zanata [COMMANDOPTION]... list of commands: glossary push Push the glossary files to Zanata server help Display this help and exit init Initialize Zanata project configuration list List all available projects po pull Pull the content of gettext project po push Push the content of gettext project to Zanata server project create Create a project project info Show information about a project publican pull Pull the content of publican (podir) project publican push Push the content of publican (podir) project to Zanata server pull Pull the content of software project/docbook project from Zanata server push Push the content of software project/docbook project to Zanata server stats Displays translation statistics for a Zanata project version version create Create a version within a project version info Show information about a version available system options: --help Display this help or detail usage of commands --version Display python client version Use 'zanata help' for the full list of commands Use 'zanata help , zanata --help or zanata -h' for detail usage of commands User Config (.ini) Project Config (.xml) z-p-c cli app ZNTA REST APIs

Slide 6

Slide 6 text

Code tree [1] Configuration (Remote, Local: zanata.ini, zanata.xml, command-line) context.py, parseconfig.py [2] Commands - Interface and their implementation zanata.py, command.py, zanatacmd.py, cmdbase.py, pushcmd.py, pullcmd.py, initcmd.py [3] REST APIs - Commands Logic to REST Resource mapping zanatalib/rest/client.py, zanatalib/rest/config.py, resource.py, service.py docservice.py, glossaryservice.py, projectservice.py, statservice.py, versionservice.py [4] Others: utilities, converters, parsers, logger, error publicanutil.py, projectutils.py, csvconverter.py, parseconfig.py, logger.py, error.py [5] Requirements requirements.txt, requirements-dev.txt

Slide 7

Slide 7 text

API Resources curl - Projects list projects - Project individual project CRUD - Project Iteration project_version CRUD - Source Doc push/list templates/docs - Translated Doc pull translations - Project Locales list language codes - Project Iteration Locales locale_mapping - Statistics translation stats - Glossary glossaries CRUD { "id": "plm", "defaultType" : "Gettext", "name": "PLM", "description" : "Translations of the Programmer's Learning Machine.", "iterations" : [ { "id": "ui", "links": [ { "href": "iterations/i/ui", "rel": "self", "type": "application/vnd.zanata.project.iteration+json" } ], "status" : "ACTIVE", "projectType" : "Gettext" }, { "id": "missions", "links": [ { "href": "iterations/i/missions", "rel": "self", "type": "application/vnd.zanata.project.iteration+json" } ], "status" : "ACTIVE", "projectType" : "Gettext" } ], "status" : "ACTIVE" }

Slide 8

Slide 8 text

Walk-through exec Commands: - Initialize a project configuration zanata init - Push some gettext templates zanata push - Pull all the translation back zanata pull - Let’s see some statistics zanata stats

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

How to start contribution git - Look for Bugs - https://github.com/sundeep-co-in/zanata-python-client/issues - https://bugzilla.redhat.com, bug_status=open, component=zanata-python-client - https://zanata.atlassian.net/secure/Dashboard.jspa - Setup devel environment - $ workon zpc && cd - $ git clone https://github.com/zanata/zanata-python-client.git - $ pip install -r requirements-dev.txt - $ git checkout -b - Submit your changes upstream - After some code changes, $ make flake8 test - Create pull request, if possible link your PR with JIRA ticket - Code-review > QA > Merge

Slide 11

Slide 11 text

Users (vs. developers) stat - Java-Client supported by Zanata Team - Python-Client community driven - Some developers use z-p-c in - fedora-infra team - installer engineering team Many python based large projects are interested in Python-Client - Because this sets chance where they can contribute into the project - 140 commits, 51 releases and 16 contributors as on Oct 20, 2016

Slide 12

Slide 12 text

Where to look for help talk - Catch Zanata Team at IRC freenode #zanata - write to - [email protected] - [email protected] - [email protected] Q & A _______________________________________________________________________ Thank You!!