View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

Release Management/Managing translations.openbravo.com


Contents

Introduction

Main objective of translation.openbravo.com is to generate the statics of

  1. String is a sentence that appears in Openbravo ERP/POS interface, documentation, reports or descriptions.
  2. Word is the individual part of a string..
  3. A string/word can be:
    1. Translated: It is translated to the target language.
    2. Fuzzy: Strings/words that need to be reviewed by the translator after they have been leveraged from a previous version.
    3. Untranslated: It isn't translated to the target language.

Initial requirements

Directory Structure

|-- Openbravo2PO
|-- html
|   |-- data
|   |   |-- style.css
|   |   |-- ...
|   |   `-- ob-logo.png
|   |-- erp
|   |   |-- {TRUNK,RELEASE}
|   |   |   |-- LANG1
|   |   |   |  |-- FILE1.{xml,po}
|   |   |   |  | ...
|   |   |   |  `-- FILEn.{xml,po}
|   |   |   |-- LANGn
|   |   |   |  |-- FILE1.{xml,po}
|   |   |   |  | ...
|   |   |   |  `-- FILEn.{xml,po}
|   |   |   |-- LANG1.{html,zip}
|   |   |   |-- ...
|   |   |   |-- LANGn.{html,zip}
|   |   |   `-- index.html
|   |   `-- index.html
|   |-- LANG1.html                       ?      main.SOME_METHOD()
|   |-- ...                              ?
|   |-- LANGn.html                       ?
|   |-- languages.html                   ?      main.SOME_METHOD()
|   |-- index.html
|   `-- pos
|       |-- {TRUNK,RELEASE}
|       |   |-- LANG1
|       |   |  |-- FILE.{properties,po}
|       |   |  | ...
|       |   |  `-- FILE.{properties,po}
|       |   |-- LANGn
|       |   |  |-- FILE.{properties,po}
|       |   |  | ...
|       |   |  `-- FILEn.{properties,po}
|       |   |-- LANG1.{html,zip}
|       |   |-- ...
|       |   |-- LANGn.{html,zip}
|       |   `-- index.html
|       `-- index.html
|-- pickle
|   |-- erp
|   |   |-- LANG1
|   |   |   `-- {TRUNK,BRANCH}
|   |   |       `-- FILE.pickle
|   |   |-- ...
|   |   `-- LANGn
|   |       `-- {TRUNK,BRANCH}
|   |           `-- FILE.pickle
|   `-- pos
|       |-- LANG1
|       |   `-- {TRUNK,BRANCH}
|       |       `-- FILE.pickle
|       |-- ...
|       `-- LANGn
|           `-- {TRUNK,BRANCH}
|               `-- FILE.pickle
|-- src
|   `--html
|      |-- footer.html
|      |-- ...
|      `-- header.html
`-- vcs
    |-- erp
    |   `-- LANG
    |       `-- {trunk/branches/XXX}
    |           `-- FILE.xml
    `-- pos
        `-- LANG
            `-- {trunk/branches/XXX}
                `-- PATH                 ?
                    `-- FILE.properties  ? Properties.vcs_local_path

Process Flow

Here is the process flow of translation.openbravo.com:

  1. The trl.stat scripts picks the languages available in localization repository this is in C language and generates the statics out of it
  2. The statics file source of trunk is included for each language in src/main.py which takes care of the whole process with tool openbravo2PO.
  3. Local copy of localization repository is maintained for both POS and ERP.
  4. Basically a huge loop of process as described below is processed which creates the language for all the files with in every branch, then creates the po files for each file.
  5. Finally it generates the statistics of each po file and to end it collects the statistics for all the file in all branch level and displays it.

Openbravo2PO is a tool written in java to interact with the custom made xml format that Openbravo ERP uses for its translation files

This application can now be run and built through the ANT tool using the ant command. For further details on the targets available please refer to the build.xml file.


XML2PO Transformation Transform an XML file exported from Openbravo into a .po file

		ant runXML2PO 
			-DinpFold=[path to folder] 	
			-DoutFold=[path to folder] 	
			-DmsgStr=[yes/no] 					
			-Dfile="[space separated listing of file to merge]"

PO2XML Transformation Convert .po files into XML files suitable for importing into Openbravo

		ant runPO2XML 
			-DinpFold=[path to folder] 
			-DoutFold=[path to folder] 

POMerge Utility Merge multiple .po files into a single file and highlight conflicts.

		ant runPOMerge 
			-Dfile="[space separated listing of file to merge]"

TemplateMerge Using a template file and a translation file synchronise the translation file with the template file. Rows from the template file that are not in the translation file will be added. Rows from the translation file that are not in the template file will be removed. Rows in both files will take the 'Original' string from the template file and the 'Value' string from the translation file

		ant runTemplateMerge
			-DinpTempFold=[path to folder] = this is the folder containing template files 
			-DinpBaseFold=[path to folder] = this is the folder containing the translation files
			-DoutFold=[path to folder] = the folder where the merged files are to be output to


NOTE:Further documentation to support this application will be available on the Openbravo2po

Script Names and there Purposes

  1. Main.py --->It takes care of whole process and it works with Openbravo2PO tool.
  2. Branch.py --->This script codes the Branch class which is an abstraction for each branch (either a branch from branches/ or trunk).
  3. Defaults.py --->In this script there are all shared values used throughout the program: flags (DEBUG, VCS), directories (html_dir), the statistics dictionary, language codes and names, pieces of html content to generate the final html files.
  4. File.py --->Classes related to scripts are coded here.There is a generic File class, two subclasses of it: Xmlfile and Properties and finally a Pofile class.
  5. lang_set.py --->Language set class is coded here.
    1. A language set is an abstraction above the languages that Openbravo ERP and Openbravo POS are translated to.
    2. It's main purpose it to hold common data across languages and to allow the ease of use of them.
  6. language.py --->It is language coded class.
  7. utils.py --->Minor functions are used by various classes.

Next Steps

Retrieved from "http://wiki.openbravo.com/wiki/Release_Management/Managing_translations.openbravo.com"

This page has been accessed 1,382 times. This page was last modified on 4 February 2010, at 23:16. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.