Re: [Tracker] Write-back data & default/dummy data

On Tue, 2009-10-27 at 15:10 +0100, Philip Van Hoof wrote:
On Tue, Oct 27, 2009 at 2:54 AM, Martyn Russell <martyn lanedo com>

        Really I think it would be nice if the ontology standards
        could detail this.

So note for the readers, this ain't about the write-back feature
anymore. But about the default-values.

Although this might be useful my personal opinion on this is that the
SPARQL coalesce function is sufficient, and that for this reason we
don't need to entertain default values in either ontologies or at the
level of file formats (ie. what was being ~ done in Tracker 0.6).

My opinion is that this adds a level of complexity that is unexpected by
the app developers (in case they have coalesce), that might not yield
wanted results for all applications (it'll be a compromise in most
cases, not something that for every use-case will yield wanted results).

And I happen to lean towards "if a complex solution and a simple
solution both solve the problem, then it's most likely the case that the
simple solution is what you want". That simple solution is called the
coalesce support that we've put in SPARQL.

I don't know what the final team-conclusion on this will be, though.

Martyn asked me to re-word this IRC conversation to the mailing list:

A word on default values in ontologies: 

you can't make your solution (with default values in ontologies)
translatable at the client's side.

Whereas this is translatable in case the app developer would use

I don't think you want default values to be returned unless you can
translate them properly.

For example .. 

What's the point of returning "Untitled piece of music" if that string
ain't const and therefore can't be translated by gettext()

Whereas it is const if the app dev uses coalesce:

"SELECT COALESCE (nie:title(?t), nfo:fileName(?f), " 
        _("Untitled piece of music") 
") WHERE { ...} "

Unless of course you make ontology files like .desktop files, with their
own translations. And you adapt tracker-store to read the LANG
environment variable

But that's actually very wron: a single app can be set in a language,
while Tracker is in the environment's language

Try running `LANG=nl_NL gnome-terminal` , if now gnome-terminal would
ask for things to Tracker, its default values wouldn't be in Dutch
unless Tracker's store was also started with LANG=nl_NL (but it isn't a
requirement that both are started in the same LANG environment).

With the coalesce() solution it would be dutch. So I don't like "default
values in Tracker" much.

Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]