how to translate apache cloudstack docs

27
Transla’ng Apache CloudStack (ACS) Documenta’on Sebas’en Goasguen @sebgoa

Upload: sebastien-goasguen

Post on 05-Dec-2014

6.020 views

Category:

Technology


0 download

DESCRIPTION

Slide Deck describing how to translate the Apache CloudStack documentation using transifex an publican. CloudStack has an extensive documentation built using docbook xml files and publican. Localization i.e translation of that documentation is handled by transifex a web service that translators can use to submit translated strings. These translations are then pulled from transifex and committed to the cloudstack source tree to build the documentation in multiple languages. This same workflow is used to translate the graphical user interface elements. We currently have support for several languages in the GUI including: Japanese, Chinese, Taiwanese, Russian, Italian, French etc... check http://transifex.com and search for CloudStack. This talk shows you how to use transifex from the web UI as well as from the transifex command line client and submit translations.

TRANSCRIPT

Page 1: How to Translate Apache CloudStack Docs

Transla'ng  Apache  CloudStack  (ACS)  

Documenta'on  Sebas'en  Goasguen    

@sebgoa    

Page 2: How to Translate Apache CloudStack Docs

Outline  

•  CloudStack  documenta'on  •  Transla'on  concepts  •  Using  Transifex  website  •  Using  the  Transifex  client  •  Working  with  the  ACS  source  code    

Based  on:  hFp://sebgoa.blogspot.ch/2012/11/transla'ng-­‐apache-­‐cloudstack-­‐docs-­‐with.html  

hFp://sebgoa.blogspot.ch/2012/12/using-­‐transifex-­‐client-­‐to-­‐translate.html            

Page 3: How to Translate Apache CloudStack Docs

                               ACS    Documenta'on  

•  Apache  CloudStack  documenta'on  is  wriFen  in  DocBook  xml  format.  

•  The  various  documenta'on  ar'facts  are  built  with  Publican  

•  Documenta'on  source  files  are  part  of  the  ACS  source  tree  under  the  docs  directory.  

hFp://www.docbook.org  hFp://jfearn.fedorapeople.org/en-­‐US/Publican/2.7/html/Users_Guide/  

hFps://git-­‐wip-­‐us.apache.org/repos/asf/incubator-­‐cloudstack    

Page 4: How to Translate Apache CloudStack Docs

                                 ACS  Documenta'on  

•  To  modify/correct  the  documenta'on:    – Submit  a  jira  'cket  to  track  your  modifica'on  and  highlight  the  issue.  

– Clone  the  git  repository  – Prepare  a  patch  – Submit  the  patch  via  Review  Board  

hFps://issues.apache.org/jira/browse/CLOUDSTACK  hFps://git-­‐wip-­‐us.apache.org/repos/asf/incubator-­‐cloudstack  

hFps://reviews.apache.org/dashboard/    

Page 5: How to Translate Apache CloudStack Docs

                               Transla'on  concepts  

•  With  Publican  we  can  build  the  documenta'on  in  different  languages.  

•  To  do  this  we  need  every  string  of  the  documenta'on  to  be  translated  in  the  targeted  language.  

•  Anyone  can  contribute  string  transla8on  without  even  working  with  the  source  code.  

•  To  do  so  we  use  Transifex  hFp://rlandmann.fedorapeople.org/pug/sect-­‐Users_Guide-­‐Preparing_a_document_for_transla'on.html  

hFps://www.transifex.com      

Page 6: How to Translate Apache CloudStack Docs

Sign  up  

Page 7: How to Translate Apache CloudStack Docs

                   Your  dashboard  

Page 8: How to Translate Apache CloudStack Docs

                         Search  for  ACS  projects  

Page 9: How to Translate Apache CloudStack Docs

               ACS  projects  

•  There  are  currently  three  ACS  projects  that  need  transla'on:  – ACS  UI  (The  Web  UI)  – ACS  Runbook  (a.k.a  Quick  Install  Guide)  – ACS  DOCS  (The  en're  documenta'on)  

Page 10: How to Translate Apache CloudStack Docs

                           Pick  a  project  

Page 11: How to Translate Apache CloudStack Docs

                               Check  the  Resources  

Resources  correspond  to  the  DocBook  XML  files  in  the  source  tree  

Page 12: How to Translate Apache CloudStack Docs

                 Pick  One  and  Add    transla'on  

Page 13: How to Translate Apache CloudStack Docs

                         Pick  the  target              language  

Page 14: How to Translate Apache CloudStack Docs

                               Translate  strings  

