https://bugs.freedesktop.org/show_bug.cgi?id=64176

--- Comment #5 from Tristan Van Berkom <[email protected]> ---
(In reply to comment #4)
> (In reply to comment #3)
> > Here is the .source file which would put the following fields
> > in the summary:
> >   E_CONTACT_FULL_NAME,
> >   E_CONTACT_FAMILY_NAME,
> >   E_CONTACT_NICKNAME,
> >   E_CONTACT_GIVEN_NAME,
> >   E_CONTACT_TEL
> > 
> > And all of them configured to have prefix search indexes,
> > as well as normalized phone number values for E_CONTACT_TEL:
> > 
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > [Data Source]
> > DisplayName=Unnamed
> > Enabled=true
> > Parent=
> > 
> > [Address Book]
> > BackendName=local
> > 
> > [Backend Summary Setup]
> > SummaryFields=full_name:family_name:nickname:given_name:phone
> > IndexedFields=phone,prefix:phone,phone:full_name,prefix:family_name,prefix:
> > nickname,prefix:given_name,prefix
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Ack.
> 
> > My work-in-progress branch will eventually add the option to
> > set collation types for some fields, for example to set "phonebook"
> > collation on given_name and family_name, the configuration looks like this:
> > 
> > CollationFields=family_name,phonebook:given_name,phonebook
> 
> I doubt that this will be practical. Choosing the "phonebook" collation only
> makes sense in some locales. Who decides to add "phonebook" in the EDS
> source config and when?
> 
> What happens if the user changes the locale from one where "phonebook" is
> right to one where it is not?
> 
> IMHO, overriding the default collation belongs into an additional env
> variable that then gets changed together with the LANG/LC_ env variables.
> 
> In the meantime, EDS should hard-code sane defaults for several "relevant"
> locales.

The idea is that "phonebook" collation is a preference that is either
available under the current locale, or not.

When a locale change has been detected, the sort keys will be generated
under the "phonebook" collation of the new locale... this will fallback
to the default ICU rules for the given locale if "phonebook" tailoring
is not available.

The problem with this currently is only that ICU has bugs falling back
to the correct locale (i.e. this bug:
   http://bugs.icu-project.org/trac/ticket/10149)

So to work around that bug, I'm only using "phonebook" sort order
under locales where the language code is either 'de' or 'fi' (as
Markus pointed out those are the only 2 locales with phonebook tailoring).

This workaround is currently working well with my tests, i.e. an
addressbook is configured to sort the "family_name" in "phonebook"
order... after restarting EDS under new locales and testing the
sort results I get the expected ordering under the new locales.

> > Also I'm pretty sure that if EDS has been freshly installed, you
> > can configure this using the ESourceBackendSummarySetup apis directly
> > on the default addressbook.
> 
> True, however, which app is allowed to do that? SyncEvolution would be one
> candidate, but it may run too late.
> 
> > Perhaps an alternative to a downstream patch, would be to create
> > a small program which runs in the first boot of the target device
> > before the default addressbook is ever accessed for the first time.
> 
> I agree that this is the right solution for upstream and a general-purpose
> distro packaging of EDS. In the openismus-work branch, doing it directly in
> EDS is easier for your customer...

Sure, whatever is easier.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
Syncevolution-issues mailing list
[email protected]
https://lists.syncevolution.org/mailman/listinfo/syncevolution-issues

Reply via email to