Bug 20245 - Wrong language code for Slovak
Summary: Wrong language code for Slovak
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Radek Šiman (R-Bit Technology, s.r.o.)
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2018-02-19 08:58 UTC by Petr Havel
Modified: 2018-10-24 09:13 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20245: Wrong language code for Slovak (1.91 KB, patch)
2018-03-08 21:53 UTC, Radek Šiman (R-Bit Technology, s.r.o.)
Details | Diff | Splinter Review
Bug 20245: Wrong language code for Slovak (1.96 KB, patch)
2018-03-28 02:30 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 20245: Wrong language code for Slovak (2.05 KB, patch)
2018-04-06 09:27 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Havel 2018-02-19 08:58:08 UTC
Wrong language code in mandatory/subtag_registry.sql for Slovak. 
Value 'slk' → 'slo' in table language_rfc4646_to_iso639, key 'sk'.

OLD:
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
VALUES ( 'sk','slk');

NEW:
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
VALUES ( 'sk','slo');
Comment 1 Jonathan Druart 2018-03-01 15:25:44 UTC
Hola Petr, Can you provide a patch please?

https://wiki.koha-community.org/wiki/Submitting_A_Patch
Comment 2 Petr Havel 2018-03-02 14:36:17 UTC
(In reply to Jonathan Druart from comment #1)
> Hola Petr, Can you provide a patch please?
> 
> https://wiki.koha-community.org/wiki/Submitting_A_Patch

Sorry, I can't make patch.
Comment 3 Radek Šiman (R-Bit Technology, s.r.o.) 2018-03-08 21:53:29 UTC
Created attachment 72542 [details] [review]
Bug 20245: Wrong language code for Slovak

This patch only updates iso639_2_code value for Slovak language

Test plan:
1) Obtain a biblio record having 'slo' value in its language code
   (marc field 041a)
2) Try to find it through Advanced search + more options with language
   set to Slovak
3) Nothing is found
4) Apply this patch
5) Repeat steps 1 and 2
6) Record is found now
Comment 4 M. Tompsett 2018-03-26 17:42:11 UTC
I just ran through all the codes we have in the installer/data/mysql/en/mandatory/subtag_registry.sql

Looking at https://www.loc.gov/standards/iso639-2/php/code_list.php
I noticed that the following use either Bibliographic or Terminology codes.

This patch turns slk to slo (T)->(B). So the question I have is: should not all the codes be Bibliographic?

cze - B
ger - B
gre - B
eus - T
per - B
fre - B
arm - B
ice - B
geo - B
mri - T
may - B
dut - B
pbr - is ISO 639-3 code, not 639-2 code!
prs - is ISO 639-3 code, not 639-2 code!
rum - B
slk - T -- see bug 20245
sqi - T
chi - B
Comment 5 Katrin Fischer 2018-03-27 06:19:55 UTC
Hi Mark, can you explain the difference? Anyway, I think this should go on a separate bug if this one is ok to go in.  I've usually checked: http://www.loc.gov/marc/languages/
Comment 6 paxed 2018-03-27 08:03:34 UTC
If these codes are going to be used to match the language codes in field 041 or 008/35-37, then these need to be the bibliographic type.

See also: https://en.wikipedia.org/wiki/ISO_639-2#B_and_T_codes
Comment 7 M. Tompsett 2018-03-28 02:24:34 UTC
Based on reading from links given, I found this particular excerpt useful:
"RELATIONSHIP TO ISO 639-2
ISO 639-2 (Codes for the representation of names of languages-- Part 2: alpha-3 code) was based on the MARC Code List for Languages and published in 1998. In the 22 cases where the ISO 639-2 list has two alternative codes, the bibliographic code is the same as the MARC code." (http://www.loc.gov/marc/languages/introduction.pdf)

As such, I'm leaning towards they should all be Bibliographic. So, I'm going to sign this off. However, we should fix the others too.
Comment 8 M. Tompsett 2018-03-28 02:30:02 UTC
Created attachment 73360 [details] [review]
Bug 20245: Wrong language code for Slovak

This patch updates iso639_2_code value for Slovak language

Test plan:
1) Obtain a biblio record having 'slo' value in its language
   code (marc field 041a)
2) Try to find it through Advanced search + more options
   with language set to Slovak
3) Nothing is found
4) Apply this patch
5) Repeat steps 1 and 2
6) Record is found now

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 9 Marcel de Rooy 2018-04-06 09:27:28 UTC
Created attachment 73754 [details] [review]
Bug 20245: Wrong language code for Slovak

This patch updates iso639_2_code value for Slovak language

Test plan:
1) Obtain a biblio record having 'slo' value in its language
   code (marc field 041a)
2) Try to find it through Advanced search + more options
   with language set to Slovak
3) Nothing is found
4) Apply this patch
5) Repeat steps 1 and 2
6) Record is found now

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Jonathan Druart 2018-04-06 17:23:33 UTC
(In reply to M. Tompsett from comment #7)
> As such, I'm leaning towards they should all be Bibliographic. So, I'm going
> to sign this off. However, we should fix the others too.

Where? When? Who?
Comment 11 M. Tompsett 2018-04-06 18:09:01 UTC
(In reply to Jonathan Druart from comment #10)
> (In reply to M. Tompsett from comment #7)
> > As such, I'm leaning towards they should all be Bibliographic. So, I'm going
> > to sign this off. However, we should fix the others too.
> 
> Where? When? Who?

See comment #4 for the list that needs fixing.
See bug 20482 for the rest of them.
Comment 12 Jonathan Druart 2018-04-06 18:52:01 UTC
Sorry, I missed the "See also" field.
Thanks Mark.
Comment 13 Jonathan Druart 2018-04-20 14:59:04 UTC
It's not clear to me if I should push this one without bug 20482 (why fix one when all should be fixed?)
Comment 14 Jonathan Druart 2018-04-24 15:36:40 UTC
Pushed to master for 18.05, thanks to everybody involved!