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

[EP-tech] Re: Browse view by document language.

Hi Jacob,
Just as a thought (haven?t tried it) but you could add a language field to eprints and add something to eprint_fields_automatic.pl to copy the language value from the document object to the eprint parent object, then perhaps create a view on the new eprint field?  (bit messy and duplicating data though).

If you have multiple file attachments with potentially different languages you might need to do either decide which language to index under, or treat the eprint field as a multiple value field.  The automatic updating function would be more complicated though?  don?t forget to deal with the languages being updated or deleted!


From: Jacob Wenzel [mailto:jw at energiakademiet.dk]
Sent: 17 July 2014 14:46
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: Browse view by document language.

Thank you for clearing that out. I also tried "documents.language", but it produced the same error.

But why don't you think it will work? Not that I would be likely to understand a complicated explanation, but I would really love to have that option on my repository.

If it is indeed impossible, do I have any other options for letting my visitors sort the documents without searching.

I'm not keen on making a full translation of EPrints into Danish, and furthermore most Danes speak English as well, so I wouldn't want hide the English documents from my Danish visitors, just let them be able to sort them.

Thank you both for your feedback!
On 17-07-2014 15:23, Sebastien Francois wrote:
John was close, but it's "documents" (now I'm not sure what you're trying to achieve will work)


On 17/07/14 11:36, Jacob Wenzel wrote:
Thanks for your reply, but I actually that was one of the few other options I already tried.

It produces a slightly different error, but still no view list.

---------------- EPrints System Error ----------------------------
Dataset eprint does not have a field 'document'
EPrints System Error inducing stack dump
 at /usr/share/eprints3/bin/../perl_lib/EPrints.pm line 146
        EPrints::abort() called at /usr/share/eprints3/bin/../perl_lib/EPrints/Utils.pm line 674
        EPrints::Utils::field_from_config_string('EPrints::DataSet=HASH(0x37d5a58)', 'document.language') called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2137
        EPrints::Update::Views::menus_fields('EPrints::Update::Views=HASH(0x33049a0)') called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2053
        EPrints::Update::Views::fieldlist_sizes('EPrints::Update::Views=HASH(0x33049a0)', 'ARRAY(0x6213ea0)', 0) called at /usr/share/eprints3/bin/../perl_lib/EPrints/Update/Views.pm line 2238
        EPrints::Update::Views::update_view_by_path('EPrints::Update::Views=HASH(0x33049a0)', 'on_write', 'CODE(0x33046d0)', 'langid', 'en', 'do_menus', 1, 'do_lists', 1, ...) called at bin/generate_views line 204

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech

*** Archive: http://www.eprints.org/tech.php/

*** EPrints community wiki: http://wiki.eprints.org/

*** EPrints developers Forum: http://forum.eprints.org/

-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20140717/bfded97f/attachment-0001.html