[libreoffice-l10n] Deckard: a web based Glade Runner

Nicolas Delvaux contact at nicolas-delvaux.org
Thu Jun 13 15:46:05 PDT 2013

Hi everyone,

>>>> On the launchpad page, it says: "In the long run, it would be cool to have
>>>> distinct instances for distinct projects like Xfce or LibreOffice."

Yes, I though Deckard could be useful for LO when I read the 4.0
changelog about the new .uis.

>>>> As I understand it, the runner takes translation from a po file in a
>>>> repository, converts it and  displays the dialog. So, to see the result, it
>>>> is necessary to upload po file to the repository.

Yes, the runner basically needs a folder containing a .ui and a .mo file.

The layout expected by Deckard is documented in the README file:

I wrote a script that create such a layout from Gnome git repositories
(which run once a day), so you may just want to write a similar script
for LO.
In fact I was planning to write one at some point, but it would be much
easier for someone familiar with the LO organisation.

> Looks great. I think it should basically "just work" for LibreOffice and
> the 250+ new .ui elements. Our .uis pretend to be gtk3 ones, with a
> handful of custom widgets, mostly previews. We have a glade catalog for
> the custom ones to provide stubs for glade. So, what does deckard do
> there, does it load the .ui with standard gtk3 code, i.e. expects all
> the widgets to be instantiatable, or does it load it the glade way, i.e.
> can reuse a glade catalog to handle those ?

It instantiates all widgets. If it encounters an unknown one, it tries
to replace it with a placeholder.
All this magic happens in the "gladerunner.py" file (you can download it
and easily experiment with it in a standalone way).

It may be possible to make it work with a glade catalog, I will try to
have a look at it (though I don't have much free time currently).

> There might also be a little bit of tweaking required to stitch the .po
> and .ui together because we're not (currently) using gettext natively in
> LibreOffice but are using it as an intermediate format so it probably
> wouldn't work to just throw a libreoffice .po with translations for a
> dialog at the normal gtk3 gettext loader and get it to do the right
> thing.

It is true that Deckard is a bit Gnome centric for now, so any
suggestion or patch (better :p) to make Deckard more suitable for other
projects/infrastructures would be very much welcomed.


More information about the LibreOffice mailing list