FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu Development

 
 
LinkBack Thread Tools
 
Old 09-11-2011, 09:46 PM
Felix Geyer
 
Default State of desktop file translations

Hey all,

First a bit of background:

In Kubuntu we strip the translations from .desktop files of all KDE packages
in main and add a reference to a gettext domain.
This domain is used at runtime to look up the translations.

The upstream translations are imported into Launchpad through the
kde-l10n-* packages and then exported to language packs.

There are a number of problems with that approach:

Previously the gettext domain was always desktop_<source package name>.
This changed with KDE 4.7 for all KDE SC packages that have been
(partly) split. This means that we don't have upstream translations for
any of these desktop files.

In some desktop files there are strings that have a special gettext domain
(indicated by a comment in the file) which we don't parse. This again leads
to untranslated strings.
See https://bugs.launchpad.net/bugs/749379

We throw away upstream translations of many non-KDE SC packages
because those are not imported through kde-l10n-*. We do import some of them
but it's a manual list which no one really maintains.

Some of the problems have existed before this cycle but the KDE 4.7 issue is a
big regression in oneiric which we need to fix ASAP.

There are two options:
1) Disable desktop file stripping completely and rebuild the packages.
2) Manually set the gettext domain in each of the KDE SC packages.

In my opinion desktop file stripping has never worked properly and no one seems
to be willing to maintain it.
Therefore I propose that we carry out option 1). I think the regression potential is fairly
low since in-file translations are commonly used (all universe packages).

What are your opinions?

Cheers,
Felix

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-11-2011, 11:59 PM
Mackenzie Morgan
 
Default State of desktop file translations

Sounds like the path of least resistance to me.


Maco

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 10:26 AM
Harald Sitter
 
Default State of desktop file translations

On Sun, Sep 11, 2011 at 11:46 PM, Felix Geyer <debfx@ubuntu.com> wrote:
> 1) Disable desktop file stripping completely and rebuild the packages.

Please mind that we will still have to support the entire use case, as
everything that is not KDE will still strip. So we have to maintain
the business logic for loading translations via mo files either way.

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 10:34 AM
Scott Kitterman
 
Default State of desktop file translations

Felix Geyer <debfx@ubuntu.com> wrote:

>Hey all,
>
>First a bit of background:
>
>In Kubuntu we strip the translations from .desktop files of all KDE
>packages
>in main and add a reference to a gettext domain.
>This domain is used at runtime to look up the translations.
>
>The upstream translations are imported into Launchpad through the
>kde-l10n-* packages and then exported to language packs.
>
>There are a number of problems with that approach:
>
>Previously the gettext domain was always desktop_<source package name>.
>This changed with KDE 4.7 for all KDE SC packages that have been
>(partly) split. This means that we don't have upstream translations for
>any of these desktop files.
>
>In some desktop files there are strings that have a special gettext
>domain
>(indicated by a comment in the file) which we don't parse. This again
>leads
>to untranslated strings.
>See https://bugs.launchpad.net/bugs/749379
>
>We throw away upstream translations of many non-KDE SC packages
>because those are not imported through kde-l10n-*. We do import some of
>them
>but it's a manual list which no one really maintains.
>
>Some of the problems have existed before this cycle but the KDE 4.7
>issue is a
>big regression in oneiric which we need to fix ASAP.
>
>There are two options:
>1) Disable desktop file stripping completely and rebuild the packages.
>2) Manually set the gettext domain in each of the KDE SC packages.
>
>In my opinion desktop file stripping has never worked properly and no
>one seems
>to be willing to maintain it.
>Therefore I propose that we carry out option 1). I think the regression
>potential is fairly
>low since in-file translations are commonly used (all universe
>packages).
>
>What are your opinions?


If we leave the translations in the .desktop files, can Gnome/Unity/Etc on Ubuntu use them from there?

Scott K

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 10:40 AM
Felix Geyer
 
Default State of desktop file translations

