goodies packaging

Jani Monoses jani.monoses at
Fri Mar 3 08:15:55 UTC 2006

> I have some issue with this.
> The .desktop default installation is in /usr/share/xfce4/panel-plugins,
> and installing it in /usr/share/applications doesn't work, the plugin
> doesn't appear in the 'add new item' menu.
> Will the X-Ubuntu-Gettext-Domain entry work if the .desktop file is not
> in the expected location? I'm not sure of this.
> What can we do?

We won't install the plugins in /usr/share/applications, sorry if I wasn't
clear enough.
My understanding is that every .desktop file - whether is an application
xfce4-terminal helper, or panel-plugin is to be added this entry. And when
it is read
by the menu code, terminal and the panel respectively, it is the
responsability of the
app to interpret it, read the gettext domain and display the strings inside
the .desktop file
according to the locale.
Here's the spec ubuntu implemented

the preferred way is not a patch to the sources obviously, either
debian/patches or
a search and replace from the rules file after the desktop files are built
or whatever the package uses.

Here's the code from CDBS to do this generically for any package
that uses the gnome class

# add translation domain to installed desktop/directory files
$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%:
        echo " add translation domain to $(cdbs_curpkg)"; \
        if [ -e $(DEB_BUILDDIR)/po/Makefile ]; then \
            DOMAIN=$$(grep --max-count 1 '^GETTEXT_PACKAGE[[:space:]]*='
$(DEB_BUILDDIR)/po/Makefile | sed 's/^.*=[[:space:]]*\([^[:space:]]\)/\1/');
            if [ "$$DOMAIN" ]; then \
                for d in $$(find debian/$(cdbs_curpkg) -type f \( -name
"*.desktop" -o -name "*.directory" \) ); do \
                    echo " Adding translation domain $$DOMAIN to
$$d..."; \
                    echo "X-Ubuntu-Gettext-Domain=$$DOMAIN" >> $$d; \
                done; \
                for d in $$(find debian/$(cdbs_curpkg) -type f -name
"*.server" ); do \
                    echo " Adding translation domain $$DOMAIN to
$$d..."; \
                    sed -i "s/<oaf_server\>/<oaf_server
ubuntu-gettext-domain=\"$$DOMAIN\"/" $$d; \
                done; \
            fi; \

It treats .server files too which are bonobo related so we do not need them.
And we do not need all this code
either since we do not have xfce cdbs class where we write once and all
packages are affected.

Anyway as long as the xfce4-panel does not look at these it is not too
important, so it's fine uploading without this
now and we'll add the lines later.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the xubuntu-devel mailing list