Page 15: How to Translate Apache CloudStack Docs

                           Save  your  transla'ons  

NB:  Check  poten'al  sugges'on,  enter  the  transla'on,  submit  it        

Page 16: How to Translate Apache CloudStack Docs

                           Check  Progress                                  for  your  language  

Page 17: How to Translate Apache CloudStack Docs

                                     Transifex  Client  

     

•  The  website  is  really  easy  to  use,  but  you  can  also  use  the  transifex  client  (tx)  if  you  want  to  work  from  the  command  line.  

•  You  s'll  need  to  signup  on  the  website    

pip install transifex-client!  

hFp://help.transifex.com/features/client/  hFps://pypi.python.org/pypi/transifex-­‐client/  

   

Page 18: How to Translate Apache CloudStack Docs

                       Setup  the  Project  

     

•  This  part  is  not  linked  to  the  ACS  source,  it  can  be  done  without  checking  the  ACS  code.  

•  Ini'alize  a  transifex  project  on  your  computer  

   $ mkdir txproject!! !$ cd txproject!! !$ tx init!

Page 19: How to Translate Apache CloudStack Docs

           Point  to  ACS                        Transifex  project  

     

     

     

•  For  the  main  documenta'on:  ! !$ tx set --auto-remote https://www.transifex.com/! ! !projects/p/ACS_DOCS/!

•  Pull  all  resources  for  the  project      $ tx pull –s!

•  Pull  exis'ng  transla'ons      $ tx pull –a !

Page 20: How to Translate Apache CloudStack Docs

Translate  

     

     

     

•  Pick  a  resource  and  make  a  copy  with  the  language  code  of  your  target  language,  for  example:  $ cp translations/ACS_DOCS.pod-add/en.po translations/ACS_DOCS.pod-add/fr.po!

•  Enter  your  transla'on  in  the  msgstr  lines:  $ vi translations/ACS_DOCS.pod-add/fr.po!

•  Push  your  transla'on  (replace  the  language  code  and  the  resource  name  with  yours):  $ tx push -l fr -r ACS_DOCS.pod-add -t!

Page 21: How to Translate Apache CloudStack Docs

                         Build  final                                      documenta'on  

•  Once  transla'on  strings  appear  on  Transifex  •  An  ACS  commiFer  will  pull  them  directly  into  the  source  code  

•  Build  the  guides  with  publican    •  And  Voila…  

Page 22: How to Translate Apache CloudStack Docs
Page 23: How to Translate Apache CloudStack Docs

                           Working  with  the    source  

•  You  can  translate  directly  in  the  ACS  source  and  submit  patches  or  commit  directly  (if  you  are  a  commiFer)  

•  Go  to  the  docs  directory,  note  the  pot  directory.  

•  Create  a  directory  corresponding  to  your  target  language  if  it  does  not  exist  yet  (use  publican  commands)  

•  Use  the  publican  language  codes  hFp://rlandmann.fedorapeople.org/pug/sect-­‐Users_Guide-­‐Preparing_a_document_for_transla'on.html  

   

Page 24: How to Translate Apache CloudStack Docs

Example  

     

•  The  docs/runbook  directory  contains:  !en-US!!fr-FR!!it_IT!!ja-JP!!pot!!publican.cfg!!tmp!!zh-CN!!zh-TW!

Page 25: How to Translate Apache CloudStack Docs

Example  

     

•  In  docs/runbook/it_IT  you  see  the  PO  files  which  contain  the  strings  that  need  to  be  translated  ! !Book_Info.po!! !Environment.po!! !Management.po!! !Overview.po!! !Preface.po!! !Revision_History.po!! !config.po!! !kvm.po!

Page 26: How to Translate Apache CloudStack Docs

Example  

     

•  Pick  a  resource,  use  your  text  editor  to  view  it,  edit  the  missing  strings  

•  Commit  the  changed  files  via  review  board  or  git  

 #. Tag: title!#, no-c-format!msgid "Database Installation and Configuration"!msgstr "Installazione e Configurazione del Database"!

Page 27: How to Translate Apache CloudStack Docs

         Conclusions  

•  We  are  aiming  to  release  ACS  4.1  on  March  22nd  2013.  

•  We  need  as  much  transla'on  as  possible.  •  We  need  your  help  •  Even  if  you  can  do  one  string  it’s  great.  •  If  you  cannot  complete  the  en're  transla'on  for  the  4.1  release,  keep  at  it,  it  will  make  it  for  4.2.