EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10029


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Phrase Editor not working


CAUTION: This e-mail originated outside the University of Southampton.

Hope this worked out for you (or works out for you on Wednesday).

I had a draft reply I didn't have time to finish on Monday, so it was
good to see Thomas stepping in, and you figuring most of it out anyway
- because my advice from Monday would have been centred on the local
xml file attempt.

I'll copy and paste the draft below, and elaborate on it too.
I should mention, my own EPrints is 3.4.5, so there could be new ways
of doing things in 3.4.6 I'm not aware of.

I'll try and install 3.4.6 on my AWS VM in due course.

======

----- Forwarded message from Andrew Mehta <Andrew@unitedgames.co.uk> -----
   Date: Mon, 10 Mar 2025 09:56:15 +0000
   From: Andrew M <eprints-tech@unitedgames.co.uk>
Subject: Re: [EP-tech] Phrase Editor not working
     To: eprints-tech@ecs.soton.ac.uk

What happens when you log in to your repository as the admin, and visit:
cgi/users/home?screen=Admin%3A%3APhrases

What happens when you visit a page on which you'd like to change a
phrase, and add...
edit_phrases=yes
...to the end of the url (with either ? or & depending if it is the
first query or a subsequent query)...?

The phrase editor simple edits xml files that contain phrases.
The system phrases are here:
opt/eprints3/lib/lang/en/phrases/system.xml
The Publication Flavour's phrases are here:
/opt/eprints3/flavours/pub_lib/lang/en/phrases/pub_phrase.xml

...and you can create your own variations for your local needs, by
creating a...
opt/eprints3/archives/arcom/cfg/lang/en/phrases/zzz_local.xml
...file. I believe file precedence is based on alphabetical order, so
if you want your settings to override zz_webcfg.xml, then your
settings will need to be later in the alphabet that zz_webcfg - hence
suggesting zzz_local.xml for the file name.

If it's specifically thesis names you wish to change, you can try
running a grep search for existing thesis names, to see where they
might be currently being drawn from. For example, on my system...

---
[Mon 10 Mar 2025 09:45:47 GMT eprints3]$ grep -rni 'DPhil' .
./flavours/pub_lib/cfg.d/eprint_fields_pub.pl:149:              dphil
./lib/lang/en/phrases/system.xml:612:    <epp:phrase
id="eprint_fieldopt_thesis_name_dphil">DPhil</epp:phrase>
---

If I wish to cash Dr Phil outside (Bhad Bhabie Cash Me Outside meme
reference), he can be found declared as a field in
eprint_fields_pub.pl and has an associated phrase in system.xml - i.e.
at the system level.

Of course, the publications flavour of EPrints will have its own phrases...
/opt/eprints3/flavours/pub_lib/lang/en/phrases/pub_phrase.xml

...and then you can have your own phrases too, at the repository level:
opt/eprints3/archives/arcom/cfg/lang/en/phrases/zzz_local.xml


======

Of course, from the sounds of things, you appear to be well on your
way to creating your own file instead of zz_webcfg.xml - so I look
forwards to hearing how that goes. Again, stuff later in the alphabet,
overwrites stuff earlier in the alphabet filename wise - so you may
wish to make it zzzz_file rather than simply z_file, =), just to be
safe, ;-).

Let us know how it goes on Wednesday!

Yours,
Andrew.


Quoting Will Hughes <w.p.hughes@reading.ac.uk>:

CAUTION: This e-mail originated outside the University of Southampton.
CAUTION: This e-mail originated outside the University of Southampton.
Thomas

Thanks for the quick response. Yes, I spent a lot of time examine
the console in the web browser, trying to pick apart any JavaScript
restrictions. Those things are a bit of a dark art to me. I can try
with a vanilla installation of a bare bones browser to see whether
that makes a difference.

I'm interested in simply making my own z_file instead of
zz_webcfg.xml - I hadn't thought of that. I'll try that as well when
I get back to my desk on Wednesday.

Cheers!

Best wishes

Will
____

________________________________
From: th.lauke@arcor.de <th.lauke@arcor.de>
Sent: Monday, March 10, 2025 3:23:36 pm
To: Will Hughes <w.p.hughes@reading.ac.uk>;
eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>
Subject: AW: [EP-tech] Phrase Editor not working

[You don't often get email from th.lauke@arcor.de. Learn why this is
important at https://aka.ms/LearnAboutSenderIdentification ]

Hi Will,

This site is running EPrints 3.4.6 (Creme Brulee Cryoseism)
(EPrints Services).
okay, what about some restrictions on the execution of javascript(s)
due to your browser?

I am familiar with the training video you mention. ... Similarly,
if I edit the zz_webcfg file, it has no effect ...
Then insert your own file in this directory, which is safe from any
programmatic modification
(cf.&nbsp;https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FArchives%2FARCHIVEID%2Fcfg%2Flang%2Fen%2Fphrases%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C2299d280b13e4e8904b408dd607ee056%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638772820508790304%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=vboCrhc5g4CHCGm%2F84rEGOMOPimpa0WGwd1yM2FT8sc%3D&reserved=0) ... and do not forget to restart your
Apache
(by apachectl graceful, e.g.).

Good luck
Thomas