After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 405531 - To: contacts list is empty
To: contacts list is empty
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
1.10.x (obsolete)
Other All
: Immediate blocker
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 411547 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-02-07 21:39 UTC by pauwel coppieters
Modified: 2013-09-14 16:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Proposed patch (618 bytes, patch)
2007-02-09 17:37 UTC, Matthew Barnes
none Details | Review

Description pauwel coppieters 2007-02-07 21:39:15 UTC
Please describe the problem:
When sending mail; when clicking buttin 'To:' contacts list is empty. Problem goes away if choosing LANG=en_US.UTF-8 
Problem happens when LANG=nl_NL.UTF-8
Query to EDS is different in both cases :

(evolution-data-server:2409): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((or (beginswith "nickname"  "") (beginswith "email"  "") (beginswith "full_name"  "") (beginswith "file_as"  "") ))
=> this is ok

(evolution-data-server:2409): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((and (or (beginswith "nickname"  "") (beginswith "email"  "") (beginswith "full_name"  "") (beginswith "file_as"  "") ) (is "category_list"  "Alle categorieën") ))
=> this results in empty list




Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
yes

Other information:
Comment 1 André Klapper 2007-02-09 01:31:53 UTC
same here, evo 2.9.6.
Comment 2 Matthew Barnes 2007-02-09 16:35:28 UTC
Were you by chance using en_US.UTF-8 the first time you ran Evolution?

The first time you run Evolution, a default set of categories is created for you and written to ~/.evolution/categories.xml (or to GConf, if you're using an older version).  The category names are translated once -- at the time they're created -- and the translated string is stored in that XML file.  From then on the strings are loaded and displayed as-is.

I'm not sure if that's the correct behavior.  It's a bit tricky because we use the same mechanism for storing both a standard set of categories and any custom categories you've added, but we don't distinguish between them once they're loaded.  And obviously the custom categories can't be translated if you change languages.

I bet if you open your ~/.evolution/categories.xml file you'll see a bunch of English category names.  Something like:

   <category a="Anniversary" ...>

And if you edit the category names in the XML file, they should show up that way in Evolution.

So I'm not sure if this is NOTABUG or if there's a better way to do it.  I'm open to suggestions.
Comment 3 Matthew Barnes 2007-02-09 16:44:13 UTC
Hmm... actually I think I misunderstood the problem.

Please disregard comment #2.  I'll have another look at this.
Comment 4 André Klapper 2007-02-09 17:28:57 UTC
same here in german:

(evolution-data-server:4861): libedata-book-WARNING **: impl_GNOME_Evolution_Addressbook_Book_getBookView ((and (or (beginswith "nickname"  "") (beginswith "email"  "") (beginswith "full_name"  "") (beginswith "file_as"  "") ) (is "category_list"  "Jede Kategorie") ))


("Jede Kategorie" is the german translation for "Any Category")
Comment 5 Matthew Barnes 2007-02-09 17:33:16 UTC
Ah, found it.

e-name-selector-dialog.c:search_changed()

if ( !strcmp (category,"Any Category")) {
        query_string = g_strdup_printf ("(or (beginswith \"file_as\" %s) "
                                        "    (beginswith \"full_name\" %s) "
                                        "    (beginswith \"email\" %s) "
                                        "    (beginswith \"nickname\" %s)))",
                                        text_escaped, text_escaped,
                                        text_escaped, text_escaped);
}
else {
        query_string = g_strdup_printf ("(and (is \"category_list\" %s) "
                                        "(or (beginswith \"file_as\" %s) "
                                        "    (beginswith \"full_name\" %s) "
                                        "    (beginswith \"email\" %s) "
                                        "    (beginswith \"nickname\" %s)))",
                                        category_escaped,text_escaped,
                                        text_escaped, text_escaped,
                                        text_escaped);
}

The string in strcmp() is untranslated.
Comment 6 Matthew Barnes 2007-02-09 17:37:01 UTC
Created attachment 82233 [details] [review]
Proposed patch

This should fix it.
Comment 7 Veerapuram Varadhan 2007-02-09 18:10:19 UTC
Patch looks good.  Please commit it to HEAD and Stable branches.
Comment 8 Matthew Barnes 2007-02-09 18:33:51 UTC
Committed to HEAD and gnome-2-16 branch.
Comment 9 André Klapper 2007-03-01 22:58:12 UTC
*** Bug 411547 has been marked as a duplicate of this bug. ***