On Wed, Jan 23, 2013 at 12:06 AM, Charles Kinney <[email protected]>wrote:

>
> On Tue, Jan 22, 2013 at 2:22 AM, helix84 <[email protected]> wrote:
>
>>
>> https://wiki.duraspace.org/display/DSPACE/TechnicalFaq#TechnicalFaq-ClearingCocoon(XMLUI)cache
>
>
> Thanks very much, especially for the tip on how to clear the Cocoon cache.
> It will be handy as I customize the
> interface.
>
> Some observations/questions that arose in my working with this small
> problem:
>
> 1.  The two following messages.xml files appear to differ in their
> contents and use. The first is cited several times in the documentation. I
> didn't see references to the second, which holds text for the Discovery
> interface; I discovered it essentially via trial-and-error. I'm a newbie
> and may be doing builds incorrectly or inexpertly but my experience so far
> is that because the second messages files is not in an overlay directory, I
> must rebuild from the source directory to apply changes made it.
>
> [dspace]/modules/xmlui/src/main/webapp/i18n/messages.xml
>
>  [dsource]
> /dspace-xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml
>
>
> 2. The theme in [dsource]
> /dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt appears to be used for 
> elements
> of the Discovery interface, including the list of items in Advanced Search;
> therefore, although I am using Mirage, I should also copy this theme to my
> overlay directory if I am going to make changes.
>
>
> 3.  For text in emails notifications, even in the XMLUI Mirage interface,
> some text is drawn from:
>
> [dsource]/dspace-api/src/main/resources/Messages.properties
>
> Therefore, for customizations one may work with messages.properties and
> multiple messages.xml files. Changes to messages.properties also appear
> to require a rebuild from the source directory.
>
> Is it reasonable that future DSpace versions would rely on only one file
> for text customization?
>
> Thanks.
>

1. You're right, the strings are both in the main messages file and several
smaller ones for optional modules:
[dspace-source]/dspace-xmlui/src/main/resources/aspects/Discovery/i18n/messages.xml
[dspace-source]/dspace-xmlui/src/main/resources/aspects/SwordClient/i18n/messages.xml
[dspace-source]/dspace-xmlui/src/main/resources/aspects/statisticsElasticSearch/i18n/messages.xml
[dspace-source]/dspace-xmlui/src/main/resources/aspects/XMLWorkflow/i18n/messages.xml

You can also modify them in the installed directory, which would require
only a restart, not a rebuild:
[dspace]/webapps/xmlui/i18n/messages.xml
[dspace]/webapps/WEB-INF/classes/aspects/Discovery/i18n/messages.xml
[dspace]/webapps/WEB-INF/classes/aspects/SwordClient/i18n/messages.xml
[dspace]/webapps/WEB-INF/classes/aspects/statisticsElasticSearch/i18n/messages.xml
[dspace]/webapps/WEB-INF/classes/aspects/XMLWorkflow/i18n/messages.xml

If you decide to make changes there, don't forget to synchronize with the
source versions because they will be replaced during the next rebuild.


2. That is correct, Mirage imports the dri2xhtml-alt theme and overlays its
templates where needed, just as your theme should import the Mirage theme
and overlay its templates (this is described in the Manakin theme
tutorial). So you need both themes.


3. In fact the email templates are stored in
[dspace-source]/dspace/config/emails/. You may be right about some text
coming from Messages.properties, which is meant to be the file with both
strings for DSpace in general and strings specific for JSPUI. I know, I
know.

The reason given why there are so many smaller files instead of one or two
large files is that strings belong with their modules and should be
maintained with them. Of course, this makes things easier for the developer
who has strings in one place, but harder for the translator, who has to go
around hunting for them, so I'm a strong proponent of unification, but any
progress in this area has yet to be made. There are many things which
should be improved in the i18n area, most of them should be captured here:
https://wiki.duraspace.org/display/DSPACE/i18n+Improvements+Proposal

There has been some early work at introducing a new format for
translations, which could be used for everything, but this hasn't been even
discussed yet.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to