Re: [patch] Respect i18n collection names in search boxes

2006-12-15 Thread Tibor Simko
Hello Ferran:

On Fri, 15 Dec 2006, Ferran Jorba wrote:

> I've seen that you still haven't applied my tiny patch below, and 0.92
> is approaching.  Could you consider it, please?

Yup, I shall.  In spite of the version bump, the release should happen
in the beginning of next week only, as there are still a few other
things to finish...

Best regards
-- 
Tibor Simko ** CERN IT-UDS ** Bldg 31-S-014 ** Voice: +41-22-7673527
CERN Document Server **  ** 



Re: [patch] Respect i18n collection names in search boxes

2006-12-15 Thread Ferran Jorba

Hi Tibor,

I've seen that you still haven't applied my tiny patch below, and 0.92
is approaching.  Could you consider it, please?

Thanks,

Ferran
Display i18n collection names when an error message is shown.  I've also
added a cosmetic  in the list of collection names, because I feel
it is easier to read, but you decide.

Index: cds-invenio/modules/websearch/lib/search_engine.py
===
--- cds-invenio.orig/modules/websearch/lib/search_engine.py	2006-12-15 08:55:25.875425044 +0100
+++ cds-invenio/modules/websearch/lib/search_engine.py	2006-12-15 08:55:42.098305099 +0100
@@ -1562,11 +1562,13 @@
 t1 = os.times()[4]
 results = {}
 results_nbhits = 0
+colls_printable = []
 for coll in colls:
 results[coll] = HitSet()
 results[coll]._set = Numeric.bitwise_and(hitset_in_any_collection._set, get_collection_reclist(coll)._set)
 results[coll].calculate_nbhits()
 results_nbhits += results[coll]._nbhits
+colls_printable.append(get_coll_i18nname(coll, ln))
 if results_nbhits == 0:
 # no hits found, try to search in Home:
 results_in_Home = HitSet()
@@ -1577,7 +1579,7 @@
 if of.startswith("h"):
 url = websearch_templates.build_search_url(req.argd, cc=cdsname, c=[])
 print_warning(req, _("No match found in collection %(x_collection)s. Other public collections gave %(x_url_open)s%(x_nb_hits)d hits%(x_url_close)s.") %\
-  {'x_collection': string.join(colls, ','), 
+  {'x_collection': '' + string.join(colls_printable, ',') + '',
'x_url_open': '' % (url),
'x_nb_hits': results_in_Home._nbhits,
'x_url_close': ''})


CVS Commit Overview for 2006-12-14

2006-12-15 Thread CDS Invenio CVS
CVS Commit Overview for 2006-12-14
==

2006-12-14  Jerome Caffaro 

* modules/bibconvert/lib/bibconvert.py: Made formatting function
'KB' aware of default KBs directory to load kb files from there
when full path not specified in calls to 'KB'.  Some code
reformatting.

2006-12-14  Jerome Caffaro 

* modules/bibconvert/lib/bibconvert_xslt_engine.py: Simplified
calls to BibConvert formatting function from XSL stylesheet by
handling node in function in addition to string values.

2006-12-14  Jerome Caffaro 

* modules/bibformat/lib/elements/bfe_issn.py: Added check on
CFG_CERN_SITE to select correct field for getting journal name when
formatting.  Revised function names
(build_distant_issns->build_issns_from_distant_site and
build_local_issns->build_issns_from_local_site)

2006-12-14  Jerome Caffaro 

* modules/bibformat/lib/elements/bfe_issn.py: Added journal-issn
mappings collected from http://cdsweb.cern.ch/.  Removed 'limit'
option which was not necessary (building mappings is fast).

2006-12-14  Jerome Caffaro 

* modules/bibconvert/etc/oaidc2marcxml.xsl,
modules/bibconvert/etc/oaimarc2marcxml.xsl: Added licence info at
beginning of stylesheets.  Added comments.

2006-12-14  Tibor Simko 

* CREDITS: Added Jasna Markovic for the contributions to the
Croatian translation.

2006-12-14  Jerome Caffaro 

* modules/bibconvert/doc/admin/Makefile.am,
modules/bibconvert/doc/admin/doctype.kb,
modules/bibconvert/doc/admin/oaimarc2marcxml_sample.xsl: Added
sample kb and xsl config file as an example of XSL transformation
done with BibConvert, using BibConvert internal formatting
functions.

2006-12-14  Tibor Simko 

* configure.ac: Bump up the version number to v0.92.0 in view of
the forthcoming release.

2006-12-14  Tibor Simko 

* INSTALL, po/bg.po, po/ca.po, po/cds-invenio.pot, po/cs.po,
po/de.po, po/el.po, po/en.po, po/es.po, po/fr.po, po/hr.po,
po/it.po, po/ja.po, po/no.po, po/pl.po, po/pt.po, po/ru.po,
po/sk.po, po/sv.po, po/uk.po: Updated message references and
version numbers for the forthcoming v0.92.0 release.

2006-12-14  Nicholas Robinson 

* modules/websubmit/lib/websubmit_templates.py: Fixed a bug where
text input fields could have a MAXLENGTH of ZERO when a value was
not set for MAXLENGTH in the element definition in the WebSubmit
DB; Fixed some string escaping for JavaScript repopulation of
element values on page-refresh: previously double-quotes would
break the JavaScript; Cleaned up a few HTML tags;

2006-12-14  Tibor Simko 

* INSTALL: Bump up the version number to v0.92.0.

2006-12-14  Tibor Simko 

* modules/websubmit/lib/functions/Create_Modify_Interface.py: Fixed
import statement typo.

-- 
CDS Invenio Developers