[Koha-bugs] [Bug 7601] New: Preference for default language for field 008 Range 35-37 (instead of hard coded "eng")
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sat Feb 25 22:53:16 CET 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7601
Bug #: 7601
Summary: Preference for default language for field 008 Range
35-37 (instead of hard coded "eng")
Classification: Unclassified
Change sponsored?: ---
Product: Koha
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Cataloging
AssignedTo: gmcharlt at gmail.com
ReportedBy: veron at veron.ch
QAContact: koha.sekjal at gmail.com
Problem:
--------
When a new marc record is added, the language code in field 008 Range 35-37
defaults to Englih ("eng"). This makes cataloguing inefficient and error-prone
for librarians if most of the bibliographic data is e.g. in German or in
French.
Background:
-----------
The language code for English (eng) is hard coded in the files
...koha\intranet\cgi-bin\cataloguing\value_builder\marc21_field_008.pl
(~Lines 61, 100)
and
...koha\intranet\cgi-bin\cataloguing\value_builder\normarc_field_008.pl
(~Lines 58, 98)
Proposition:
------------
--Step 1 --------------------------
Add somewhere to cataloguing.pref,
section "Record Structure" :
-----------------------------------
-
- Fill in the default language for field 008 Range 35-37 (e.g. eng,
nor, ger, see <a
href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for
Languages</a>)
- pref: DefaultLanguageField008
- " Empty defaults to eng."
--Step 2 --------------------------
Change marc21_field_008.pl and
normarc_field_008.pl as follows:
-----------------------------------
--2a---
Add 3 lines of code at the top of the functions
sub plugin_javascript and sub plugin:
my $lang = C4::Context->preference('DefaultLanguageField008' );
$lang = "eng" unless $lang;
$lang = pack("A3", $lang);
The code defaults an empty value to "eng" makes sure that the code has a lenght
of 3 letters.
--2b---
In both functions, replace hard coded eng with $lang:
document.getElementById(\"$field_number\").value='$dateentered' + 't
xxu||||| |||| 00| 0 $lang d';
$result = "$dateentered" . "t xxu||||| |||| 00| 0 $lang d" unless
$result;
--Step 3----------------------------------------------------------------------
Login to Koha, go to Home › Administration › System Preferences (Cataloging)
and test with empty value and different language codes (ger, ita etc.)
------------------------------------------------------------------------------
I implemented and tested this locally with marc21_field_008.pl (Koha
3.06.02.003)
--
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the Koha-bugs
mailing list