[OPEN-ILS-GENERAL] How to translate facet labels in Evergreen 2.1.1?

Mike Rylander mrylander at gmail.com
Tue Dec 6 10:26:58 EST 2011


2011/12/4 Linda Jansova <skolkova at chello.cz>:
> Dear all,
>
> This time we would like to ask a translation-related question. We would like
> to have expressions such as "Corporate Author" which are used as facet
> labels when displaying search results translated into Czech (the attached
> screenshot shows these facets). We have found out that these labels seem to
> reside in /openils/var/web/opac/common/js/cs-CZ# ls
> FacetDefs.js OrgTree.js. Any ideas how to translate these?
>

Dan answered this one (also, IIRC, master and the upcoming 2.2 allow
translation of these from within the staff client).

> And actually one more question - is it possible to influence the order in
> which individual facets appear? In our installation we currently see the
> following order of author facets:
> Corporate Author
> Other Author
> Personal Author
>
> They seem to be ordered alphabetically. However, from a user point of view,
> it would probably be better to promote the Personal Author to the very
> beginning of the list. Is it possible to achieve this somehow (and if so,
> how exactly :-)?
>

If you take a look at the top of the openils.widget.FacetSidebar dojo
module* you'll see an example of how do do what you want.  Basically,
you add a classOrder attribute to the div that has a dojoType of
openils.widget.FacetSidebar in
web/opac/skin/default/xml/common/sidebar.xml (adjusted for your skin's
name, of course).  For instance, to push Personal Author to the top,
you might add the following classOrder:

  classOrder='[{name:"author","facetOrder":["personal","corporate","conference","other"]},"subject","series"]'


(*) http://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/web/js/dojo/openils/widget/FacetSidebar.js;h=25c2175d836fc8d5215dc48275fed8302b63aa81;hb=master

-- 
Mike Rylander
 | Director of Research and Development
 | Equinox Software, Inc. / Your Library's Guide to Open Source
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-general mailing list