Bugzilla – Attachment 56733 Details for
Bug 16952
Add sorting rules for Czech language to Zebra
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16952: Czech language definitions for sorting in Zebra
Bug-16952-Czech-language-definitions-for-sorting-i.patch (text/plain), 4.53 KB, created by
Radek Šiman (R-Bit Technology, s.r.o.)
on 2016-10-22 05:06:38 UTC
(
hide
)
Description:
Bug 16952: Czech language definitions for sorting in Zebra
Filename:
MIME Type:
Creator:
Radek Šiman (R-Bit Technology, s.r.o.)
Created:
2016-10-22 05:06:38 UTC
Size:
4.53 KB
patch
obsolete
>From 54acb64ab954fdc71da5b55772ec95f862c9f786 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Thu, 21 Jul 2016 07:46:23 +0200 >Subject: [PATCH] Bug 16952: Czech language definitions for sorting in Zebra >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > Makefile.PL | 2 +- > debian/scripts/koha-create | 2 +- > debian/templates/koha-sites.conf | 2 +- > etc/zebradb/lang_defs/cs/sort-string-utf.chr | 42 ++++++++++++++++++++++++++++ > 4 files changed, 45 insertions(+), 3 deletions(-) > create mode 100644 etc/zebradb/lang_defs/cs/sort-string-utf.chr > >diff --git a/Makefile.PL b/Makefile.PL >index fd0725b..4c2f6f9 100644 >--- a/Makefile.PL >+++ b/Makefile.PL >@@ -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 }, >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index e416c8c..a9fe29c 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -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. >diff --git a/debian/templates/koha-sites.conf b/debian/templates/koha-sites.conf >index 47d5033..c954a04 100644 >--- a/debian/templates/koha-sites.conf >+++ b/debian/templates/koha-sites.conf >@@ -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" >diff --git a/etc/zebradb/lang_defs/cs/sort-string-utf.chr b/etc/zebradb/lang_defs/cs/sort-string-utf.chr >new file mode 100644 >index 0000000..126c050 >--- /dev/null >+++ b/etc/zebradb/lang_defs/cs/sort-string-utf.chr >@@ -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 (ä) a >+map (å) a >+map (ö) o >+map (Ä) A >+map (Å) A >+map (Ö) 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 >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16952
:
53556
|
56683
|
56733
|
56833