Entertainer's Menu entry is not translated

Bug #282846 reported by Samuel Buffet
2
Affects Status Importance Assigned to Milestone
Entertainer Media Center
Triaged
Low
Samuel Buffet

Bug Description

Installation of Entertainer with entertainer_0.2b2-~ppa4_all.deb does not provides translations for Entertainer's menu entry

entertainer.desktop file should be translatable

Revision history for this message
Matt Layman (mblayman) wrote :

Samuel, I assign this bug to myself, but I don't know French :). The way to "translate" a desktop file is to just add some extra lines to the file itself. Desktop files are not really translated. All the lines that are translatable are list in parallel. I think that this is something that you could do to add the French translation.

Take a look at the rhythmbox.desktop file for a really good example of what needs to be done (`<your text editor> /usr/share/applications/rhythmbox.desktop`). I think it will only be a couple of lines of code that you'll need to add.

Changed in entertainer:
assignee: nobody → samuel-buffet
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Samuel Buffet (samuel-buffet) wrote : Re: [Bug 282846] Re: Entertainer's Menu entry is not translated

> Samuel, I assign this bug to myself, but I don't know French :). The way
> to "translate" a desktop file is to just add some extra lines to the
> file itself. Desktop files are not really translated. All the lines that
> are translatable are list in parallel. I think that this is something
> that you could do to add the French translation.
>
> Take a look at the rhythmbox.desktop file for a really good example of
> what needs to be done (`<your text editor>
> /usr/share/applications/rhythmbox.desktop`). I think it will only be a
> couple of lines of code that you'll need to add.

Matt,

In the end yes it's only a few lines in the desktop file. But, those
lines should be translated with lp.

I know there is a way to do that with the autotools but I don't know
how we can handle that with distutils.

Take a look to one of my pet project called *Atrium* (a none published
Home Automation Project in C/GTK)

I have a Atrium.desktop.in file :

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Atrium
_GenericName=Home Automation management
_Comment=Home Automation tools
Exec=atrium
Icon=atrium
Terminal=false
Type=Application
Categories=GNOME;GTK;Utility;TrayIcon;
StartupNotify=false
X-SuSE-translate=true
OnlyShowIn=GNOME;KDE;ROX;XFCE;

Here is the POTFILE.in
# List of source files containing translatable strings.
[encoding: UTF-8]
src/atrium_callbacks.c
src/atrium_display.c
src/atrium_main.c
src/atrium_main.glade
src/atrium_misc.c
src/atrium_modbus.c
src/atrium_scheduler.c
src/atrium_metarutils.c
atrium.desktop.in <= look here it is

in my .po file I have :

#: ../atrium.desktop.in.h:1
msgid "Home Automation management"
msgstr "Gestion Domotique"

#: ../atrium.desktop.in.h:2
msgid "Home Automation tools"
msgstr "Outils domotiques"

And when I make this project it creates a Atrium.desktop files :

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Atrium
GenericName=Home Automation management
GenericName[fr]=Gestion Domotique
Comment=Home Automation tools
Comment[fr]=Outils domotiques
Exec=atrium
Icon=atrium
Terminal=false
Type=Application
Categories=GNOME;GTK;Utility;TrayIcon;
StartupNotify=false
X-SuSE-translate=true
OnlyShowIn=GNOME;KDE;ROX;XFCE;

As you can see the localised GenericName & Comment are there.

So now pb is : How can we do the same (if we can) with distutils ?
I've googled a bit (but not that much because of my 0.8 branch)
without finding the solution.

Samuel,

Revision history for this message
Matt Layman (mblayman) wrote :

On Sat, Oct 25, 2008 at 6:19 AM, Samuel Buffet <email address hidden>wrote:

> > Samuel, I assign this bug to myself, but I don't know French :). The way
> > to "translate" a desktop file is to just add some extra lines to the
> > file itself. Desktop files are not really translated. All the lines that
> > are translatable are list in parallel. I think that this is something
> > that you could do to add the French translation.
> >
> > Take a look at the rhythmbox.desktop file for a really good example of
> > what needs to be done (`<your text editor>
> > /usr/share/applications/rhythmbox.desktop`). I think it will only be a
> > couple of lines of code that you'll need to add.
>
> Matt,
>
> In the end yes it's only a few lines in the desktop file. But, those
> lines should be translated with lp.

I agree, if we can make this possible.

> I know there is a way to do that with the autotools but I don't know
> how we can handle that with distutils.

I wonder if we could handle this in a similar way that we handle glade
files. I'm not aware of any ability of distutils to handle translations.

>
>
> Take a look to one of my pet project called *Atrium* (a none published
> Home Automation Project in C/GTK)
>
> I have a Atrium.desktop.in file :
>
> [Desktop Entry]
> Version=1.0
> Encoding=UTF-8
> Name=Atrium
> _GenericName=Home Automation management
> _Comment=Home Automation tools
> Exec=atrium
> Icon=atrium
> Terminal=false
> Type=Application
> Categories=GNOME;GTK;Utility;TrayIcon;
> StartupNotify=false
> X-SuSE-translate=true
> OnlyShowIn=GNOME;KDE;ROX;XFCE;
>
> Here is the POTFILE.in
> # List of source files containing translatable strings.
> [encoding: UTF-8]
> src/atrium_callbacks.c
> src/atrium_display.c
> src/atrium_main.c
> src/atrium_main.glade
> src/atrium_misc.c
> src/atrium_modbus.c
> src/atrium_scheduler.c
> src/atrium_metarutils.c
> atrium.desktop.in <= look here it is
>
> in my .po file I have :
>
> #: ../atrium.desktop.in.h:1
> msgid "Home Automation management"
> msgstr "Gestion Domotique"
>
> #: ../atrium.desktop.in.h:2
> msgid "Home Automation tools"
> msgstr "Outils domotiques"
>
> And when I make this project it creates a Atrium.desktop files :
>
> [Desktop Entry]
> Version=1.0
> Encoding=UTF-8
> Name=Atrium
> GenericName=Home Automation management
> GenericName[fr]=Gestion Domotique
> Comment=Home Automation tools
> Comment[fr]=Outils domotiques
> Exec=atrium
> Icon=atrium
> Terminal=false
> Type=Application
> Categories=GNOME;GTK;Utility;TrayIcon;
> StartupNotify=false
> X-SuSE-translate=true
> OnlyShowIn=GNOME;KDE;ROX;XFCE;
>
> As you can see the localised GenericName & Comment are there.
>

I'm glad to see there is at least a methodology to do this.

>
> So now pb is : How can we do the same (if we can) with distutils ?
> I've googled a bit (but not that much because of my 0.8 branch)
> without finding the solution.

Samuel, I agree that the long term solution would be to automate this
translation in lp. But do you think that we could translate the desktop file
manually for now, just for 0.2? Then we could focus on figuring out the
translation process for desktop files as an activity for 0.3.

-Matt

Changed in entertainer:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.