On 12.09.2011 12:26, Harald Sitter wrote:
> On Sun, Sep 11, 2011 at 11:46 PM, Felix Geyer <debfx@ubuntu.com> wrote:
>> 1) Disable desktop file stripping completely and rebuild the packages.
> Please mind that we will still have to support the entire use case, as
> everything that is not KDE will still strip. So we have to maintain
> the business logic for loading translations via mo files either way.

Yes, the translation loading patch in kde4libs will stay.
We would only drop the stripping logic from pkg-kde-tools.


--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 11:29 AM
Jonathan Riddell
 
Default State of desktop file translations

On Sun, Sep 11, 2011 at 11:46:15PM +0200, Felix Geyer wrote:
> Previously the gettext domain was always desktop_<source package name>.
> This changed with KDE 4.7 for all KDE SC packages that have been
> (partly) split. This means that we don't have upstream translations for
> any of these desktop files.

It wasn't always desktop_<source package name>, extragear packages
such as Amarok needed an export in debian/rules
export KUBUNTU_DESKTOP_POT=extragear-multimedia_amarok

Jonathan

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 12:17 PM
Felix Geyer
 
Default State of desktop file translations

On 12.09.2011 12:34, Scott Kitterman wrote:
> If we leave the translations in the .desktop files, can Gnome/Unity/Etc on Ubuntu use them from there?
>
> Scott K

Yes, all unseeded packages keep the translations in desktop files so DEs needs to support that.
It's also part of the desktop-entry spec.

I've asked Michael Vogt about app-install-data (which is used by the software centers).
He said it wouldn't be a problem if we stopped stripping translations.

Felix

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 12:30 PM
Harald Sitter
 
Default State of desktop file translations

On Mon, Sep 12, 2011 at 12:40 PM, Felix Geyer <debfx@ubuntu.com> wrote:
> On 12.09.2011 12:26, Harald Sitter wrote:
>> On Sun, Sep 11, 2011 at 11:46 PM, Felix Geyer <debfx@ubuntu.com> wrote:
>>> 1) Disable desktop file stripping completely and rebuild the packages.
>> Please mind that we will still have to support the entire use case, as
>> everything that is not KDE will still strip. So we have to maintain
>> the business logic for loading translations via mo files either way.
>
> Yes, the translation loading patch in kde4libs will stay.
> We would only drop the stripping logic from pkg-kde-tools.

IIRC stripping is actually done by a fake package in the buildd which
will in an appropriate build environment (i.e. main archive buildd and
target is either main or restricted) execute the stripping as part of
some other dh_foo script. So I am not entirely sure a prevention of
stripping would be all that trivial right now. If someone could look
into that...

regards,
H

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 12:34 PM
Felix Geyer
 
Default State of desktop file translations

On 12.09.2011 13:29, Jonathan Riddell wrote:
> On Sun, Sep 11, 2011 at 11:46:15PM +0200, Felix Geyer wrote:
>> Previously the gettext domain was always desktop_<source package name>.
>> This changed with KDE 4.7 for all KDE SC packages that have been
>> (partly) split. This means that we don't have upstream translations for
>> any of these desktop files.
> It wasn't always desktop_<source package name>, extragear packages
> such as Amarok needed an export in debian/rules
> export KUBUNTU_DESKTOP_POT=extragear-multimedia_amarok

True, but that is the default and the number of packages that need such
manual overrides increased drastically with KDE 4.7.
We have no mechanisms in place to detect when upstream changes the
translation domain and in fact we've caught this problem rather late.

Felix

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 09-12-2011, 12:38 PM
Felix Geyer
 
Default State of desktop file translations

On 12.09.2011 14:30, Harald Sitter wrote:
> IIRC stripping is actually done by a fake package in the buildd which
> will in an appropriate build environment (i.e. main archive buildd and
> target is either main or restricted) execute the stripping as part of
> some other dh_foo script. So I am not entirely sure a prevention of
> stripping would be all that trivial right now. If someone could look
> into that...

Afaik pkgstriptranslations (which is part of pkgbinarymangler) removes the
translations of desktop files if it has a Gettext-Domain key.
So if we stopped adding that key it should leave the desktop files as they are.

Felix

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 

Thread Tools




All times are GMT. The time now is 04:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org