[email protected]: localizing extras/source/palettes
Extras module of OpenOffice.org contains several different directories that are relevant for
localizers. In this entry, I'm going to describe how files in the directory
palettes
works,
where they are used etc. in upcoming OpenOffice.org 2.0.
The directory
extras/source/palettes
contains files with different extensions:
sob
- Bitmaps
soc
- Colors (palettes)
sod
- Line styles
soe
- Arrow styles
sog
- Gradients
soh
- Hatching
Where to find them all in GUI? As you probably know, I'm very bad user of OpenOffice.org so I had to
ask Tom Verbeek, extras maintainer, for help. He provided very good description.
Start OpenOffice.org Draw and create new drawing. Now draw a line (e.g. with arrow on one side) and
a rectangle like on the following image. The line is solid, with simple arrow. The rectangle is
filed with "Blue 7" color (the default).
Now imagine you want to change properties/look of the rectangle. Press right button on it, and click
on Area first and select Colors tab. You'll see the following dialog (click on the image to see
large version).
You can see the "Load Color List" icon there. By using this icon, you can load
Colors defined
in files with extension
soc
.
There are
Gradients,
Hatching and
Bitmaps tabs on this dialog where you can
load gradient styles (with the extension
.sog
), hatching styles (with the extension
.soh
) or bitmaps (with the extension
.sob
).
Press Escape several times to get back to the drawing and press right button on the line and select
Line. You'll see another dialog with several tabs:
In the tab Line Styles you can select the style of the line and also open
Line styles stored
in a file with extension
sod
. In the tab Arrow Styles you can select the style of
arrows and also open
Arrow styles stored in a file with extension
soe
.
Now you know how to use these files, but what about their internal structure and location in
OpenOffice.org source code and installed product?
The source code directory
extras/source/palettes
has the following structure: it
contains files standard.so? where ? stands for letters b, c, d, e, g or h and also other files (like
web.soc or html.soc) and directory
lang
. Common files are not to be translated. So only
lang
directory is interesting for localizers. It contains directories named according to
ISO codes (see the
table of supported
languages) with additional files. If you plan to create localized version, you have to translate
(or at least copy) the directory
en-US
. E.g. I had to copy and translate files in
en-US
directory to the directory
cs
(see child workspace
pj05
and issue
#i34312#).
When you install e.g. English version of the latest milestone (SRC680_m54 right now), all of these
files are in your
.../user/config
directory.
And now some words about the structure of every file type.
sob
file contains bitmaps. The file is ZIPed with classic ZIP/JAR and contains
office:bitmap-table
XML element and several images.
soc
file contains colors in office:color-table
XML element with
their definitions inside draw:color
elements. It is in UTF-8 and you have to
translate the names of colors in draw:name
.
sod
file contains line styles in office:dash-table
XML element with
their definitions inside draw:stroke-dash
elements. It is in UTF-8 and you have to
translate the names of line styles.
soe
file contains arrow styles in office:marker-table
XML element with
their definitions inside draw:marker
elements. It is in UTF-8 and you have to
translate the names of arrow styles.
sog
file contains gradient styles in office:gradient-table
XML
element with their definitions inside draw:gradient
elements. It is in UTF-8 and you
have to translate the names of gradient styles.
soh
file contains hatching styles in office:hatch-table
XML element
with their definitions inside draw:hatch
elements. It is in UTF-8 and you have to
translate the names of hatching styles.
You can also rename files copied from
en-US
directory to help users understand the
contents of files (e.g.
hatching.soh
is very strange for Czech people, but
srafovani.soh
is quite ok).
And this is all. Hopefully this will help you to localize even small details like this one.
-----