 Hi everyone, so this is Sandeep Anand and I'm based at Pune, India for the next couple I mean for next 20 minutes. We'll be talking about Zenata Zenata server as in and using Zenata server with Python client. So Python client is Is a community project and Python client is a Client which is purely retained Python we can contribute to it and my motive is only to describe How we can contribute into Python client to make it better what it is So let's have a look at what is Zenata exactly. So can I have a quick survey like do anybody here know Zenata or Okay You're using Zenata or Okay, okay, fine cool So Zenata is a translation management framework. I mean translation management platform web-based platform Where we actually push all the translations get them translated and pull them back to our software Translate.genata.org is the link for all available users all project managers I mean all packet managers who actually They can actually create a log in over here and have an account and Use that account to localize their project other Instances are Fedora.genata.org where all Fedora projects are being pointed second is translate.openstack.org this is the dedicated instance for OpenStack and Actually, it contains the automation for pull and push thing through G-RIT The third is translate.javas.org and This this is the dedicated instance for Javas project You can catch any of the members from Zenata at IRC the channel is hash Zenata Or write to Zenata DevL or Zenata bugs if you have any so these are two points Where you can have all your concerns sorted out Now these are three important links if you are interested you can take them down and The first is code everything is available at github slash Zenata second is docs all the docs are at Here itself like they are read these are redirect URLs for readme docs So docs not there are not over G slash release and everything REST API is Zenata REST API documentation is at CloudVs because Zenata team uses CloudVs for their CI thing Issues for issues we have Jira configured at this link So if you found any of the issues or anything You can you can create a ticket over this link and we are there who are working at the back end of that and We'll take that tickets So now in the present now for the next 10 to 15 minutes I'll be showing entirely how we can interact with a Zenata Using Python client in server side will look for how we can create projects languages glossary user settings and project settings In the client sites we have two clients first is Zenata CLI second is another Python client Zenata CLI is written in Java and Major family it is used by projects which are in Java and Python clients are the Python client is a client which is being used by Fedora guys for Fedora infrastructure and all and open stack all as well so In Python client we'll see how we can push the Templates to server how we can translate them pull them back and how we can see the stats so let's Go back to the demo thing first this is translate.zenata.ovg the home page of Zenata server which everyone can use and Here you can log in or you can use a Fedora ID, Google ID, Yahoo ID or OpenID and This is the login username and password thing you can sign up also sign up Just require one or two details and it will send an email email verification is required and then you will have an account in Zenata Now this is my instance of Zenata, and I do have one username SEM. This is my IRC Nick and password so let's get in so at the top we have certain links like projects, groups, languages, glossary and hell Yes So in projects it will be showing all the projects here itself in the list. We have just one project ZPC demo This is the description on the project decision date and the status as active The second link is languages here. We have the list of all the languages which are enabled for this entire instance Here the list are displayed for entire instance. This is not project basis This is glossary tab currently we don't have any glossary at all for this instance and If we select any language we can create glossaries for language basis So this will be global space for the glossaries which will be available for all the projects within this instance now Let's get to the user's dashboard. So this is the dashboard which is presented to user It has some activities log projects there it's in and this setting this setting is for user setting Here we have certain things like email password and all and the important thing here is a client So we need a API key to get it interactive with Zenata So once we click on this button API key is being generated and this is the configuration we need to have in our Clients configuration. So for any of the client may be a Java client or Python client We need two things first user setting this values and second project settings So user settings is a must-have for a client Now let's get to projects This is project setting tab in general it has some general at parameters This is an important thing This is project types which are being supported in Zenata as of now So first is file the plain text which is used for LibreOffice and in-design HTML subtitles second is get text it is for the projects which have just one get text file or Which have PO files as in not on which are not categorized under the Subdirectories of locale in the name of locale. So third is PODIR mostly it is for Publican projects fourth is properties for Java project files UTF-8 properties Xlik and YXML Yeah, actually we are working to extend this support to many other languages as well This is the home page. This is a Repository URL you can make this project read only or delete that project The second important part is languages. So languages is this is per project basis languages So that was global space. This is a local space to this project Hindi, Malay and Tamil Two for Singapore and one for India enabled for this project as of now the rest of the languages are disabled Like in use you can create aliases also aliases means like suppose sorry, suppose You are working in you are working for some language for Malay in Singapore So its code would be MS-SG, but in your project you are keeping the code as MS only So you can create aliases like MS which will be mapped to MS-SG So at server you will be having MS-SG, but at your client end you will be having MS only That will be mapped and taken care of automatically in the client So this is how we can disable or enable any language So disabling and enabling any language in a project depends upon it has been activated for entire instance or not These are validation part These are the settings for validating your translations and more of a translators job thing These are permission staff We books is an important personality Suppose you want like you should have a notification when a document is fully translated So you can configure web book you can add a web book and the URL you will mention here The URL will be accepting the post thing from server that this document is completed and done for the translation Now I think we are good to start with Python client So if you guys have any questions regarding Xanata you can please ask Or we can switch to Python So this these are the commands These are the commands which is available in Python client as of now the first is help Obviously help will show this list in it in it is a command Which is for the people who are my I mean which are newbie to this Python client. They can get it started quickly How is list this will list all available projects for the Xanata instance you are pointing to For this project info version info. This is just information part create the second version Next is push and pull actually public and pull and public and push You pull and you push these four commands are deprecated because the personality are We have inbuilt those personality in push and pull itself So now it's just Xanata push and pull the third is glossary push and the fourth is stacks So in this session we will be covering in it list push and pull stacks and if we If we get some time then others also so let's start with Xanata in it and if if you want to know any of the I Mean help of any of the commands you should issue this thing Xanata in it help So this will show all the parameters optional parameters, which can be supplied to the command itself Actually, you can provide you are a username effect everything in the command itself if you if you don't have the Project configuration. So what is user and project configuration? Yes? See currently we have forces here is my tablet. That is a PO file Second is translations folder tablet folder and the not Okay, so now let's start with in it. It will complain for user configuration file Xanata. I know is missing So let's create that You just need to copy page this thing now we are good to go and Once we issue this Actually the default path for user configuration is in dot config at at your home folder. Otherwise, you can specify the path like user config Xanata.ina So now it will fetch all the Servers which are being listed in Xanata.ina. First it is time local of string So which server do you want to use say one? Now it will ask you like you want to create a new project or existing say existing Then it will list on all the projects which we just found at the server demo or something. So let use that now Version CS version is an important part. Suppose you have created one project We have one project at GitHub and you have created the similar project at Xanata So version can be created as per your need It can be as per your release or it can be as per your branches or it is as for you Like how you manage your versions and all so Let's create a new version Now we have an information here. Now you are working with project demo on version for chassis of type POD IR So currently we have taken the type as POD IR. Let's see For base directories here templates template Okay, so we have given the source Directory where we wish we are supposed to keep all our Templates at and we have given the translated fold. I mean translation folder Which the location at which all the translations which are being faced from the notice of a will be kept So this will create our project configuration file senator dot XML. It's scattered So this is project configuration at minimum XML thing then you are in local or slash Xanata something your project description demo. This is project ID Which comes in URL as as I mean URL also This is version like for she's here Source directly template translation directly translations and everything now. Let's push something Something has happened I'm sorry. Actually we need template files in the form of dot for thing. So that was the error and if we see at the server then We have one document as for she's here and Actually, we can have all the translations written here itself. So I have some translations with me right now So maybe I'll be pushing them as it says So now say translated and complete approved So once we said that in the other that it is translated and completed then if you see at our python client as a stats So it will show me the stats like there are three messages in that file Untranslated or free and one is translated for this is actually Now, let's pull those five to our server to our plant. Sorry So here we can see that we have three folders in the name of HIN, MASG, MSSG and PASG So these are the folders which which have been created because our project type was below DIR And in MSSG, please look at this file. So currently it doesn't have translations because It is not yet completely served I think. Oh, sorry Actually, I was translating Hindi Sorry, I just put translations in Hindi file. So it appears here. That is why in a stats it was showing It was showing for Hindi it is said that untranslated is one and translated is One so a needs review is one just because we have not yet reviewed for the second string So sorry about the between thing any questions so far in python client Actually for a templates thing it is scan for dot bot files. So that I missed Okay, so I have one slide left Me about co-distriction and all so setting up python client is Abuse now you can have your virtual environment active and we can clone the project install requirements.dev is Currently we are maintaining two files requirements.txt and requirements Requirements dev.txt. So requirement dev.txt is the file which contains all the dependencies for test cases Test cases and other so it is recommended for development environment You can import that project in your python id code structure is like for configuration We are maintaining two files context and pass config. Pass config is for passing everything. I mean command line arguments plus the two file Passes user config and project config context is the one Where we actually generate entire context for a given command as per the mode is specified and In the commands we have all the commands do have their own file as of now Zanata is the parent file 100 pi where all the doc strings are there which the help thing which has been popped up from doc strings Then command.py and Zanata command command base.py these two files are basis for all the commands these are command line argument implementation and push full command Push command and push full command these two files do contain all the code for push and pull thing and it is for init And for rest API we have many files the poor Poor file is an under rest folder the client and the config if you want to add support for any of the Rest API which is being exposed by Zanata server newly so you you you actually need to enter the configuration config file and then client file automatically fetch that configuration and Make it available to all the commands. I mean come on at command level and these are the dedicated Service files like doggies doc service glossary project stats and version service We keep I mean we keep all the services in different files just to have proper identification or just to have the Good approach so that we can enhance those services at service layer itself not at command implementation layer and Some utilities we do use like public and you feel project you to see as we cannot a pass logger near it requirements are these two files if you have any of the bugs or anything then you can log it log them at bugzilla.rela.com or you can search Using bug status as open component is Zanatopathan client new feature and bugs can be logged at Zero so this is zero link So you can go and have a look at these two links like what is happening and the bugs We are currently working on so these are two links You can contribute or get started with Zanatopathan client using these info Now should we have any questions or anything you can any ways bring me at Free note at hash Zanata. My nickname is Su Anand Can we share translations beyond the project so between projects Is there a pool of publicly available translation? Actually at Zanata server level no But yes, if you have fetched some of the trans or pulled some of the translations from server to your client and Then you have some other project you can merge those translated Translations at client level and then push that translation to server So this way you can do or you can create glossaries for them because glossaries are global Actually, yes Java Java is much much stable than Python Clang and Currently Python Clang I'm working on it. So it is my responsibility to Anything else anybody who is interested to contribute in this If you got some time you can implement any of the API or you can enhance any other feature Currently it only supports PO files port files get text and POD IR There is a plan to expand its support to Java files also, but let's say I mean that that's a plan So I think I'm over time