Localization/proposal Transifex

From Wiki.ooo4kids.org

Jump to: navigation, search

DRAFT

Please do not translate the page yet


Back to Localization


Contents

Introduction

The Idea

The translated NEW strings (new is extremely important) are mostly used for User Interface (aka UI) features, and in the helpcontent. Our concern, is mostly UI, and we find 99% of the strings either in :

The main idea is to create, at buildtime, an variable environment for localization purpose. For instance, we'll use ${application} (and probably ${application_name} too).

Thus, we'll modify the file names adding ${application} to them. For example, ${application} will contain -OOo4Kids. In our case, the old localize.sdf will become localize-OOo4Kids.sdf in the makefile (see below for all modified files).

localize.sdf files case

For a given locale (say ${a_locale}) , we'd like to create localize${application}.sdf, used in parallel with OpenOffice.org files, to allow backports,

Last, but essential, the first field for a given locale, and for a given translated string, is the path. If we don't change the filename, but simply add our strings, there will be no interference with existing localize.sdf, which is extremely important (and great  :-), means our new strings will simply be concatened with the existing OOo one. Said differently, the localize-${application}.sdf will simply complete the localize.sdf file one.

Important: maintain an localize-OOo.sdf file will allow/help to backport the translations into OOo, just concatenating the file to localize.sdf for every concerned locale !!

.src files case

No changes, l10n does everything.

Current status : 

Current status : ar, de, es, fr, it, nb, nl, pt and en-US done.


Proposed process

TAG DONE.png 1) Create the localize-OOo4Kids-${a_locale}.sdf


As example :

output=full_path-filename-APPLI_XX.src
module=modulename
#path separator=\\"\\"
path=path1\\"\\"path2\\"\\"path3
filename=aName
string_name=" \ 
	CONTROL_NAME1	RID_NAME1	STRING_NAME1	CONSTANT_VALUE		The_string1NULL\
	CONTROL_NAME2	RID_NAME2	STRING_NAME2	CONSTANT_VALUE		The_string2NULL\
	CONTROL_NAME3	RID_NAME3	STRING_NAME3	CONSTANT_VALUE		The_string3NULL\
	CONTROL_NAME4	RID_NAME4	STRING_NAME4	CONSTANT_VALUE		The_string4NULL"

TAG DONE.png * create a valid localize_strings-${application}.sdf containing the same information, including the same TAB numbers and so on than official .sdf

=> using a bash shell script. [Improve : use Perl or Python ?]

TAG DONE.png * using oo2po, create .po files, and commit them

Example of shell script doing that :

Pre-requisite:

#!/bin/bash                                                                                                                    
                                                                                                                               
locales="ar de es en-US fi fr it nb nl pt sl zh-CN zh-TW"                                                                      
                                                                                                                               
for aLocale in $locales ; do                                                                                                   
    for appli in OOo4Kids OOoLight ; do                                                                                        
                                                                                                                               
        oo2po   -l $aLocale \                                                                                                  
                -i sdf/$aLocale/localize_strings-${appli}.sdf \                                                                
                -o po/$appli/$aLocale                                                                                          
                                                                                                                               
    done                                                                                                                       
done 

TAG DONE.png * use poedit (or any other similar tool) to translate the strings


First tests done for French. To be continued.

TAG DONE.png 2) create the po tree on the repo (admin with commit rights role):

The result could be something like:

-> the two last directory contains all the new localized strings for OOo4Kids


TAG DONE.png 3) Inside OOo4Kids (this is same distribution inside OOoLight)

First level : the locale

Current existing locales are :


(same for OOoLight )

Comments :


TAG TODO.png 4) Process to add a new file :

create one en-US model

a translator will :

TAG PROGRESS.png 5) Complete the localize-OOo4Kids-${a_locale}.sdf including the new strings

Once translations will be considered as OK, the localize-${application}-${a_locale}.sdf will be generated with existing tools.

FIXME : define this part of the process better

Result: one localize-${application}-${a_locale}.sdf per locale, to be either added in the l10n/source/${a_locale} directory, or concatened to the existing localize.sdf for a given locale

Rules

For example (using full path)  :

po/OOo4Kids/ar/basic/source/app/basic${application}.src

po/OOo4Kids/de/basic/source/app/basic${application}.src

Will result in the creation of :

po/OOo4Kids/ar/basic/source/app/basic${application}.po

po/OOo4Kids/de/basic/source/app/basic${application}.po


Other rules to be defined/improved :

Tips

Adding a subentry in a menu (or in a contextual menu)

As example, the Slideshow contextual menu, does propose the menu entry "Go to slide" + the subentry "First slide". The description of the strings to be translated can be summarized this way :

The main entry : Go to slide

RID_SLIDESHOW_CONTEXTMENU CM_GOTO   37003 en-US ~Go to Slide

A sub entry (can be several of them) :

RID_SLIDESHOW_CONTEXTMENU.CM_GOTO CM_FIRST_SLIDE   37003  en-US   ~First Slide

Eric Bachard 10:21, 20 July 2010 (UTC)

Downloading the .po files

You are translator and want to Checkout the .po files (current status) for $your_locale

IMPORTANT: assuming $your_locale can be found in the following list : ar de es en-US fi fr it nb nl pt sl zh-CN zh-TW

=> please contact us to add a new locale

svn co svn://svn.adullact.net/svnroot/ooo4kids1/po/OOo4Kids/$your_locale

Example (we assume that a Subversion client is already installed) :

svn co svn://svn.adullact.net/svnroot/ooo4kids1/po/OOo4Kids/fr my_fr

Will download the following tree :

A    my_fr/svx
A    my_fr/svx/source
A    my_fr/svx/source/cui.po
A    my_fr/sfx2
A    my_fr/sfx2/source
A    my_fr/sfx2/source/dialog.po
A    my_fr/sd
A    my_fr/sd/source
A    my_fr/sd/source/ui
A    my_fr/sd/source/ui/slideshow.po
A    my_fr/framework
A    my_fr/framework/source
A    my_fr/framework/source/services.po
Checked out revision 712.

and everything will be located in my_fr.  If you forgot my_fr, everything will be in fr instead (it means that the locale name is the default).

svn co svn://svn.adullact.net/svnroot/ooo4kids1/po/OOoLight/$your_locale

Downloading the .sdf files

If you are a developer, and want to analyse the content of our localize_strings-${application}.sdf files

svn  co svn://svn.adullact.net/svnroot/ooo4kids1/sdf/$your_locale  my_locale

will download the required content. Files matching with the locale you are interested in (my_locale) will be located in the matching folder my_sdf/$your_locale.

To dowload all (all locales and all ${application} .sdf files, do :

svn  co svn://svn.adullact.net/svnroot/ooo4kids1/sdf  my_sdf

Agenda

The new localization process, will only concern the 2.x version and above, and the work is already started, but will probably need the summer before to be convergent. Below a (not exhaustive, please help us) list. An array, say Gantt diagram like, will be created soon.

Tasks / Time.

Useful links (where find tools ... )

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox