<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Adam thanks,<br>
<br>
The code seems to work just fine (tested). My only problem is that
I'm getting a warning about $p_default when reloading the repo,
which I am not sure where it's referring to, so if you have any
hints it would be great. The warnings are:<br>
<br>
$ ./bin/epadmin reload myrepo<br>
Use of uninitialized value $p_default in string eq at
/usr/share/eprints3/bin/../perl_lib/EPrints/MetaField.pm line 211.<br>
Use of uninitialized value $p_default in string eq at
/usr/share/eprints3/bin/../perl_lib/EPrints/MetaField.pm line 213.<br>
Use of uninitialized value $p_default in string ne at
/usr/share/eprints3/bin/../perl_lib/EPrints/MetaField.pm line 217.<br>
defined(@array) is deprecated at
/usr/share/eprints3/lib/plugins/EPrints/Plugin/Screen/BulkAction/Remove.pm
line 46.<br>
(Maybe you should just omit the defined()?)<br>
<br>
<br>
Thanks again for all the help!! As far as multilingual fields is
concerned I think we're really getting there! Any other problems
(like the import problem that arose) that someone foresees are
welcome, so as to address them before making the bazaar package
(and updating the wiki).<br>
<br>
<br>
On 15/09/2015 09:31 μμ, Adam Field wrote:<br>
</div>
<blockquote
cite="mid:EMEW3|74e31eacbd2df22d53d58a1f38de3c3dr8EJXU14eprints-tech-bounces|ecs.soton.ac.uk|95851239-3050-41CE-98CD-F5B7EF00D76B@ecs.soton.ac.uk"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Hi George
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre">
</span>Yes, you're right, you already pretty much solved the
problem. I'm rushing through my email and not paying enough
attention.</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre">
</span>The other thing you missed was that if there are three
languages set in the multilang field, and someone calls
set_value on title, it will overwrite everything. You did,
however, do better testing on language than I did, so you should
probably incorporate that.</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre">
</span>Once you have this finished, perhaps we could put the new
metafield in a bazaar package so that others can deploy it
easily.</div>
<div class=""><br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">
<div class="">--</div>
<div class="">Adam Field</div>
<div class="">Business Relationship Manager and Community
Lead<br class="">
EPrints Services</div>
</div>
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 15 Sep 2015, at 18:51, George Mamalakis
<<a moz-do-not-send="true"
href="mailto:mamalos@eng.auth.gr" class="">mamalos@eng.auth.gr</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<div class="moz-cite-prefix">Adam hi!<br class="">
<br class="">
Don't apologise, I know you had been busy since I had
read the emails regarding the hack-day and saw your
absent in the list. I'll test your code tomorrow at
work and see if it works. The way I see it, it is
similar to the code I posted in my last email, but
mine was missing the get_property_defaults, which
might be the problem. <br class="">
<br class="">
As far as the wiki is concerned, don't worry, as I
promised I'll write a full guide of how to set the
title and abstract fields to be multilang, but I'll do
it once everything is tested by my library staff (our
site is not up yet).<br class="">
<br class="">
Thanks again for your help, I'll return with feedback
tomorrow evening.<br class="">
<br class="">
George.<br class="">
<br class="">
PS. Your next task is to make a video showing how to
make the Adam Field to be virtual :)<br class="">
<br class="">
On 15/9/2015 8:19 μμ, Adam Field wrote:<br class="">
</div>
<blockquote
cite="mid:EMEW3|76ed05baccd3ca777cb55b9936080bf5r8EIK714eprints-tech-bounces|ecs.soton.ac.uk|C9B38134-E7F1-4A87-8D8E-BC34B1A7D66E@ecs.soton.ac.uk"
type="cite" class="">
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" class="">
Sorry, I had a UKCoRR event, a German Language User
Group Meeting, a Hack Day and a UK User Group Meeting
all in the last two weeks, which were my first two
weeks back from Annual Leave!
<div class=""><br class="">
</div>
<div class="">I think we'll need to override set_value
on our Virtualwithvalue metafield class. Before we
added code to pull values out of another field. We
need code now to insert values into another field.
Something like this (add it to the code below in
the email of June 30th):</div>
<div class=""><br class="">
</div>
<div class="">#In the field class (Virtualwithvalue?)</div>
<div class=""><br class="">
</div>
<div class="">sub set_value<br class="">
{<br class="">
my( $self, $object, $value ) = @_;<br
class="">
if ( defined
$self->get_property("set_value") )<br class="">
{<br class="">
return $self->call_property(
"set_value", $object, $value);<br class="">
}<br class="">
return undef;<br class="">
}<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">...and in get_property_defaults:</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>$defaults{set_value}
= undef;</div>
<div class=""><br class="">
</div>
<div class="">...then in any field definitions in the
repository config (along the lines of get_value
discussed previously):</div>
<div class=""><br class="">
</div>
<div class="">set_value => sub</div>
<div class="">{</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>my ($eprint,
$value) = @_;</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>#only use this on
imports, NOT if the value is already set</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>if
($eprint->is_set('ml_title'))</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>{</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>return;</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>}</div>
<div class=""><br class="">
</div>
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span>$eprint->set_value('title_ml',
[text => '$value', lang =>
$c->{defaultlanguage} ]);</div>
<div class="">}</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I leave is as an exercise for the reader
to debug the above code, which hasn't even been
parsed, let alone tested.</div>
<div class=""><br class="">
</div>
<div class="">Please feedback with tested code, and
some documentation on the wiki :)</div>
<div class=""><br class="">
<div class="">
<div style="letter-spacing: normal; orphans: auto;
text-align: start; text-indent: 0px;
text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; word-wrap:
break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">
<div class="">--</div>
<div class="">Adam Field</div>
<div class="">Business Relationship Manager and
Community Lead<br class="">
EPrints Services</div>
</div>
</div>
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 9 Sep 2015, at 12:49, George
Mamalakis <<a moz-do-not-send="true"
href="mailto:mamalos@eng.auth.gr" class="">mamalos@eng.auth.gr</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">Yeah, this is whom I'm waiting
for...:):)<br class="">
<br class="">
On 09/09/2015 01:15 μμ, alen vodopijevec
wrote:<br class="">
<blockquote type="cite" class="">Hmm.. maybe
using similar function that you have in
'title' filed<br class="">
definition.. I'm not sure in this moment,
but it's a good idea and will<br class="">
check out.<br class="">
<br class="">
.. Adam would surely know better :)<br
class="">
<br class="">
--<br class="">
alen<br class="">
<br class="">
On 09/09/2015 11:16 AM, George Mamalakis
wrote:<br class="">
<blockquote type="cite" class="">Hi Alen,<br
class="">
<br class="">
I think that through the use of virtual
fields, there could be a way to<br
class="">
finally assign values in the appropriate
fields (via some function), but<br
class="">
I'm not sure which function I have to
override. And I am talking about<br
class="">
virtual fields, because in our
multilingual solution we have created<br
class="">
additional multilingual fields for title
and abstract, and have replaced<br
class="">
original the fields with virtual
counterparts that calculate their<br
class="">
values through code. Hence my assumption
on storing their values as well.<br
class="">
<br class="">
Thanks for your help!<br class="">
<br class="">
On 09/09/2015 11:52 πμ, alen vodopijevec
wrote:<br class="">
<blockquote type="cite" class="">Hi!<br
class="">
<br class="">
You will have to override default import
plugins, ie. copy original ones<br
class="">
and make them write to new multilang
field(s).<br class="">
<br class="">
I've made a mistake a long time ago with
changing original title,<br class="">
abstract, keyword fileds into multilang
so we are still coping with it :))<br
class="">
<br class="">
Kind regards,<br class="">
Alen<br class="">
--<br class="">
<a moz-do-not-send="true"
href="http://fulir.irb.hr/" class="">http://fulir.irb.hr</a><br
class="">
<br class="">
On 09/09/2015 10:34 AM, George Mamalakis
wrote:<br class="">
<blockquote type="cite" class="">Hello
everybody, and wishes for a happy
academical-year!<br class="">
<br class="">
I am returning to the subject of
multilang fields when the title and<br
class="">
subject are created in the way
described in the last mail of this<br
class="">
thread, because of a problem that
arises when import plugins are used.<br
class="">
<br class="">
As I was informed by our library
staff, when they wanted to import (eg.<br
class="">
BibTeX) a document, the title and
abstract fields were not filled. I<br
class="">
tried it myself (through the web
interface) and they were true (no<br
class="">
errors in apache). I suppose that the
import plugins use the title and<br
class="">
abstract field to write data, but in
our case these fields are virtual,<br
class="">
so I have no idea how they handle
inserts.<br class="">
<br class="">
Any idea and help would be greatly
appreciated, since not being use<br
class="">
EPrints import functionality,
practically renders the creation of
basic<br class="">
multilang fields (title and abstract)
created in that way unusable.<br
class="">
<br class="">
Thanks all in advance!<br class="">
<br class="">
On 01/07/2015 01:05 μμ, George
Mamalakis wrote:<br class="">
<blockquote type="cite" class="">OK,<br
class="">
<br class="">
I'll keep it in mind.<br class="">
<br class="">
Thanks<br class="">
<br class="">
On 01/07/2015 12:15 μμ, Field A.N.
wrote:<br class="">
<blockquote type="cite" class="">You
don't have a render_value
property, but a quick scan of the
MetaField object suggests that you
might not need one if you're just
making a text node from the value.
Not 100% sure though -- if it
works, then don't worry about it
:)<br class="">
<br class="">
<br class="">
--<br class="">
Adam Field<br class="">
Business Relationship Manager and
Community Lead<br class="">
EPrints Services<br class="">
+44 (0)23 8059 8814<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 30 Jun 2015, at 16:39, George
Mamalakis wrote:<br class="">
<br class="">
<blockquote type="cite" class="">OK,
it's done.<br class="">
<br class="">
I'll upload the procedure on the
wiki when I finish with my
project (it'll be after the
summer) or if I find free time
in the meantime.<br class="">
<br class="">
The general steps are (in order
to replace the title field in
this example):<br class="">
<br class="">
1) Create a MetaField which
returns a value (
~eprints/lib/plugins/EPrints/MetaField/Virtualwithvalue.pm)
containing the code found in
Adam's video:<br class="">
<br class="">
package
EPrints::MetaField::Virtualwithvalue;<br
class="">
<br class="">
use strict;<br class="">
use warnings;<br class="">
<br class="">
use EPrints::MetaField;<br
class="">
<br class="">
our @ISA = qw(
EPrints::MetaField );<br
class="">
<br class="">
use strict;<br class="">
<br class="">
sub get_property_defaults<br
class="">
{<br class="">
my ( $self ) = @_;<br
class="">
my %defaults =
$self->SUPER::get_property_defaults;<br
class="">
$defaults{get_value} =
undef;<br class="">
return %defaults;<br
class="">
}<br class="">
<br class="">
sub get_value<br class="">
{<br class="">
my( $self, $object ) =
@_;<br class="">
if ( defined
$self->get_property("get_value")
)<br class="">
{<br class="">
return
$self->call_property(
"get_value", $object);<br
class="">
}<br class="">
return undef;<br
class="">
}<br class="">
<br class="">
2) Change
./archives/myarchive/cfg/cfg.d/eprint_fields.pl
to contain the new fields
(ml_title and the new title
field (which is based on our
newly created MetaField
derivative)), ie:<br class="">
<br class="">
{<br class="">
name => 'ml_title',<br
class="">
type => 'multilang',<br
class="">
multiple => 1,<br
class="">
fields => [ {
sub_name => "text", type
=> "longtext", input_rows
=> 3,
make_single_value_orderkey =>
'EPrints::Extras::english_title_orderkey'
} ],<br class="">
input_add_boxes =>
1,<br class="">
},<br class="">
<br class="">
{<br class="">
name => 'title',<br
class="">
type =>
'virtualwithvalue',<br class="">
virtual => 1,<br
class="">
<br class="">
get_value => sub<br
class="">
{<br class="">
my ($eprint) = @_;<br
class="">
if
($eprint->is_set('ml_title'))<br
class="">
{<br class="">
my $vals =
$eprint->get_value('ml_title');<br
class="">
my $title = '';<br
class="">
# set the
default lang's text as title<br
class="">
foreach my $v1
(@{$vals})<br class="">
{<br class="">
if
(%$v1{'lang'} eq
$c->{defaultlanguage})<br
class="">
{<br
class="">
$title
= %$v1{'text'};<br class="">
}<br
class="">
}<br class="">
# if not a
default lang found, get the
first object's text as title<br
class="">
if ($title eq
'')<br class="">
{<br class="">
$title =
${$$vals[0]}{'text'} ;<br
class="">
}<br class="">
return $title;<br
class="">
<br class="">
}<br class="">
return undef;<br
class="">
}<br class="">
},<br class="">
<br class="">
3) Update your archive in order
to create the new field:<br
class="">
<br class="">
$ ./bin/epadmin update myarchive<br
class="">
<br class="">
4) Add the appropriate phrases
in
~/archives/myarchive/cfg/lang/en/phrases/local.xml
(and do it for any other
language you may have):<br
class="">
<br class="">
<!-- multilang title related
phrases --><br class="">
<epp:phrase
id="eprint_fieldname_ml_title">Title</epp:phrase><br
class="">
<epp:phrase
id="eprint_fieldname_ml_title_text">Text</epp:phrase><br
class="">
<epp:phrase
id="eprint_fieldname_ml_title_lang">Language</epp:phrase><br
class="">
<epp:phrase
id="eprint_fieldhelp_ml_title">The
title of the item. The title
should not end with a full stop,
but may end with a question
mark. There is no way to make
italic text, please enter it
normally. If you have a
subtitle, it should be preceded
with a colon [:]. Use capitals
only for the first word and for
proper nouns.<br class="">
<br/>Example: <span
class="ep_form_example">A
brief history of
time</span><br class="">
<br/>Example: <span
class="ep_form_example">Life:
an unauthorised
biography</span><br
class="">
<br/>Example: <span
class="ep_form_example">Mathematics
for engineers and scientists.
5th edition</span><br
class="">
<br/>Example: <span
class="ep_form_example">Ecosystems
of the world. Vol. 26. Estuaries
of the world</span><br
class="">
</epp:phrase><br class="">
<br class="">
5) Add (and remove) the
appropriate entries in you
workflows
(~/archives/myarchive/cfg/workflows/eprint/default.xml)
in the "core" section:<br
class="">
<br class="">
<!--
<component><field
ref="title" required="yes"
input_lookup_url="{$config{rel_cgipath}}/users/lookup/title_duplicates"
input_lookup_params="id={eprintid}&amp;dataset=eprint&amp;field=title"
/></component><br
class="">
--><br class="">
<component><field
ref="ml_title"
required="yes"/></component><br
class="">
<br class="">
6) Test and reload your archive
for your changes to take effect:<br
class="">
$ ./bin/epadmin test<br class="">
$ ./bin/epadmin reload myarchive<br
class="">
<br class="">
<br class="">
Thanks everyone for the help,
and especially Tim and Adam for
making it possible!! :):)<br
class="">
<br class="">
<br class="">
PS. Hope I haven't forgotten
anything...:)<br class="">
<br class="">
<br class="">
On 26/06/2015 05:27 μμ, George
Mamalakis wrote:<br class="">
<blockquote type="cite" class="">Tim,<br
class="">
<br class="">
Now that I got illuminated
(:-P) by the video regarding
EPrints' virtual fields, I am
trying to think how I could
take advantage of them in
order to use to solve my
multilanguage-fields problem,
and I think I'm a bit stuck.<br
class="">
<br class="">
I'll speak my thoughts out
loud and please correct me if
I'm wrong. Let the target
field be the "title".<br
class="">
<br class="">
So, we need the title to be
stored in more than one
languages in the database,
which should be "easily"
accomplished using a multi-row
field. Hence, multilang fields
are a perfect candidate for
this. We therefore create a
new field, let's say ml_title
(as you proposed) and store
our values in it. Now, in
order for EPrints not to
break, we change the title
field to be a virtual field
and compose its output based
on ml_title field. In the end,
we'll have two fields for the
title. The title field (of
type virtualfield) that will
be calculating its value each
time it's called, and the
ml_title field (of type
multilang). Is that correct?<br
class="">
<br class="">
Now that I've written my
thoughts, I think I'm no more
stuck and I see that your idea
is brilliant and very easy!!
:):). And if the above
paragraph is not your idea,
and it's even easier than
that, then it'll be even more
brilliant!! :):)<br class="">
<br class="">
Cheers again, I'll give it a
try on Monday!<br class="">
<br class="">
Once again, nice work Adam and
thanks Tim and all of you for
your help!<br class="">
<br class="">
PS. It would be extremely
beneficial if there were a
guide as to how EPrints'
internals work. Something that
is a little be more
explanatory than the "anatomy
of a request (<a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/w/Anatomy_of_a_request">http://wiki.eprints.org/w/Anatomy_of_a_request</a>)"
and explain how the coders of
EPrints really think of
EPrints in their minds.<br
class="">
<br class="">
On 25/06/2015 11:42 πμ,
Timothy Miles-Board wrote:<br
class="">
<blockquote type="cite"
class="">The "problem" is
that when you ask
$eprint->get_value() for
the value of a multilang
field it gives you a perl
data structure - in this
case arrayref (array of
{langcode=>text}
hashrefs) - ie. the same
behaviour as you would
expect for a compound field
or any field with a multiple
value.<br class="">
<br class="">
$eprint->get_value() is
used everywhere - including
in export plugins. So any
field where the plugin
implicitly expects a string
- like title, abstract etc -
it will output something
like ARRAYx01123123<br
class="">
<br class="">
So your options are:<br
class="">
<br class="">
* Fix up all the plugins to
be cleverer about how they
get the "best" value of
multilang field (ie. use
get_value() then look at the
user's lang / default lang
to pull out the best string
from the multilang
structure) - but this would
mean repeating the same
routine in every plugin..<br
class="">
<br class="">
* Change the way that
get_value() works so that it
somehow decides which
behaviour to use (arrayref
vs best lang string) based
on calling context etc. -
get_value is used everywhere
in EPrints so this would
probably break everything..<br
class="">
<br class="">
* Add a layer of abstraction
between the low level
get_value() and the plugins
that defines an API for
returning language dependent
strings - then change all
the plugins to
use that (so instead of
get_value(), plugins could
call get_lang_string() or
something - something like
this would be the best
approach...<br class="">
<br class="">
In the meantime, what you
could do is instead of
changing the default title,
abstract etc fields, just
define new multilang
versions.<br class="">
<br class="">
So eg. ml_title, ml_abstract
...<br class="">
<br class="">
Then use these in your
workflow instead of the
default title, abstract ..
etc.<br class="">
<br class="">
Finally in
eprint_fields_automatic.pl,
write some code to take the
ml_* fields and populate the
equivalent scalar fields. So
eg. get the value of
ml_title, pull out the text
in the default language (or
if the default language
version is not defined, some
other language in order of
preference - the
EPrints::Language module
already does stuff like this
with phrases) and write that
value into the title field.<br
class="">
<br class="">
Then anything that expects
$eprint->get_value(
"title" ) to return a string
will be happy (albeit they
will always give the
default/preferred language).<br
class="">
<br class="">
Or...<br class="">
<br class="">
Change the default title,
abstract etc. fields to a
virtual field so that you
can dynamically work out the
(string) value by looking at
ml_title, ml_abstract etc -
as long as the value
returned is always a string
this shouldn't break
anything.<br class="">
<br class="">
Food for thought I hope,<br
class="">
<br class="">
Tim<br class="">
<br class="">
Timothy Miles-Board<br
class="">
Web & Repositories
Development Specialist,
University of London
Computer Centre<br class="">
020 7863 1342 | 07742 970
351 | <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:timothy.miles-board@london.ac.uk">timothy.miles-board@london.ac.uk</a>
| @drtjmb<br class="">
The University of London is
an exempt charity in England
and Wales<br class="">
<br class="">
<br class="">
From: <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a>
<a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:eprints-tech-bounces@ecs.soton.ac.uk"><eprints-tech-bounces@ecs.soton.ac.uk></a>
on behalf of George
Mamalakis <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:mamalos@eng.auth.gr"><mamalos@eng.auth.gr></a><br
class="">
Sent: 25 June 2015 8:38 AM<br
class="">
To: <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><br
class="">
Subject: [EP-tech] Re:
[spam?] Re: How to set a
field to be multilang<br
class="">
<br class="">
Thanks Alen, I'll look into
it deeper.<br class="">
<br class="">
It's sad, though, that
default Import/Export
plugins break. Could you
give a few hints on how to
customise these plugins?
(general guidelines). Could
the changes be applied on
the parent Import and Export
plugin, or most child
plugins tend to override
functions dealing with
title, abstract, etc?<br
class="">
<br class="">
And that being the case,
isn't it equivalent to
adding extra fields for an
additional language? Either
way same things are broken,
right? :)<br class="">
<br class="">
Lastly, where are these
metadata fields stored in
the database? Reading the
article in the link you
provided diagonally, it
seems that I need to update
the database in order to
create them, right?<br
class="">
<br class="">
Thanks again!<br class="">
<br class="">
On 24/06/2015 11:18 μμ, Alen
Vodopijevec wrote:<br
class="">
<blockquote type="cite"
class="">Hi!<br class="">
<br class="">
You have Metadata Field
Types documented here:<br
class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/w/Category:EPrints_Metadata_Fields">http://wiki.eprints.org/w/Category:EPrints_Metadata_Fields</a><br
class="">
<br class="">
But, be aware that
changing title, keywords
and abstract fields to<br
class="">
'compound' breaks default
EPrints plugins -
export/import .. these<br
class="">
plugins expect
title/keywords/abstract to
be simple and not compound<br
class="">
(hash) value.<br class="">
<br class="">
I'm using it that way but
there is some extra effort
to customize and<br
class="">
maintain import/export
plugins.<br class="">
<br class="">
If anybody have a
suggestion or a better
solution please let me
know.<br class="">
<br class="">
Maybe this is a good
opportunity to discuss
that i18n issues in
EPrints.<br class="">
<br class="">
Kind regards,<br class="">
--<br class="">
Alen<br class="">
<br class="">
On 06/24/2015 10:15 AM,
George Mamalakis wrote:<br
class="">
<blockquote type="cite"
class="">Ah,<br class="">
<br class="">
And by the way, is there
any documentation on
this "fields" attribute<br
class="">
somewhere? Cos I think
it wasn't mentioned
anywhere.<br class="">
<br class="">
Thanks again!<br
class="">
<br class="">
On 24/06/2015 10:29 πμ,
Timothy Miles-Board
wrote:<br class="">
<blockquote type="cite"
class="">----------
Forwarded message
----------<br class="">
From: Timothy
Miles-Board <a
moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:timothy.miles-board@ulcc.ac.uk"><timothy.miles-board@ulcc.ac.uk></a><br
class="">
Date: 18 Jun 2015
11:30 pm<br class="">
Subject: Re: [EP-tech]
How to set a field to
be multilang<br
class="">
To: <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><br
class="">
Cc:<br class="">
<br class="">
{<br class="">
name => 'title',<br
class="">
type =>
'multilang',<br
class="">
multiple => 1,<br
class="">
fields => [ {
sub_name => "text",
type => "longtext",<br
class="">
input_rows => 3,
make_single_value_orderkey
=><br class="">
'EPrints::Extras::english_title_orderkey'
} ],<br class="">
input_add_boxes =>
1,<br class="">
},<br class="">
<br class="">
<br class="">
Tim<br class="">
<br class="">
On 23 Jun 2015 9:09
am, George Mamalakis <a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:mamalos@eng.auth.gr"><mamalos@eng.auth.gr></a>
wrote:<br class="">
<br class="">
Guys (and girls),<br
class="">
<br class="">
Any news on
multilingual fields?
Anybody using them?<br
class="">
<br class="">
Thanks!<br class="">
<br class="">
George<br class="">
<br class="">
On 18/06/2015 06:31
μμ, George Mamalakis
wrote:<br class="">
<blockquote
type="cite" class="">Hello
again,<br class="">
<br class="">
I am trying to make
my EPrints
installation support<br
class="">
</blockquote>
multilanguage fields<br
class="">
<blockquote
type="cite" class="">(eg.
title, abstract,
etc.). The thing I
did that worked
(which<br class="">
</blockquote>
doesn't<br class="">
<blockquote
type="cite" class="">feel
right to me, though)
was adding a new
Metadata field (eg.<br
class="">
</blockquote>
title_en)<br class="">
<blockquote
type="cite" class="">and
add it to the
database and
workflow. On the
documentation,<br
class="">
</blockquote>
on the<br class="">
<blockquote
type="cite" class="">other
hand, I saw that
there is a Multilang
field type<br
class="">
(./perl_lib/EPrints/MetaField/Multilang.pm)
which should be<br
class="">
</blockquote>
used for<br class="">
<blockquote
type="cite" class="">this
purpose. The strange
thing is that its
perldoc DESCRIPTION<br
class="">
</blockquote>
section<br class="">
<blockquote
type="cite" class="">starts
with "not done",
probably meaning
that it's not
implemented?<br
class="">
Disregarding the
last comment, when I
changed<br class="">
./archives/myarchive/cfg/cfg.d/eprint_fields.pl
title field to<br
class="">
</blockquote>
read:<br class="">
<blockquote
type="cite" class="">{<br
class="">
name => 'title',<br
class="">
type =>
'multilang',<br
class="">
input_rows => 3,<br
class="">
make_single_value_orderkey
=><br class="">
'EPrints::Extras::english_title_orderkey',<br class="">
},<br class="">
<br class="">
and I reloaded
epadmin, I got the
following error:<br
class="">
<br class="">
"Error in field
property for
eprint.title: fields
on a multilang<br
class="">
metafield can't be
undefined"<br
class="">
<br class="">
So, which is the
proper way for
adding multilanguage
support in<br
class="">
</blockquote>
fields<br class="">
<blockquote
type="cite" class="">and
display them in
workflows?<br
class="">
<br class="">
Thanks for all help
in advance!<br
class="">
<br class="">
</blockquote>
-- <br class="">
George Mamalakis<br
class="">
<br class="">
IT and Security
Officer,<br class="">
Electrical and
Computer Engineer
(Aristotle Univ. of
Thessaloniki),<br
class="">
PhD (Aristotle Univ.
of Thessaloniki),<br
class="">
MSc (Imperial College
of London)<br class="">
<br class="">
School of Electrical
and Computer
Engineering<br
class="">
Aristotle University
of Thessaloniki<br
class="">
<br class="">
phone number : +30
(2310) 994379<br
class="">
<br class="">
<br class="">
<br class="">
*** Options:<br
class="">
<a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community
wiki: <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers
Forum: <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
<br class="">
<br class="">
<br class="">
*** Options:<a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive:<a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community
wiki:<a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers
Forum:<a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
</blockquote>
-- <br class="">
George Mamalakis<br
class="">
<br class="">
IT and Security Officer,<br
class="">
Electrical and Computer
Engineer (Aristotle
Univ. of Thessaloniki),<br
class="">
PhD (Aristotle Univ. of
Thessaloniki),<br
class="">
MSc (Imperial College of
London)<br class="">
<br class="">
School of Electrical and
Computer Engineering<br
class="">
Aristotle University of
Thessaloniki<br class="">
<br class="">
phone number : +30
(2310) 994379<br
class="">
<br class="">
<br class="">
<br class="">
<br class="">
-----------------------------
Upozorenje
-----------------------------<br
class="">
<br class="">
Automatskom detekcijom
utvrdjeno je da tekst
ove poruke<br class="">
podsjeca na tzv.
phishing poruku.<br
class="">
<br class="">
AKO SE U PORUCI TRAZI DA
POSALJETE VASU IRB
LOZINKU ILI<br class="">
DA UNESETE IRB PODATKE
NA NAVEDENOM LINKU, RADI
SE O<br class="">
NAPADU S CILJEM KRADJE I
ZLOUPOTREBE PODATAKA.<br
class="">
<br class="">
Centar za informatiku i
racunarstvo,<br class="">
Institut Rudjer Boskovic<br
class="">
<br class="">
-----------------------------
Upozorenje
-----------------------------<br
class="">
<br class="">
<br class="">
*** Options: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community
wiki: <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers
Forum: <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
</blockquote>
-- <br class="">
Sent from my Android
device with K-9 Mail.
Please excuse my brevity.<br
class="">
<br class="">
*** Options: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
<br class="">
*** Archive:<br class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
<br class="">
*** EPrints community
wiki:<br class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br
class="">
<br class="">
*** EPrints developers
Forum:<br class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
</blockquote>
-- <br class="">
George Mamalakis<br class="">
<br class="">
IT and Security Officer,<br
class="">
Electrical and Computer
Engineer (Aristotle Univ. of
Thessaloniki),<br class="">
PhD (Aristotle Univ. of
Thessaloniki),<br class="">
MSc (Imperial College of
London)<br class="">
<br class="">
School of Electrical and
Computer Engineering<br
class="">
Aristotle University of
Thessaloniki<br class="">
<br class="">
phone number : +30 (2310)
994379<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
*** Options: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
<br class="">
*** Archive:<br class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
<br class="">
*** EPrints community wiki:<br
class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br class="">
<br class="">
*** EPrints developers
Forum:<br class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
</blockquote>
-- <br class="">
George Mamalakis<br class="">
<br class="">
IT and Security Officer,<br
class="">
Electrical and Computer
Engineer (Aristotle Univ. of
Thessaloniki),<br class="">
PhD (Aristotle Univ. of
Thessaloniki),<br class="">
MSc (Imperial College of
London)<br class="">
<br class="">
School of Electrical and
Computer Engineering<br
class="">
Aristotle University of
Thessaloniki<br class="">
<br class="">
phone number : +30 (2310)
994379<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
*** Options: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
<br class="">
*** Archive:<br class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
<br class="">
*** EPrints community wiki:<br
class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br class="">
<br class="">
*** EPrints developers Forum:<br
class="">
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
</blockquote>
-- <br class="">
George Mamalakis<br class="">
<br class="">
IT and Security Officer,<br
class="">
Electrical and Computer Engineer
(Aristotle Univ. of
Thessaloniki),<br class="">
PhD (Aristotle Univ. of
Thessaloniki),<br class="">
MSc (Imperial College of London)<br
class="">
<br class="">
School of Electrical and
Computer Engineering<br class="">
Aristotle University of
Thessaloniki<br class="">
<br class="">
phone number : +30 (2310) 994379<br
class="">
<br class="">
<br class="">
<br class="">
*** Options: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community wiki: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br class="">
*** EPrints developers Forum: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
</blockquote>
*** Options: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community wiki: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers Forum: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
<br class="">
</blockquote>
</blockquote>
</blockquote>
*** Options: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community wiki: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers Forum: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://forum.eprints.org/">http://forum.eprints.org/</a><br
class="">
<br class="">
</blockquote>
</blockquote>
<br class="">
*** Options: <a moz-do-not-send="true"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech"
class="">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a moz-do-not-send="true"
href="http://www.eprints.org/tech.php/"
class="">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community wiki: <a
moz-do-not-send="true"
href="http://wiki.eprints.org/" class="">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers Forum: <a
moz-do-not-send="true"
href="http://forum.eprints.org/" class="">http://forum.eprints.org/</a><br
class="">
<br class="">
</blockquote>
<br class="">
<br class="">
-- <br class="">
George Mamalakis<br class="">
<br class="">
IT and Security Officer,<br class="">
Electrical and Computer Engineer (Aristotle
Univ. of Thessaloniki),<br class="">
PhD (Aristotle Univ. of Thessaloniki),<br
class="">
MSc (Imperial College of London)<br class="">
<br class="">
School of Electrical and Computer Engineering<br
class="">
Aristotle University of Thessaloniki<br
class="">
<br class="">
phone number : +30 (2310) 994379<br class="">
<br class="">
<br class="">
<br class="">
*** Options: <a moz-do-not-send="true"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech"
class="">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a moz-do-not-send="true"
href="http://www.eprints.org/tech.php/"
class="">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community wiki: <a
moz-do-not-send="true"
href="http://wiki.eprints.org/" class="">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers Forum: <a
moz-do-not-send="true"
href="http://forum.eprints.org/" class="">http://forum.eprints.org/</a><br
class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre class="" wrap="">*** Options: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br class="">
<br class="">
<pre class="moz-signature" cols="72">--
George Mamalakis
IT and Security Officer
Electrical and Computer Engineer (Aristotle Un. of Thessaloniki),
PhD (Aristotle Un. of Thessaloniki),
MSc (Imperial College of London)
Department of Electrical and Computer Engineering
Faculty of Engineering
Aristotle University of Thessaloniki
phone number : +30 (2310) 994379
</pre>
</div>
*** Options: <a moz-do-not-send="true"
href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech"
class="">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br
class="">
*** Archive: <a moz-do-not-send="true"
href="http://www.eprints.org/tech.php/" class="">http://www.eprints.org/tech.php/</a><br
class="">
*** EPrints community wiki: <a moz-do-not-send="true"
href="http://wiki.eprints.org/" class="">http://wiki.eprints.org/</a><br
class="">
*** EPrints developers Forum: <a moz-do-not-send="true"
href="http://forum.eprints.org/" class="">http://forum.eprints.org/</a><br
class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
George Mamalakis
IT and Security Officer,
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)
School of Electrical and Computer Engineering
Aristotle University of Thessaloniki
phone number : +30 (2310) 994379
</pre>
</body>
</html>