Do

Results should be i18n and for localized .desktop files

Bug #175278 reported by Andrea Cimitan
2
Affects Status Importance Assigned to Milestone
Do
Fix Released
High
Alex Launi

Bug Description

When I search "Visualizzatore documenti" (in italian, same thing of "Document viewer" for Evince) nothing is founded as, of course, the results are just for the english version of the desktop file.

This is really annoying for guys that always had a localized gnome menu, as I always have to translate the italian description of the program to english then type the correct one :)
Yes this is a great brain training! :D :D thanks eheheh

Tags: patch
Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote : Re: [Bug 175278] Results should be i18n and for localized .desktop files

Oops - I thought those names were i18n-ized. I guess I'll read into the
desktop file API a bit more :)

Changed in gc:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Andrea Cimitan (cimi) wrote :

This patch adds i18n support.

This patch also changed the files (a lot of hard and repetitive work :D) to the coding style I eplained here:
https://bugs.launchpad.net/bugs/175315
Seeing the brackets of the classes and methods in a newline result in a cleaner code to read as it's possible to notice when a class or a methid start, and it looks different to an if or a while.

Revision history for this message
Andrea Cimitan (cimi) wrote :

I forgot to say:
1) checkout a new bzr trunk
2) apply patch
3) continue your work on the new one

Otherwise all the indentation fixes etc etc will be lost (and my work gone away :D)

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

I get this crash when your patch is applied to trunk. Does the gnome_desktop_item_set_localestring require initialization somewhere? Do you get this crash? This is the problem I was running up against when trying to add il8n.

Revision history for this message
Andrea Cimitan (cimi) wrote :

---------------------------
the i18n informations are taken from those lines (61,62 of ApplicationItem.cs):
name = gnome_desktop_item_get_localestring (desktopFilePtr, "Name");
description = gnome_desktop_item_get_localestring (desktopFilePtr, "Comment");

Please notice that this function is imported at line 104,105 of the same file:
[DllImport ("libgnome-desktop-2.so.2")]
private static extern string gnome_desktop_item_get_localestring (IntPtr item, string id);
---------------------------

Before it was just using gnome_desktop_item_get_string, which of course it's not i18n.
I'm using mono 1.2.5.1, gnome-desktop 2.20.1
Of course here everything is working fine with the localized stuff

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote : Re: [Bug 175278] Re: Results should be i18n and for localized .desktop files

I'm using the same gnome-desktop with mono 1.2.4. Strangeness. I will try
with a newer version of mono.

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

 Had to add Marshal.PtrToStringAuto (IntPtr) to prevent crash when string is incorrectly(?) freed. This needs some investigation, because gnome_desktop_item_get_string returns string and does not cause horrific crashes.

Changed in gc:
assignee: nobody → djsiegel
status: Confirmed → Fix Committed
Revision history for this message
Jorge Castro (jorge) wrote :

This bug is fixed in the latest release of GNOME Do at: https://launchpad.net/gc/trunk/0.3.2.1

If you feel that this bug isn't fixed, then please reopen this and leave a comment. Thanks!

Changed in gc:
status: Fix Committed → Fix Released
Revision history for this message
antistress (antistress) wrote :

actually i'm running Do 0.4.0.1 within Ubuntu 8.04 beta and i'm french

If i want to shutdown my system, i will select the "Arrêter" button on my system but Do only knows "shutdown" and so on

Changed in do:
status: Fix Released → In Progress
Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

.desktop files are i18n-aware. The shutdown item you mention is not a .desktop item; it's a custom item provided by a Do plugin. Please file a different bug (e.g. "GNOME Do plugins should be localizable").

Changed in do:
status: In Progress → Fix Committed
Revision history for this message
antistress (antistress) wrote :

(done : see Bug #208984)

Jorge Castro (jorge)
Changed in do:
status: Fix Committed → Fix Released
Revision history for this message
Andrea Cimitan (cimi) wrote :

Reopening, All the results I get with 0.5.0.1 are english, making Do actually completely unusable :(

Changed in do:
assignee: djsiegel → nobody
status: Fix Released → New
Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :

Alex, this is from the gnome-desktop-sharp usage in ApplicationItem.cs. See what you can do. Fix should be trivial.

Changed in do:
assignee: nobody → alexlauni
Revision history for this message
Andrea Cimitan (cimi) wrote :

Can I ask for a 0.5.0.2 after that fix? :)

Revision history for this message
David Siegel (djsiegel-deactivatedaccount) wrote :
  • unnamed Edit (177 bytes, text/html; charset=ISO-8859-1)

Sure thing. We plan to do a 0.5.1 release within a few weeks. Until then,
you could just follow trunk (we keep it stable) or I will send you a tarball
when this gets fixed.

Alex Launi (alexlauni)
Changed in do:
status: New → Confirmed
Jason Smith (jassmith)
Changed in do:
milestone: none → 0.5.98
Revision history for this message
Alex Launi (alexlauni) wrote :

Do should now be completely localizable, all we need are translations for Core and plugins, so please! Translate!

Changed in do:
status: Confirmed → Fix Released
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.