Bug 16952: Czech language definitions for sorting in Zebra

Test plan:
1) Apply patch
2) Create new instance with parameter --zebralang cs
3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s")
4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance
5) Records should be sorted correctly by Czech rules
6) Look at code and confirm it is ok

Signed-off-by: radiuscz <radek.siman@centrum.cz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I did not test this patch, but trust in the author and signoffer

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bd13efd8ac)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Josef Moravec 2016-07-21 07:46:23 +02:00 committed by Frédéric Demians
parent 10fe2d58dd
commit 301e4880a9
4 changed files with 45 additions and 3 deletions

View File

@ -475,7 +475,7 @@ my %valid_config_values = (
'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 },
'BIB_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 },
'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
'ZEBRA_LANGUAGE' => { 'en' => 1, 'es' => 1, 'fr' => 1, 'gr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
'ZEBRA_LANGUAGE' => { 'cs' => 1, 'en' => 1, 'es' => 1, 'fr' => 1, 'gr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
'USE_MEMCACHED' => { 'yes' => 1, 'no' => 1 },

View File

@ -52,7 +52,7 @@ Options:
--marcflavor flavor Set the MARC flavor. Valid values are marc21 (default),
normarc and unimarc.
--zebralang lang Choose the primary language for Zebra indexing. Valid
values are en (default), es, fr, gr, nb, ru and uk.
values are cs, en (default), es, fr, gr, nb, ru and uk.
--auth-idx idx_mode Set the indexing mode for authority records. Valid
values are dom (default) and grs1.
--biblio-idx idx_mode Set the indexing mode for bibliographic records.

View File

@ -27,7 +27,7 @@ DEFAULTSQL=""
# default: 'marc21'
ZEBRA_MARC_FORMAT="marc21"
# ZEBRA_LANGUAGE: 'en' | 'es' | 'fr' | 'nb' | 'ru' | 'uk'
# ZEBRA_LANGUAGE: 'cs' | 'en' | 'es' | 'fr' | 'nb' | 'ru' | 'uk'
# Primary language for Zebra indexing
# default: 'en'
ZEBRA_LANGUAGE="en"

View File

@ -0,0 +1,42 @@
# Koha's Zebra character map file for czech
#
encoding utf-8
# Character sort order definition
lowercase {0-9}abcčdefgh(ch)ijklmnopqrřsštuvwxyzž
uppercase {0-9}ABCČDEFGH(Ch)IJKLMNOPQRŘSŠTUVWXYZŽ
# Breaking characters
space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~{\x88-\x89}
# Characters to be considered equivalent for searching purposes.
equivalent aáä
equivalent dď
equivalent eéěë
equivalent ií
equivalent lľł
equivalent nň
equivalent oóö
equivalent sß
equivalent tť
equivalent uůúü
equivalent yý
# Supplemental mappings
map (&auml;) a
map (&aring;) a
map (&ouml;) o
map (&Auml;) A
map (&Aring;) A
map (&Ouml;) O
map âàáäÂÀÁÄ a
map çÇ c
map ďĎ d
map êèéëÊÈÉË e
map îïíÎÏÍ i
map ľĽłŁ l
map ñňŇ n
map ôöóÔÖÓ o
map ß s
map ťŤ t
map ûùúüůÛÜÙÚŮ u
map ýÿÝŸ y