image_annotation/commit
Labels are now populated considering accurator locale setting.
author | Chris Dijkshoorn |
---|---|
Fri Mar 13 19:08:43 2015 +0000 | |
committer | Chris Dijkshoorn |
Fri Mar 13 19:08:43 2015 +0000 | |
commit | e3488425fdc61ffb43f97242c36b0025010f31e3 |
tree | 57be80df9237d2a3b370cdeb88f390ba7d19c6f3 |
parent | bb13523de50647bec7fa4a92792762add4b37114 |
Diff style: patch stat
diff --git a/applications/annotation.pl b/applications/annotation.pl index 7975bc8..5e7d5c3 100644 --- a/applications/annotation.pl +++ b/applications/annotation.pl @@ -411,7 +411,7 @@ html_annotation_fields([URI|T], Options) --> html_annotation_fields(_,_) --> !. html_annotation_field(URI, Options) --> - { rdf_display_label(URI, Label), + { rdf_lang(URI, rdfs:label, Label, ''), option(target(T), Options), field_id(URI,T, Id), rdf_lang(URI, dcterms:comment, FieldDescription, '') @@ -651,7 +651,7 @@ rdf_lang(Subject, Predicate, Text, Default) :- ). rdf_lang(Subject, Predicate, Text) :- - user_preference(user:lang, literal(Lang)), + user_language(Lang), ( rdf(Subject, Predicate, literal(lang(Lang, Text))) -> true ; rdf(Subject, Predicate, literal(lang(en, Text))) @@ -659,6 +659,15 @@ rdf_lang(Subject, Predicate, Text) :- ; rdf(Subject, Predicate, literal(lang(_, Text))) ). +user_language(Lang) :- + logged_on(User), + user_property(User, locale(Lang)), + !. + +user_language(Lang) :- + user_preference(user:lang, literal(Lang)). + + default_buttons([],_). user_url(User) :-