my $U = 'OpenILS::Application::AppUtils';
# set the bootstrap config when this module is loaded
-my ($bootstrap, $supercat, $actor, $parser, $search, $xslt, $cn_browse_xslt, %browse_types);
+my ($bootstrap, $supercat, $actor, $parser, $search, $xslt, $cn_browse_xslt, %browse_types, %qualifier_map);
$browse_types{call_number}{xml} = sub {
- my $tree = shift;
+ my $tree = shift;
- my $year = (gmtime())[5] + 1900;
- my $content = '';
+ my $year = (gmtime())[5] + 1900;
+ my $content = '';
- $content .= "<volumes xmlns='http://open-ils.org/spec/holdings/v1'>\n";
+ $content .= "<volumes xmlns='http://open-ils.org/spec/holdings/v1'>\n";
- for my $cn (@$tree) {
- (my $cn_class = $cn->class_name) =~ s/::/-/gso;
- $cn_class =~ s/Fieldmapper-//gso;
+ for my $cn (@$tree) {
+ (my $cn_class = $cn->class_name) =~ s/::/-/gso;
+ $cn_class =~ s/Fieldmapper-//gso;
- my $cn_tag = "tag:open-ils.org,$year:$cn_class/".$cn->id;
- my $cn_lib = $cn->owning_lib->shortname;
- my $cn_label = $cn->label;
+ my $cn_tag = "tag:open-ils.org,$year:$cn_class/".$cn->id;
+ my $cn_lib = $cn->owning_lib->shortname;
+ my $cn_label = $cn->label;
- $cn_label =~ s/\n//gos;
- $cn_label =~ s/&/&/go;
- $cn_label =~ s/'/'/go;
- $cn_label =~ s/</</go;
- $cn_label =~ s/>/>/go;
+ $cn_label =~ s/\n//gos;
+ $cn_label =~ s/&/&/go;
+ $cn_label =~ s/'/'/go;
+ $cn_label =~ s/</</go;
+ $cn_label =~ s/>/>/go;
- (my $ou_class = $cn->owning_lib->class_name) =~ s/::/-/gso;
- $ou_class =~ s/Fieldmapper-//gso;
+ (my $ou_class = $cn->owning_lib->class_name) =~ s/::/-/gso;
+ $ou_class =~ s/Fieldmapper-//gso;
- my $ou_tag = "tag:open-ils.org,$year:$ou_class/".$cn->owning_lib->id;
- my $ou_name = $cn->owning_lib->name;
+ my $ou_tag = "tag:open-ils.org,$year:$ou_class/".$cn->owning_lib->id;
+ my $ou_name = $cn->owning_lib->name;
- $ou_name =~ s/\n//gos;
- $ou_name =~ s/'/'/go;
+ $ou_name =~ s/\n//gos;
+ $ou_name =~ s/'/'/go;
- (my $rec_class = $cn->record->class_name) =~ s/::/-/gso;
- $rec_class =~ s/Fieldmapper-//gso;
+ (my $rec_class = $cn->record->class_name) =~ s/::/-/gso;
+ $rec_class =~ s/Fieldmapper-//gso;
- my $rec_tag = "tag:open-ils.org,$year:$rec_class/".$cn->record->id.'/'.$cn->owning_lib->shortname;
+ my $rec_tag = "tag:open-ils.org,$year:$rec_class/".$cn->record->id.'/'.$cn->owning_lib->shortname;
- $content .= "<volume id='$cn_tag' lib='$cn_lib' label='$cn_label'>\n";
- $content .= "<owning_lib xmlns='http://open-ils.org/spec/actors/v1' id='$ou_tag' name='$ou_name'/>\n";
+ $content .= "<volume id='$cn_tag' lib='$cn_lib' label='$cn_label'>\n";
+ $content .= "<owning_lib xmlns='http://open-ils.org/spec/actors/v1' id='$ou_tag' name='$ou_name'/>\n";
- my $r_doc = $parser->parse_string($cn->record->marc);
- $r_doc->documentElement->setAttribute( id => $rec_tag );
- $content .= $U->entityize($r_doc->documentElement->toString);
+ my $r_doc = $parser->parse_string($cn->record->marc);
+ $r_doc->documentElement->setAttribute( id => $rec_tag );
+ $content .= $U->entityize($r_doc->documentElement->toString);
- $content .= "</volume>\n";
- }
+ $content .= "</volume>\n";
+ }
- $content .= "</volumes>\n";
- return ("Content-type: application/xml\n\n",$content);
+ $content .= "</volumes>\n";
+ return ("Content-type: application/xml\n\n",$content);
};
$browse_types{call_number}{html} = sub {
- my $tree = shift;
- my $p = shift;
- my $n = shift;
-
- if (!$cn_browse_xslt) {
- $cn_browse_xslt = $parser->parse_file(
- OpenSRF::Utils::SettingsClient
- ->new
- ->config_value( dirs => 'xsl' ).
- "/CNBrowse2HTML.xsl"
- );
- $cn_browse_xslt = $xslt->parse_stylesheet( $cn_browse_xslt );
- }
-
- my (undef,$xml) = $browse_types{call_number}{xml}->($tree);
-
- return (
- "Content-type: text/html\n\n",
- $U->entityize(
- $cn_browse_xslt->transform(
- $parser->parse_string( $xml ),
- 'prev' => "'$p'",
- 'next' => "'$n'"
- )->toString(1)
- )
- );
+ my $tree = shift;
+ my $p = shift;
+ my $n = shift;
+
+ if (!$cn_browse_xslt) {
+ $cn_browse_xslt = $parser->parse_file(
+ OpenSRF::Utils::SettingsClient
+ ->new
+ ->config_value( dirs => 'xsl' ).
+ "/CNBrowse2HTML.xsl"
+ );
+ $cn_browse_xslt = $xslt->parse_stylesheet( $cn_browse_xslt );
+ }
+
+ my (undef,$xml) = $browse_types{call_number}{xml}->($tree);
+
+ return (
+ "Content-type: text/html\n\n",
+ $U->entityize(
+ $cn_browse_xslt->transform(
+ $parser->parse_string( $xml ),
+ 'prev' => "'$p'",
+ 'next' => "'$n'"
+ )->toString(1)
+ )
+ );
};
sub import {
- my $self = shift;
- $bootstrap = shift;
+ my $self = shift;
+ $bootstrap = shift;
}
sub child_init {
- OpenSRF::System->bootstrap_client( config_file => $bootstrap );
-
- my $idl = OpenSRF::Utils::SettingsClient->new->config_value("IDL");
- Fieldmapper->import(IDL => $idl);
+ OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+
+ my $idl = OpenSRF::Utils::SettingsClient->new->config_value("IDL");
+ Fieldmapper->import(IDL => $idl);
+
+ $supercat = OpenSRF::AppSession->create('open-ils.supercat');
+ $actor = OpenSRF::AppSession->create('open-ils.actor');
+ $search = OpenSRF::AppSession->create('open-ils.search');
+ $parser = new XML::LibXML;
+ $xslt = new XML::LibXSLT;
+
+ $cn_browse_xslt = $parser->parse_file(
+ OpenSRF::Utils::SettingsClient
+ ->new
+ ->config_value( dirs => 'xsl' ).
+ "/CNBrowse2HTML.xsl"
+ );
- $supercat = OpenSRF::AppSession->create('open-ils.supercat');
- $actor = OpenSRF::AppSession->create('open-ils.actor');
- $search = OpenSRF::AppSession->create('open-ils.search');
- $parser = new XML::LibXML;
- $xslt = new XML::LibXSLT;
+ $cn_browse_xslt = $xslt->parse_stylesheet( $cn_browse_xslt );
- $cn_browse_xslt = $parser->parse_file(
- OpenSRF::Utils::SettingsClient
- ->new
- ->config_value( dirs => 'xsl' ).
- "/CNBrowse2HTML.xsl"
- );
+ %qualifier_map = %{$supercat
+ ->request("open-ils.supercat.biblio.search_aliases")
+ ->gather(1)};
- $cn_browse_xslt = $xslt->parse_stylesheet( $cn_browse_xslt );
+ my %attribute_desc = (
+ site => 'Evergreen Site Code (shortname)',
+ sort => 'Sort on relevance, title, author, pubdate, create_date or edit_date',
+ dir => 'Sort direction (asc|desc)',
+ available => 'Filter to available (true|false)',
+ );
- my $list = $supercat
- ->request("open-ils.supercat.record.formats")
- ->gather(1);
+ # Append the non-search-alias attributes to the qualifier map
+ foreach ( qw/
+ available
+ ascending
+ descending
+ sort
+ format
+ before
+ after
+ statuses
+ locations
+ site
+ depth
+ lasso
+ offset
+ limit
+ preferred_language
+ preferred_language_weight
+ preferred_language_multiplier
+ /) {
+ $qualifier_map{'eg'}{$_}{'index'} = $_;
+ if (exists $attribute_desc{$_}) {
+ $qualifier_map{'eg'}{$_}{'title'} = $attribute_desc{$_};
+ } else {
+ $qualifier_map{'eg'}{$_}{'title'} = $_;
+ }
+ }
+
+ my $list = $supercat
+ ->request("open-ils.supercat.record.formats")
+ ->gather(1);
$list = [ map { (keys %$_)[0] } @$list ];
push @$list, 'htmlholdings','html', 'marctxt', 'ris';
my $__a = $browse_axis;
$browse_types{$__a}{$__f} = sub {
- my $record_list = shift;
- my $prev = shift;
- my $next = shift;
- my $real_format = shift || $__f;
- my $unapi = shift;
- my $base = shift;
- my $site = shift;
-
- $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]");
- my $feed = create_record_feed( 'record', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /(-full|-uris)$/o ? 1 : 0 );
- $feed->root( "$base/../" );
- $feed->lib( $site );
- $feed->link( next => $next => $feed->type );
- $feed->link( previous => $prev => $feed->type );
-
- return (
+ my $record_list = shift;
+ my $prev = shift;
+ my $next = shift;
+ my $real_format = shift || $__f;
+ my $unapi = shift;
+ my $base = shift;
+ my $site = shift;
+
+ $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]");
+ my $feed = create_record_feed( 'record', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /(-full|-uris)$/o ? 1 : 0 );
+ $feed->root( "$base/../" );
+ $feed->lib( $site );
+ $feed->link( next => $next => $feed->type );
+ $feed->link( previous => $prev => $feed->type );
+
+ return (
"Content-type: ". $feed->type ."; charset=utf-8\n\n",
$feed->toString
);
my $__a = $browse_axis;
$browse_types{$__a}{$__f} = sub {
- my $record_list = shift;
- my $prev = shift;
- my $next = shift;
- my $real_format = shift || $__f;
- my $unapi = shift;
- my $base = shift;
- my $site = shift;
-
- $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]");
- my $feed = create_record_feed( 'authority', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /-full$/o ? -1 : 0 );
- $feed->root( "$base/../" );
- $feed->link( next => $next => $feed->type );
- $feed->link( previous => $prev => $feed->type );
-
- return (
+ my $record_list = shift;
+ my $prev = shift;
+ my $next = shift;
+ my $real_format = shift || $__f;
+ my $unapi = shift;
+ my $base = shift;
+ my $site = shift;
+
+ $log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]");
+ my $feed = create_record_feed( 'authority', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /-full$/o ? -1 : 0 );
+ $feed->root( "$base/../" );
+ $feed->link( next => $next => $feed->type );
+ $feed->link( previous => $prev => $feed->type );
+
+ return (
"Content-type: ". $feed->type ."; charset=utf-8\n\n",
$feed->toString
);
=cut
sub parse_feed_type {
- my $type = shift;
+ my $type = shift;
- if ($type =~ /-full$/o) {
- return 1;
- }
+ if ($type =~ /-full$/o) {
+ return 1;
+ }
- if ($type =~ /-uris$/o) {
- return "uris";
- }
+ if ($type =~ /-uris$/o) {
+ return "uris";
+ }
- # Otherwise, we'll return just the facts, ma'am
- return 0;
+ # Otherwise, we'll return just the facts, ma'am
+ return 0;
}
=head2 supercat_format($format_hashref, $format_type)
=cut
sub supercat_format {
- my $h = shift;
- my $type = shift;
+ my $h = shift;
+ my $type = shift;
- (my $base_type = $type) =~ s/(-full|-uris)$//o;
+ (my $base_type = $type) =~ s/(-full|-uris)$//o;
- my $format = "<format><name>$type</name><type>application/xml</type>";
+ my $format = "<format><name>$type</name><type>application/xml</type>";
- for my $part ( qw/namespace_uri docs schema_location/ ) {
- $format .= "<$part>$$h{$base_type}{$part}</$part>"
- if ($$h{$base_type}{$part});
- }
+ for my $part ( qw/namespace_uri docs schema_location/ ) {
+ $format .= "<$part>$$h{$base_type}{$part}</$part>"
+ if ($$h{$base_type}{$part});
+ }
- $format .= '</format>';
+ $format .= '</format>';
- return $format;
+ return $format;
}
=head2 unapi_format($format_hashref, $format_type)
=cut
sub unapi_format {
- my $h = shift;
- my $type = shift;
+ my $h = shift;
+ my $type = shift;
- (my $base_type = $type) =~ s/(-full|-uris)$//o;
+ (my $base_type = $type) =~ s/(-full|-uris)$//o;
- my $format = "<format name='$type' type='application/xml'";
+ my $format = "<format name='$type' type='application/xml'";
- for my $part ( qw/namespace_uri docs schema_location/ ) {
- $format .= " $part='$$h{$base_type}{$part}'"
- if ($$h{$base_type}{$part});
- }
+ for my $part ( qw/namespace_uri docs schema_location/ ) {
+ $format .= " $part='$$h{$base_type}{$part}'"
+ if ($$h{$base_type}{$part});
+ }
- $format .= "/>\n";
+ $format .= "/>\n";
- return $format;
+ return $format;
}
sub oisbn {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
- (my $isbn = $apache->path_info) =~ s{^.*?([^/]+)$}{$1}o;
+ (my $isbn = $apache->path_info) =~ s{^.*?([^/]+)$}{$1}o;
- my $list = $supercat
- ->request("open-ils.supercat.oisbn", $isbn)
- ->gather(1);
+ my $list = $supercat
+ ->request("open-ils.supercat.oisbn", $isbn)
+ ->gather(1);
- print "Content-type: application/xml; charset=utf-8\n\n";
- print "<?xml version='1.0' encoding='UTF-8' ?>\n";
+ print "Content-type: application/xml; charset=utf-8\n\n";
+ print "<?xml version='1.0' encoding='UTF-8' ?>\n";
- unless (exists $$list{metarecord}) {
- print '<idlist/>';
- return Apache2::Const::OK;
- }
+ unless (exists $$list{metarecord}) {
+ print '<idlist/>';
+ return Apache2::Const::OK;
+ }
- print "<idlist metarecord='$$list{metarecord}'>\n";
+ print "<idlist metarecord='$$list{metarecord}'>\n";
- for ( keys %{ $$list{record_list} } ) {
- (my $o = $$list{record_list}{$_}) =~s/^(\S+).*?$/$1/o;
- print " <isbn record='$_'>$o</isbn>\n"
- }
+ for ( keys %{ $$list{record_list} } ) {
+ (my $o = $$list{record_list}{$_}) =~s/^(\S+).*?$/$1/o;
+ print " <isbn record='$_'>$o</isbn>\n"
+ }
- print "</idlist>\n";
+ print "</idlist>\n";
- return Apache2::Const::OK;
+ return Apache2::Const::OK;
}
sub unapi {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
- my $cgi = new CGI;
+ my $cgi = new CGI;
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'unapi', $url)[0];
- my $base = (split 'unapi', $url)[0] . 'unapi';
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'unapi', $url)[0];
+ my $base = (split 'unapi', $url)[0] . 'unapi';
- my $uri = $cgi->param('id') || '';
- my $host = $cgi->virtual_host || $cgi->server_name;
+ my $uri = $cgi->param('id') || '';
+ my $host = $cgi->virtual_host || $cgi->server_name;
- my $skin = $cgi->param('skin') || 'default';
- my $locale = $cgi->param('locale') || 'en-US';
+ my $skin = $cgi->param('skin') || 'default';
+ my $locale = $cgi->param('locale') || 'en-US';
+
+ # Enable localized results of copy status, etc
+ $supercat->session_locale($locale);
+
+ my $format = $cgi->param('format');
+ my $flesh_feed = parse_feed_type($format);
+ (my $base_format = $format) =~ s/(-full|-uris)$//o;
+ my ($id,$type,$command,$lib,$depth,$paging) = ('','','');
+
+ if (!$format) {
+ my $body = "Content-type: application/xml; charset=utf-8\n\n";
+
+ if ($uri =~ m{^tag:[^:]+:([^\/]+)/([^\/[]+)(?:\[([0-9,]+)\])?(?:/(.+))?}o) {
+ $id = $2;
+ $paging = $3;
+ ($lib,$depth) = split('/', $4);
+ $type = 'record';
+ $type = 'metarecord' if ($1 =~ /^m/o);
+ $type = 'authority' if ($1 =~ /^authority/o);
+
+ my $list = $supercat
+ ->request("open-ils.supercat.$type.formats")
+ ->gather(1);
+
+ if ($type eq 'record' or $type eq 'isbn') {
+ $body .= <<" FORMATS";
+<formats id='$uri'>
+ <format name='opac' type='text/html'/>
+ <format name='html' type='text/html'/>
+ <format name='htmlholdings' type='text/html'/>
+ <format name='holdings_xml' type='application/xml'/>
+ <format name='holdings_xml-full' type='application/xml'/>
+ <format name='html-full' type='text/html'/>
+ <format name='htmlholdings-full' type='text/html'/>
+ <format name='marctxt' type='text/plain'/>
+ <format name='ris' type='text/plain'/>
+ FORMATS
+ } elsif ($type eq 'metarecord') {
+ $body .= <<" FORMATS";
+ <formats id='$uri'>
+ <format name='opac' type='text/html'/>
+ FORMATS
+ } else {
+ $body .= <<" FORMATS";
+ <formats id='$uri'>
+ FORMATS
+ }
- # Enable localized results of copy status, etc
- $supercat->session_locale($locale);
+ for my $h (@$list) {
+ my ($type) = keys %$h;
+ $body .= unapi_format($h, $type);
- my $format = $cgi->param('format');
- my $flesh_feed = parse_feed_type($format);
- (my $base_format = $format) =~ s/(-full|-uris)$//o;
- my ($id,$type,$command,$lib,$depth,$paging) = ('','','');
+ if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
+ $body .= unapi_format($h, "$type-full");
+ $body .= unapi_format($h, "$type-uris");
+ }
+ }
- if (!$format) {
- my $body = "Content-type: application/xml; charset=utf-8\n\n";
-
- if ($uri =~ m{^tag:[^:]+:([^\/]+)/([^\/[]+)(?:\[([0-9,]+)\])?(?:/(.+))?}o) {
- $id = $2;
- $paging = $3;
- ($lib,$depth) = split('/', $4);
- $type = 'record';
- $type = 'metarecord' if ($1 =~ /^m/o);
- $type = 'authority' if ($1 =~ /^authority/o);
+ $body .= "</formats>\n";
- my $list = $supercat
- ->request("open-ils.supercat.$type.formats")
- ->gather(1);
+ } else {
+ my $list = $supercat
+ ->request("open-ils.supercat.$type.formats")
+ ->gather(1);
+
+ push @$list,
+ @{ $supercat
+ ->request("open-ils.supercat.metarecord.formats")
+ ->gather(1);
+ };
- if ($type eq 'record' or $type eq 'isbn') {
- $body .= <<" FORMATS";
-<formats id='$uri'>
- <format name='opac' type='text/html'/>
- <format name='html' type='text/html'/>
- <format name='htmlholdings' type='text/html'/>
- <format name='holdings_xml' type='application/xml'/>
- <format name='holdings_xml-full' type='application/xml'/>
- <format name='html-full' type='text/html'/>
- <format name='htmlholdings-full' type='text/html'/>
- <format name='marctxt' type='text/plain'/>
- <format name='ris' type='text/plain'/>
- FORMATS
- } elsif ($type eq 'metarecord') {
- $body .= <<" FORMATS";
- <formats id='$uri'>
- <format name='opac' type='text/html'/>
- FORMATS
- } else {
- $body .= <<" FORMATS";
- <formats id='$uri'>
- FORMATS
- }
-
- for my $h (@$list) {
- my ($type) = keys %$h;
- $body .= unapi_format($h, $type);
-
- if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
- $body .= unapi_format($h, "$type-full");
- $body .= unapi_format($h, "$type-uris");
- }
- }
-
- $body .= "</formats>\n";
-
- } else {
- my $list = $supercat
- ->request("open-ils.supercat.$type.formats")
- ->gather(1);
-
- push @$list,
- @{ $supercat
- ->request("open-ils.supercat.metarecord.formats")
- ->gather(1);
- };
-
- my %hash = map { ( (keys %$_)[0] => (values %$_)[0] ) } @$list;
- $list = [ map { { $_ => $hash{$_} } } sort keys %hash ];
-
- $body .= <<" FORMATS";
+ my %hash = map { ( (keys %$_)[0] => (values %$_)[0] ) } @$list;
+ $list = [ map { { $_ => $hash{$_} } } sort keys %hash ];
+
+ $body .= <<" FORMATS";
<formats>
- <format name='opac' type='text/html'/>
- <format name='html' type='text/html'/>
- <format name='htmlholdings' type='text/html'/>
- <format name='holdings_xml' type='application/xml'/>
- <format name='holdings_xml-full' type='application/xml'/>
- <format name='html-full' type='text/html'/>
- <format name='htmlholdings-full' type='text/html'/>
- <format name='marctxt' type='text/plain'/>
- <format name='ris' type='text/plain'/>
- FORMATS
-
-
- for my $h (@$list) {
- my ($type) = keys %$h;
- $body .= "\t" . unapi_format($h, $type);
-
- if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
- $body .= "\t" . unapi_format($h, "$type-full");
- $body .= "\t" . unapi_format($h, "$type-uris");
- }
- }
-
- $body .= "</formats>\n";
-
- }
- print $body;
- return Apache2::Const::OK;
- }
-
- my $scheme;
- if ($uri =~ m{^tag:[^:]+:([^\/]+)/([^\/[]+)(?:\[([0-9,]+)\])?(?:/(.+))?}o) {
- $scheme = $1;
- $id = $2;
- $paging = $3;
- ($lib,$depth) = split('/', $4);
- $type = 'record';
- $type = 'metarecord' if ($scheme =~ /^metabib/o);
- $type = 'isbn' if ($scheme =~ /^isbn/o);
- $type = 'acp' if ($scheme =~ /^asset-copy/o);
- $type = 'acn' if ($scheme =~ /^asset-call_number/o);
- $type = 'auri' if ($scheme =~ /^asset-uri/o);
- $type = 'authority' if ($scheme =~ /^authority/o);
- $command = 'retrieve';
- $command = 'browse' if (grep { $scheme eq $_ } qw/call_number title author subject topic authority.title authority.author authority.subject authority.topic series item-age/);
- }
+ <format name='opac' type='text/html'/>
+ <format name='html' type='text/html'/>
+ <format name='htmlholdings' type='text/html'/>
+ <format name='holdings_xml' type='application/xml'/>
+ <format name='holdings_xml-full' type='application/xml'/>
+ <format name='html-full' type='text/html'/>
+ <format name='htmlholdings-full' type='text/html'/>
+ <format name='marctxt' type='text/plain'/>
+ <format name='ris' type='text/plain'/>
+ FORMATS
+
+
+ for my $h (@$list) {
+ my ($type) = keys %$h;
+ $body .= "\t" . unapi_format($h, $type);
+
+ if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
+ $body .= "\t" . unapi_format($h, "$type-full");
+ $body .= "\t" . unapi_format($h, "$type-uris");
+ }
+ }
+
+ $body .= "</formats>\n";
+
+ }
+ print $body;
+ return Apache2::Const::OK;
+ }
+
+ my $scheme;
+ if ($uri =~ m{^tag:[^:]+:([^\/]+)/([^\/[]+)(?:\[([0-9,]+)\])?(?:/(.+))?}o) {
+ $scheme = $1;
+ $id = $2;
+ $paging = $3;
+ ($lib,$depth) = split('/', $4);
+ $type = 'record';
+ $type = 'metarecord' if ($scheme =~ /^metabib/o);
+ $type = 'isbn' if ($scheme =~ /^isbn/o);
+ $type = 'acp' if ($scheme =~ /^asset-copy/o);
+ $type = 'acn' if ($scheme =~ /^asset-call_number/o);
+ $type = 'auri' if ($scheme =~ /^asset-uri/o);
+ $type = 'authority' if ($scheme =~ /^authority/o);
+ $command = 'retrieve';
+ $command = 'browse' if (grep { $scheme eq $_ } qw/call_number title author subject topic authority.title authority.author authority.subject authority.topic series item-age/);
+ }
if ($paging) {
$paging = [split ',', $paging];
$paging = [];
}
- if (!$lib || $lib eq '-') {
- $lib = $actor->request(
- 'open-ils.actor.org_unit_list.search' => parent_ou => undef
- )->gather(1)->[0]->shortname;
- }
-
- my ($lib_object,$lib_id,$ou_types,$lib_depth);
- if ($type ne 'acn' && $type ne 'acp' && $type ne 'auri') {
- $lib_object = $actor->request(
- 'open-ils.actor.org_unit_list.search' => shortname => $lib
- )->gather(1)->[0];
- $lib_id = $lib_object->id;
-
- $ou_types = $actor->request( 'open-ils.actor.org_types.retrieve' )->gather(1);
- $lib_depth = $depth || (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
- }
-
- if ($command eq 'browse') {
- print "Location: $root/browse/$base_format/$scheme/$lib/$id\n\n";
- return 302;
- }
-
- if ($type eq 'isbn') {
- my $rec = $supercat->request('open-ils.supercat.isbn.object.retrieve',$id)->gather(1);
- if (!@$rec) {
- print "Content-type: text/html; charset=utf-8\n\n";
- $apache->custom_response( 404, <<" HTML");
- <html>
- <head>
- <title>Type [$type] with id [$id] not found!</title>
- </head>
- <body>
- <br/>
- <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
- </body>
- </html>
- HTML
- return 404;
- }
- $id = $rec->[0]->id;
- $type = 'record';
- }
-
- if ( !grep
- { (keys(%$_))[0] eq $base_format }
- @{ $supercat->request("open-ils.supercat.$type.formats")->gather(1) }
- and !grep
- { $_ eq $base_format }
- qw/opac html htmlholdings marctxt ris holdings_xml/
- ) {
- print "Content-type: text/html; charset=utf-8\n\n";
- $apache->custom_response( 406, <<" HTML");
- <html>
- <head>
- <title>Invalid format [$format] for type [$type]!</title>
- </head>
- <body>
- <br/>
- <center>Sorry, format $format is not valid for type $type.</center>
- </body>
- </html>
- HTML
- return 406;
- }
-
- if ($format eq 'opac') {
- print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id&l=$lib_id&d=$lib_depth\n\n"
- if ($type eq 'metarecord');
- print "Location: $root/../../$locale/skin/$skin/xml/rdetail.xml?r=$id&l=$lib_id&d=$lib_depth\n\n"
- if ($type eq 'record');
- return 302;
- } elsif (OpenILS::WWW::SuperCat::Feed->exists($base_format) && ($type ne 'acn' && $type ne 'acp' && $type ne 'auri')) {
- my $feed = create_record_feed(
- $type,
- $format => [ $id ],
- $base,
- $lib,
- $depth,
- $flesh_feed,
+ if (!$lib || $lib eq '-') {
+ $lib = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => parent_ou => undef
+ )->gather(1)->[0]->shortname;
+ }
+
+ my ($lib_object,$lib_id,$ou_types,$lib_depth);
+ if ($type ne 'acn' && $type ne 'acp' && $type ne 'auri') {
+ $lib_object = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => shortname => $lib
+ )->gather(1)->[0];
+ $lib_id = $lib_object->id;
+
+ $ou_types = $actor->request( 'open-ils.actor.org_types.retrieve' )->gather(1);
+ $lib_depth = defined($depth) ? $depth : (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
+ }
+
+ if ($command eq 'browse') {
+ print "Location: $root/browse/$base_format/$scheme/$lib/$id\n\n";
+ return 302;
+ }
+
+ if ($type eq 'isbn') {
+ my $rec = $supercat->request('open-ils.supercat.isbn.object.retrieve',$id)->gather(1);
+ if (!@$rec) {
+ print "Content-type: text/html; charset=utf-8\n\n";
+ $apache->custom_response( 404, <<" HTML");
+ <html>
+ <head>
+ <title>Type [$type] with id [$id] not found!</title>
+ </head>
+ <body>
+ <br/>
+ <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
+ </body>
+ </html>
+ HTML
+ return 404;
+ }
+ $id = $rec->[0]->id;
+ $type = 'record';
+ }
+
+ if ( !grep
+ { (keys(%$_))[0] eq $base_format }
+ @{ $supercat->request("open-ils.supercat.$type.formats")->gather(1) }
+ and !grep
+ { $_ eq $base_format }
+ qw/opac html htmlholdings marctxt ris holdings_xml/
+ ) {
+ print "Content-type: text/html; charset=utf-8\n\n";
+ $apache->custom_response( 406, <<" HTML");
+ <html>
+ <head>
+ <title>Invalid format [$format] for type [$type]!</title>
+ </head>
+ <body>
+ <br/>
+ <center>Sorry, format $format is not valid for type $type.</center>
+ </body>
+ </html>
+ HTML
+ return 406;
+ }
+
+ if ($format eq 'opac') {
+ print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id&l=$lib_id&d=$lib_depth\n\n"
+ if ($type eq 'metarecord');
+ print "Location: $root/../../$locale/skin/$skin/xml/rdetail.xml?r=$id&l=$lib_id&d=$lib_depth\n\n"
+ if ($type eq 'record');
+ return 302;
+ } elsif (OpenILS::WWW::SuperCat::Feed->exists($base_format) && ($type ne 'acn' && $type ne 'acp' && $type ne 'auri')) {
+ my $feed = create_record_feed(
+ $type,
+ $format => [ $id ],
+ $base,
+ $lib,
+ $depth,
+ $flesh_feed,
$paging
- );
-
- if (!$feed->count) {
- print "Content-type: text/html; charset=utf-8\n\n";
- $apache->custom_response( 404, <<" HTML");
- <html>
- <head>
- <title>Type [$type] with id [$id] not found!</title>
- </head>
- <body>
- <br/>
- <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
- </body>
- </html>
- HTML
- return 404;
- }
-
- $feed->root($root);
- $feed->creator($host);
- $feed->update_ts();
- $feed->link( unapi => $base) if ($flesh_feed);
-
- print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
-
- return Apache2::Const::OK;
- }
-
- my $method = "open-ils.supercat.$type.$base_format.$command";
- my @params = ($id);
- push @params, $lib, $lib_depth, $flesh_feed, $paging if ($base_format eq 'holdings_xml');
-
- # for acn, acp, etc, the "lib" pathinfo position isn't useful.
- # however, we can have it carry extra options like no_record! (comma separated)
- push @params, { map { ( $_ => 1 ) } split(',', $lib) } if ( grep { $type eq $_} qw/acn acp auri/);
-
- my $req = $supercat->request($method,@params);
- my $data = $req->gather();
-
- if ($req->failed || !$data) {
- print "Content-type: text/html; charset=utf-8\n\n";
- $apache->custom_response( 404, <<" HTML");
- <html>
- <head>
- <title>$type $id not found!</title>
- </head>
- <body>
- <br/>
- <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
- </body>
- </html>
- HTML
- return 404;
- }
-
- print "Content-type: application/xml; charset=utf-8\n\n$data";
-
- if ($base_format eq 'holdings_xml') {
- while (my $c = $req->recv) {
- print $c->content;
- }
- }
-
- return Apache2::Const::OK;
+ );
+
+ if (!$feed->count) {
+ print "Content-type: text/html; charset=utf-8\n\n";
+ $apache->custom_response( 404, <<" HTML");
+ <html>
+ <head>
+ <title>Type [$type] with id [$id] not found!</title>
+ </head>
+ <body>
+ <br/>
+ <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
+ </body>
+ </html>
+ HTML
+ return 404;
+ }
+
+ $feed->root($root);
+ $feed->creator($host);
+ $feed->update_ts();
+ $feed->link( unapi => $base) if ($flesh_feed);
+
+ print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
+ print $U->entityize($feed->toString) . "\n";
+
+ return Apache2::Const::OK;
+ }
+
+ my $method = "open-ils.supercat.$type.$base_format.$command";
+ my @params = ($id);
+ push @params, $lib, $lib_depth, $flesh_feed, $paging if ($base_format eq 'holdings_xml');
+
+ # for acn, acp, etc, the "lib" pathinfo position isn't useful.
+ # however, we can have it carry extra options like no_record! (comma separated)
+ push @params, { map { ( $_ => 1 ) } split(',', $lib) } if ( grep { $type eq $_} qw/acn acp auri/);
+
+ my $req = $supercat->request($method,@params);
+ my $data = $req->gather();
+
+ if ($req->failed || !$data) {
+ print "Content-type: text/html; charset=utf-8\n\n";
+ $apache->custom_response( 404, <<" HTML");
+ <html>
+ <head>
+ <title>$type $id not found!</title>
+ </head>
+ <body>
+ <br/>
+ <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
+ </body>
+ </html>
+ HTML
+ return 404;
+ }
+
+ print "Content-type: application/xml; charset=utf-8\n\n$data";
+
+ if ($base_format eq 'holdings_xml') {
+ while (my $c = $req->recv) {
+ print $c->content;
+ }
+ }
+
+ return Apache2::Const::OK;
}
sub supercat {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
-
- my $cgi = new CGI;
-
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
-
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'supercat', $url)[0];
- my $base = (split 'supercat', $url)[0] . 'supercat';
- my $unapi = (split 'supercat', $url)[0] . 'unapi';
-
- my $host = $cgi->virtual_host || $cgi->server_name;
-
- my $path = $cgi->path_info;
- my ($id,$type,$format,$command) = reverse split '/', $path;
- my $flesh_feed = parse_feed_type($format);
- (my $base_format = $format) =~ s/(-full|-uris)$//o;
-
- my $skin = $cgi->param('skin') || 'default';
- my $locale = $cgi->param('locale') || 'en-US';
-
- # Enable localized results of copy status, etc
- $supercat->session_locale($locale);
-
- if ( $path =~ m{^/formats(?:/([^\/]+))?$}o ) {
- print "Content-type: application/xml; charset=utf-8\n";
- if ($1) {
- my $list = $supercat
- ->request("open-ils.supercat.$1.formats")
- ->gather(1);
-
- print "\n";
-
- print "<formats>
- <format>
- <name>opac</name>
- <type>text/html</type>
- </format>";
-
- if ($1 eq 'record' or $1 eq 'isbn') {
- print "<format>
- <name>htmlholdings</name>
- <type>text/html</type>
- </format>
- <format>
- <name>html</name>
- <type>text/html</type>
- </format>
- <format>
- <name>htmlholdings-full</name>
- <type>text/html</type>
- </format>
- <format>
- <name>html-full</name>
- <type>text/html</type>
- </format>
- <format>
- <name>marctxt</name>
- <type>text/plain</type>
- </format>
- <format>
- <name>ris</name>
- <type>text/plain</type>
- </format>";
- }
-
- for my $h (@$list) {
- my ($type) = keys %$h;
- print supercat_format($h, $type);
-
- if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
- print supercat_format($h, "$type-full");
- print supercat_format($h, "$type-uris");
- }
-
- }
-
- print "</formats>\n";
-
- return Apache2::Const::OK;
- }
-
- my $list = $supercat
- ->request("open-ils.supercat.record.formats")
- ->gather(1);
-
- push @$list,
- @{ $supercat
- ->request("open-ils.supercat.metarecord.formats")
- ->gather(1);
- };
-
- my %hash = map { ( (keys %$_)[0] => (values %$_)[0] ) } @$list;
- $list = [ map { { $_ => $hash{$_} } } sort keys %hash ];
-
- print "\n<formats>
- <format>
- <name>opac</name>
- <type>text/html</type>
- </format>
- <format>
- <name>htmlholdings</name>
- <type>text/html</type>
- </format>
- <format>
- <name>html</name>
- <type>text/html</type>
- </format>
- <format>
- <name>htmlholdings-full</name>
- <type>text/html</type>
- </format>
- <format>
- <name>html-full</name>
- <type>text/html</type>
- </format>
- <format>
- <name>marctxt</name>
- <type>text/plain</type>
- </format>
- <format>
- <name>ris</name>
- <type>text/plain</type>
- </format>";
-
- for my $h (@$list) {
- my ($type) = keys %$h;
- print supercat_format($h, $type);
-
- if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
- print supercat_format($h, "$type-full");
- print supercat_format($h, "$type-uris");
- }
-
- }
-
- print "</formats>\n";
-
-
- return Apache2::Const::OK;
- }
-
- if ($format eq 'opac') {
- print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id\n\n"
- if ($type eq 'metarecord');
- print "Location: $root/../../$locale/skin/$skin/xml/rdetail.xml?r=$id\n\n"
- if ($type eq 'record');
- return 302;
-
- } elsif ($base_format eq 'marc21') {
-
- my $ret = 200;
- try {
- my $bib = $supercat->request( "open-ils.supercat.record.object.retrieve", $id )->gather(1)->[0];
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
+
+ my $cgi = new CGI;
+
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
+
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'supercat', $url)[0];
+ my $base = (split 'supercat', $url)[0] . 'supercat';
+ my $unapi = (split 'supercat', $url)[0] . 'unapi';
+
+ my $host = $cgi->virtual_host || $cgi->server_name;
+
+ my $path = $cgi->path_info;
+ my ($id,$type,$format,$command) = reverse split '/', $path;
+ my $flesh_feed = parse_feed_type($format);
+ (my $base_format = $format) =~ s/(-full|-uris)$//o;
+
+ my $skin = $cgi->param('skin') || 'default';
+ my $locale = $cgi->param('locale') || 'en-US';
+
+ # Enable localized results of copy status, etc
+ $supercat->session_locale($locale);
+
+ if ( $path =~ m{^/formats(?:/([^\/]+))?$}o ) {
+ print "Content-type: application/xml; charset=utf-8\n";
+ if ($1) {
+ my $list = $supercat
+ ->request("open-ils.supercat.$1.formats")
+ ->gather(1);
+
+ print "\n";
+
+ print "<formats>
+ <format>
+ <name>opac</name>
+ <type>text/html</type>
+ </format>";
+
+ if ($1 eq 'record' or $1 eq 'isbn') {
+ print "<format>
+ <name>htmlholdings</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>html</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>htmlholdings-full</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>html-full</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>marctxt</name>
+ <type>text/plain</type>
+ </format>
+ <format>
+ <name>ris</name>
+ <type>text/plain</type>
+ </format>";
+ }
+
+ for my $h (@$list) {
+ my ($type) = keys %$h;
+ print supercat_format($h, $type);
+
+ if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
+ print supercat_format($h, "$type-full");
+ print supercat_format($h, "$type-uris");
+ }
+
+ }
+
+ print "</formats>\n";
+
+ return Apache2::Const::OK;
+ }
+
+ my $list = $supercat
+ ->request("open-ils.supercat.record.formats")
+ ->gather(1);
+
+ push @$list,
+ @{ $supercat
+ ->request("open-ils.supercat.metarecord.formats")
+ ->gather(1);
+ };
+
+ my %hash = map { ( (keys %$_)[0] => (values %$_)[0] ) } @$list;
+ $list = [ map { { $_ => $hash{$_} } } sort keys %hash ];
+
+ print "\n<formats>
+ <format>
+ <name>opac</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>htmlholdings</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>html</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>htmlholdings-full</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>html-full</name>
+ <type>text/html</type>
+ </format>
+ <format>
+ <name>marctxt</name>
+ <type>text/plain</type>
+ </format>
+ <format>
+ <name>ris</name>
+ <type>text/plain</type>
+ </format>";
+
+ for my $h (@$list) {
+ my ($type) = keys %$h;
+ print supercat_format($h, $type);
+
+ if (OpenILS::WWW::SuperCat::Feed->exists($type)) {
+ print supercat_format($h, "$type-full");
+ print supercat_format($h, "$type-uris");
+ }
+
+ }
+
+ print "</formats>\n";
+
+
+ return Apache2::Const::OK;
+ }
+
+ if ($format eq 'opac') {
+ print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id\n\n"
+ if ($type eq 'metarecord');
+ print "Location: $root/../../$locale/skin/$skin/xml/rdetail.xml?r=$id\n\n"
+ if ($type eq 'record');
+ return 302;
+
+ } elsif ($base_format eq 'marc21') {
+
+ my $ret = 200;
+ try {
+ my $bib = $supercat->request( "open-ils.supercat.record.object.retrieve", $id )->gather(1)->[0];
- print "Content-type: application/octet-stream\n\n" . MARC::Record->new_from_xml( $bib->marc, 'UTF-8', 'USMARC' )->as_usmarc;
-
- } otherwise {
- warn shift();
-
- print "Content-type: text/html; charset=utf-8\n\n";
- $apache->custom_response( 404, <<" HTML");
- <html>
- <head>
- <title>ERROR</title>
- </head>
- <body>
- <br/>
- <center>Couldn't fetch $id as MARC21.</center>
- </body>
- </html>
- HTML
- $ret = 404;
- };
-
- return Apache2::Const::OK;
-
- } elsif (OpenILS::WWW::SuperCat::Feed->exists($base_format)) {
- my $feed = create_record_feed(
- $type,
- $format => [ $id ],
- undef, undef, undef,
- $flesh_feed
- );
-
- $feed->root($root);
- $feed->creator($host);
-
- $feed->update_ts();
-
- $feed->link( unapi => $base) if ($flesh_feed);
-
- print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
-
- return Apache2::Const::OK;
- }
-
- my $req = $supercat->request("open-ils.supercat.$type.$format.$command",$id);
- $req->wait_complete;
-
- if ($req->failed) {
- print "Content-type: text/html; charset=utf-8\n\n";
- $apache->custom_response( 404, <<" HTML");
- <html>
- <head>
- <title>$type $id not found!</title>
- </head>
- <body>
- <br/>
- <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
- </body>
- </html>
- HTML
- return 404;
- }
-
- print "Content-type: application/xml; charset=utf-8\n\n";
- print $U->entityize( $parser->parse_string( $req->gather(1) )->documentElement->toString );
-
- return Apache2::Const::OK;
+ print "Content-type: application/octet-stream\n\n" . MARC::Record->new_from_xml( $bib->marc, 'UTF-8', 'USMARC' )->as_usmarc;
+
+ } otherwise {
+ warn shift();
+
+ print "Content-type: text/html; charset=utf-8\n\n";
+ $apache->custom_response( 404, <<" HTML");
+ <html>
+ <head>
+ <title>ERROR</title>
+ </head>
+ <body>
+ <br/>
+ <center>Couldn't fetch $id as MARC21.</center>
+ </body>
+ </html>
+ HTML
+ $ret = 404;
+ };
+
+ return Apache2::Const::OK;
+
+ } elsif (OpenILS::WWW::SuperCat::Feed->exists($base_format)) {
+ my $feed = create_record_feed(
+ $type,
+ $format => [ $id ],
+ undef, undef, undef,
+ $flesh_feed
+ );
+
+ $feed->root($root);
+ $feed->creator($host);
+
+ $feed->update_ts();
+
+ $feed->link( unapi => $base) if ($flesh_feed);
+
+ print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
+ print $U->entityize($feed->toString) . "\n";
+
+ return Apache2::Const::OK;
+ }
+
+ my $req = $supercat->request("open-ils.supercat.$type.$format.$command",$id);
+ $req->wait_complete;
+
+ if ($req->failed) {
+ print "Content-type: text/html; charset=utf-8\n\n";
+ $apache->custom_response( 404, <<" HTML");
+ <html>
+ <head>
+ <title>$type $id not found!</title>
+ </head>
+ <body>
+ <br/>
+ <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
+ </body>
+ </html>
+ HTML
+ return 404;
+ }
+
+ print "Content-type: application/xml; charset=utf-8\n\n";
+ print $U->entityize( $parser->parse_string( $req->gather(1) )->documentElement->toString );
+
+ return Apache2::Const::OK;
}
sub bookbag_feed {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
-
- my $cgi = new CGI;
-
- my $year = (gmtime())[5] + 1900;
- my $host = $cgi->virtual_host || $cgi->server_name;
-
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
-
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'feed', $url)[0] . '/';
- my $base = (split 'bookbag', $url)[0] . '/bookbag';
- my $unapi = (split 'feed', $url)[0] . '/unapi';
-
- my $skin = $cgi->param('skin') || 'default';
- my $locale = $cgi->param('locale') || 'en-US';
- my $org = $cgi->param('searchOrg');
-
- # Enable localized results of copy status, etc
- $supercat->session_locale($locale);
-
- my $org_unit = get_ou($org);
- my $scope = "l=" . $org_unit->[0]->id . "&";
-
- $root =~ s{(?<!http:)//}{/}go;
- $base =~ s{(?<!http:)//}{/}go;
- $unapi =~ s{(?<!http:)//}{/}go;
-
- my $path = $cgi->path_info;
- #warn "URL breakdown: $url -> $root -> $base -> $path -> $unapi";
-
- my ($id,$type) = reverse split '/', $path;
- my $flesh_feed = parse_feed_type($type);
-
- my $bucket = $actor->request("open-ils.actor.container.public.flesh", 'biblio', $id)->gather(1);
- return Apache2::Const::NOT_FOUND unless($bucket);
-
- my $bucket_tag = "tag:$host,$year:record_bucket/$id";
- if ($type eq 'opac') {
- print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
- join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) .
- "\n\n";
- return 302;
- }
-
- my $feed = create_record_feed(
- 'record',
- $type,
- [ map { $_->target_biblio_record_entry } @{ $bucket->items } ],
- $unapi,
- $org_unit->[0]->shortname,
- undef,
- $flesh_feed
- );
- $feed->root($root);
- $feed->id($bucket_tag);
-
- $feed->title("Items in Book Bag [".$bucket->name."]");
- $feed->creator($host);
- $feed->update_ts();
-
- $feed->link(alternate => $base . "/rss2-full/$id" => 'application/rss+xml');
- $feed->link(atom => $base . "/atom-full/$id" => 'application/atom+xml');
- $feed->link(html => $base . "/html-full/$id" => 'text/html');
- $feed->link(unapi => $unapi);
-
- $feed->link(
- OPAC =>
- "http://$host/opac/$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
- join('&', map { 'rl=' . $_->target_biblio_record_entry } @{$bucket->items} ),
- 'text/html'
- );
-
-
- print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
-
- return Apache2::Const::OK;
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
+
+ my $cgi = new CGI;
+
+ my $year = (gmtime())[5] + 1900;
+ my $host = $cgi->virtual_host || $cgi->server_name;
+
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
+
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'feed', $url)[0] . '/';
+ my $base = (split 'bookbag', $url)[0] . '/bookbag';
+ my $unapi = (split 'feed', $url)[0] . '/unapi';
+
+ my $skin = $cgi->param('skin') || 'default';
+ my $locale = $cgi->param('locale') || 'en-US';
+ my $org = $cgi->param('searchOrg');
+
+ # Enable localized results of copy status, etc
+ $supercat->session_locale($locale);
+
+ my $org_unit = get_ou($org);
+ my $scope = "l=" . $org_unit->[0]->id . "&";
+
+ $root =~ s{(?<!http:)//}{/}go;
+ $base =~ s{(?<!http:)//}{/}go;
+ $unapi =~ s{(?<!http:)//}{/}go;
+
+ my $path = $cgi->path_info;
+ #warn "URL breakdown: $url -> $root -> $base -> $path -> $unapi";
+
+ my ($id,$type) = reverse split '/', $path;
+ my $flesh_feed = parse_feed_type($type);
+
+ my $bucket = $actor->request("open-ils.actor.container.public.flesh", 'biblio', $id)->gather(1);
+ return Apache2::Const::NOT_FOUND unless($bucket);
+
+ my $bucket_tag = "tag:$host,$year:record_bucket/$id";
+ if ($type eq 'opac') {
+ print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
+ join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) .
+ "\n\n";
+ return 302;
+ }
+
+ my $feed = create_record_feed(
+ 'record',
+ $type,
+ [ map { $_->target_biblio_record_entry } @{ $bucket->items } ],
+ $unapi,
+ $org_unit->[0]->shortname,
+ undef,
+ $flesh_feed
+ );
+ $feed->root($root);
+ $feed->id($bucket_tag);
+
+ $feed->title("Items in Book Bag [".$bucket->name."]");
+ $feed->creator($host);
+ $feed->update_ts();
+
+ $feed->link(alternate => $base . "/rss2-full/$id" => 'application/rss+xml');
+ $feed->link(atom => $base . "/atom-full/$id" => 'application/atom+xml');
+ $feed->link(html => $base . "/html-full/$id" => 'text/html');
+ $feed->link(unapi => $unapi);
+
+ $feed->link(
+ OPAC =>
+ "http://$host/opac/$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
+ join('&', map { 'rl=' . $_->target_biblio_record_entry } @{$bucket->items} ),
+ 'text/html'
+ );
+
+
+ print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
+ print $U->entityize($feed->toString) . "\n";
+
+ return Apache2::Const::OK;
}
sub changes_feed {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
- my $cgi = new CGI;
+ my $cgi = new CGI;
- my $year = (gmtime())[5] + 1900;
- my $host = $cgi->virtual_host || $cgi->server_name;
+ my $year = (gmtime())[5] + 1900;
+ my $host = $cgi->virtual_host || $cgi->server_name;
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'feed', $url)[0];
- my $base = (split 'freshmeat', $url)[0] . '/freshmeat';
- my $unapi = (split 'feed', $url)[0] . 'unapi';
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'feed', $url)[0];
+ my $base = (split 'freshmeat', $url)[0] . '/freshmeat';
+ my $unapi = (split 'feed', $url)[0] . 'unapi';
- my $skin = $cgi->param('skin') || 'default';
- my $locale = $cgi->param('locale') || 'en-US';
- my $org = $cgi->param('searchOrg');
+ my $skin = $cgi->param('skin') || 'default';
+ my $locale = $cgi->param('locale') || 'en-US';
+ my $org = $cgi->param('searchOrg');
- # Enable localized results of copy status, etc
- $supercat->session_locale($locale);
+ # Enable localized results of copy status, etc
+ $supercat->session_locale($locale);
- my $org_unit = get_ou($org);
- my $scope = "l=" . $org_unit->[0]->id . "&";
+ my $org_unit = get_ou($org);
+ my $scope = "l=" . $org_unit->[0]->id . "&";
- my $path = $cgi->path_info;
- #warn "URL breakdown: $url ($rel_name) -> $root -> $base -> $path -> $unapi";
+ my $path = $cgi->path_info;
+ #warn "URL breakdown: $url ($rel_name) -> $root -> $base -> $path -> $unapi";
- $path =~ s/^\/(?:feed\/)?freshmeat\///og;
-
- my ($type,$rtype,$axis,$limit,$date) = split '/', $path;
- my $flesh_feed = parse_feed_type($type);
+ $path =~ s/^\/(?:feed\/)?freshmeat\///og;
+
+ my ($type,$rtype,$axis,$limit,$date) = split '/', $path;
+ my $flesh_feed = parse_feed_type($type);
- $limit ||= 10;
- $limit = 10 if $limit !~ /^\d+$/;
+ $limit ||= 10;
+ $limit = 10 if $limit !~ /^\d+$/;
- my $list = $supercat->request("open-ils.supercat.$rtype.record.$axis.recent", $date, $limit)->gather(1);
+ my $list = $supercat->request("open-ils.supercat.$rtype.record.$axis.recent", $date, $limit)->gather(1);
- #if ($type eq 'opac') {
- # print "Location: $root/../../en-US/skin/default/xml/rresult.xml?rt=list&" .
- # join('&', map { "rl=" . $_ } @$list) .
- # "\n\n";
- # return 302;
- #}
+ #if ($type eq 'opac') {
+ # print "Location: $root/../../en-US/skin/default/xml/rresult.xml?rt=list&" .
+ # join('&', map { "rl=" . $_ } @$list) .
+ # "\n\n";
+ # return 302;
+ #}
- my $search = 'record';
- if ($rtype eq 'authority') {
- $search = 'authority';
- }
- my $feed = create_record_feed( $search, $type, $list, $unapi, $org_unit->[0]->shortname, undef, $flesh_feed);
- $feed->root($root);
+ my $search = 'record';
+ if ($rtype eq 'authority') {
+ $search = 'authority';
+ }
+ my $feed = create_record_feed( $search, $type, $list, $unapi, $org_unit->[0]->shortname, undef, $flesh_feed);
+ $feed->root($root);
- if ($date) {
- $feed->title("Up to $limit recent $rtype ${axis}s from $date forward");
- } else {
- $feed->title("$limit most recent $rtype ${axis}s");
- }
+ if ($date) {
+ $feed->title("Up to $limit recent $rtype ${axis}s from $date forward");
+ } else {
+ $feed->title("$limit most recent $rtype ${axis}s");
+ }
- $feed->creator($host);
- $feed->update_ts();
+ $feed->creator($host);
+ $feed->update_ts();
- $feed->link(alternate => $base . "/rss2-full/$rtype/$axis/$limit/$date" => 'application/rss+xml');
- $feed->link(atom => $base . "/atom-full/$rtype/$axis/$limit/$date" => 'application/atom+xml');
- $feed->link(html => $base . "/html-full/$rtype/$axis/$limit/$date" => 'text/html');
- $feed->link(unapi => $unapi);
+ $feed->link(alternate => $base . "/rss2-full/$rtype/$axis/$limit/$date" => 'application/rss+xml');
+ $feed->link(atom => $base . "/atom-full/$rtype/$axis/$limit/$date" => 'application/atom+xml');
+ $feed->link(html => $base . "/html-full/$rtype/$axis/$limit/$date" => 'text/html');
+ $feed->link(unapi => $unapi);
- $feed->link(
- OPAC =>
- "http://$host/opac/$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
- join('&', map { 'rl=' . $_} @$list ),
- 'text/html'
- );
+ $feed->link(
+ OPAC =>
+ "http://$host/opac/$locale/skin/$skin/xml/rresult.xml?$scope" . "rt=list&" .
+ join('&', map { 'rl=' . $_} @$list ),
+ 'text/html'
+ );
- print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
- print $U->entityize($feed->toString) . "\n";
+ print "Content-type: ". $feed->type ."; charset=utf-8\n\n";
+ print $U->entityize($feed->toString) . "\n";
- return Apache2::Const::OK;
+ return Apache2::Const::OK;
}
sub opensearch_osd {
- my $version = shift;
- my $lib = shift;
- my $class = shift;
- my $base = shift;
+ my $version = shift;
+ my $lib = shift;
+ my $class = shift;
+ my $base = shift;
- if ($version eq '1.0') {
- print <<OSD;
+ if ($version eq '1.0') {
+ print <<OSD;
Content-type: application/opensearchdescription+xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<AdultContent>false</AdultContent>
</OpenSearchDescription>
OSD
- } else {
- print <<OSD;
+ } else {
+ print <<OSD;
Content-type: application/opensearchdescription+xml; charset=utf-8
<?xml version="1.0" encoding="UTF-8"?>
<InputEncoding>UTF-8</InputEncoding>
</OpenSearchDescription>
OSD
- }
+ }
- return Apache2::Const::OK;
+ return Apache2::Const::OK;
}
sub opensearch_feed {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
-
- my $cgi = new CGI;
- my $year = (gmtime())[5] + 1900;
-
- my $host = $cgi->virtual_host || $cgi->server_name;
-
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'opensearch', $url)[0];
- my $base = (split 'opensearch', $url)[0] . 'opensearch';
- my $unapi = (split 'opensearch', $url)[0] . 'unapi';
+ my $cgi = new CGI;
+ my $year = (gmtime())[5] + 1900;
- my $path = $cgi->path_info;
- #warn "URL breakdown: $url ($rel_name) -> $root -> $base -> $path -> $unapi";
-
- if ($path =~ m{^/?(1\.\d{1})/(?:([^/]+)/)?([^/]+)/osd.xml}o) {
-
- my $version = $1;
- my $lib = uc($2);
- my $class = $3;
-
- if (!$lib || $lib eq '-') {
- $lib = $actor->request(
- 'open-ils.actor.org_unit_list.search' => parent_ou => undef
- )->gather(1)->[0]->shortname;
- }
-
- if ($class eq '-') {
- $class = 'keyword';
- }
-
- return opensearch_osd($version, $lib, $class, $base);
- }
-
-
- my $page = $cgi->param('startPage') || 1;
- my $offset = $cgi->param('startIndex') || 1;
- my $limit = $cgi->param('count') || 10;
-
- $page = 1 if ($page !~ /^\d+$/);
- $offset = 1 if ($offset !~ /^\d+$/);
- $limit = 10 if ($limit !~ /^\d+$/); $limit = 25 if ($limit > 25);
-
- if ($page > 1) {
- $offset = ($page - 1) * $limit;
- } else {
- $offset -= 1;
- }
-
- my ($version,$org,$type,$class,$terms,$sort,$sortdir,$lang) = ('','','','','','','','');
- (undef,$version,$org,$type,$class,$terms,$sort,$sortdir,$lang) = split '/', $path;
-
- $lang = $cgi->param('searchLang') if $cgi->param('searchLang');
- $lang = '' if ($lang eq '*');
-
- $sort = $cgi->param('searchSort') if $cgi->param('searchSort');
- $sort ||= '';
- $sortdir = $cgi->param('searchSortDir') if $cgi->param('searchSortDir');
- $sortdir ||= '';
-
- $terms .= " " if ($terms && $cgi->param('searchTerms'));
- $terms .= $cgi->param('searchTerms') if $cgi->param('searchTerms');
-
- $class = $cgi->param('searchClass') if $cgi->param('searchClass');
- $class ||= '-';
-
- $type = $cgi->param('responseType') if $cgi->param('responseType');
- $type ||= '-';
-
- $org = $cgi->param('searchOrg') if $cgi->param('searchOrg');
- $org ||= '-';
-
-
- my $kwt = $cgi->param('kw');
- my $tit = $cgi->param('ti');
- my $aut = $cgi->param('au');
- my $sut = $cgi->param('su');
- my $set = $cgi->param('se');
-
- $terms .= " " if ($terms && $kwt);
- $terms .= "keyword: $kwt" if ($kwt);
- $terms .= " " if ($terms && $tit);
- $terms .= "title: $tit" if ($tit);
- $terms .= " " if ($terms && $aut);
- $terms .= "author: $aut" if ($aut);
- $terms .= " " if ($terms && $sut);
- $terms .= "subject: $sut" if ($sut);
- $terms .= " " if ($terms && $set);
- $terms .= "series: $set" if ($set);
-
- if ($version eq '1.0') {
- $type = 'rss2';
- } elsif ($type eq '-') {
- $type = 'atom';
- }
- my $flesh_feed = parse_feed_type($type);
-
- $terms = decode_utf8($terms);
- $lang = 'eng' if ($lang eq 'en-US');
-
- $log->debug("OpenSearch terms: $terms");
-
- my $org_unit = get_ou($org);
-
- # Apostrophes break search and get indexed as spaces anyway
- my $safe_terms = $terms;
- $safe_terms =~ s{'}{ }go;
-
- my $recs = $search->request(
- 'open-ils.search.biblio.multiclass.query' => {
- org_unit => $org_unit->[0]->id,
- offset => $offset,
- limit => $limit,
- sort => $sort,
- sort_dir => $sortdir,
+ my $host = $cgi->virtual_host || $cgi->server_name;
+
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
+
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'opensearch', $url)[0];
+ my $base = (split 'opensearch', $url)[0] . 'opensearch';
+ my $unapi = (split 'opensearch', $url)[0] . 'unapi';
+
+ my $path = $cgi->path_info;
+ #warn "URL breakdown: $url ($rel_name) -> $root -> $base -> $path -> $unapi";
+
+ if ($path =~ m{^/?(1\.\d{1})/(?:([^/]+)/)?([^/]+)/osd.xml}o) {
+
+ my $version = $1;
+ my $lib = uc($2);
+ my $class = $3;
+
+ if (!$lib || $lib eq '-') {
+ $lib = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => parent_ou => undef
+ )->gather(1)->[0]->shortname;
+ }
+
+ if ($class eq '-') {
+ $class = 'keyword';
+ }
+
+ return opensearch_osd($version, $lib, $class, $base);
+ }
+
+
+ my $page = $cgi->param('startPage') || 1;
+ my $offset = $cgi->param('startIndex') || 1;
+ my $limit = $cgi->param('count') || 10;
+
+ $page = 1 if ($page !~ /^\d+$/);
+ $offset = 1 if ($offset !~ /^\d+$/);
+ $limit = 10 if ($limit !~ /^\d+$/); $limit = 25 if ($limit > 25);
+
+ if ($page > 1) {
+ $offset = ($page - 1) * $limit;
+ } else {
+ $offset -= 1;
+ }
+
+ my ($version,$org,$type,$class,$terms,$sort,$sortdir,$lang) = ('','','','','','','','');
+ (undef,$version,$org,$type,$class,$terms,$sort,$sortdir,$lang) = split '/', $path;
+
+ $lang = $cgi->param('searchLang') if $cgi->param('searchLang');
+ $lang = '' if ($lang eq '*');
+
+ $sort = $cgi->param('searchSort') if $cgi->param('searchSort');
+ $sort ||= '';
+ $sortdir = $cgi->param('searchSortDir') if $cgi->param('searchSortDir');
+ $sortdir ||= '';
+
+ $terms .= " " if ($terms && $cgi->param('searchTerms'));
+ $terms .= $cgi->param('searchTerms') if $cgi->param('searchTerms');
+
+ $class = $cgi->param('searchClass') if $cgi->param('searchClass');
+ $class ||= '-';
+
+ $type = $cgi->param('responseType') if $cgi->param('responseType');
+ $type ||= '-';
+
+ $org = $cgi->param('searchOrg') if $cgi->param('searchOrg');
+ $org ||= '-';
+
+
+ my $kwt = $cgi->param('kw');
+ my $tit = $cgi->param('ti');
+ my $aut = $cgi->param('au');
+ my $sut = $cgi->param('su');
+ my $set = $cgi->param('se');
+
+ $terms .= " " if ($terms && $kwt);
+ $terms .= "keyword: $kwt" if ($kwt);
+ $terms .= " " if ($terms && $tit);
+ $terms .= "title: $tit" if ($tit);
+ $terms .= " " if ($terms && $aut);
+ $terms .= "author: $aut" if ($aut);
+ $terms .= " " if ($terms && $sut);
+ $terms .= "subject: $sut" if ($sut);
+ $terms .= " " if ($terms && $set);
+ $terms .= "series: $set" if ($set);
+
+ if ($version eq '1.0') {
+ $type = 'rss2';
+ } elsif ($type eq '-') {
+ $type = 'atom';
+ }
+ my $flesh_feed = parse_feed_type($type);
+
+ $terms = decode_utf8($terms);
+ $lang = 'eng' if ($lang eq 'en-US');
+
+ $log->debug("OpenSearch terms: $terms");
+
+ my $org_unit = get_ou($org);
+
+ # Apostrophes break search and get indexed as spaces anyway
+ my $safe_terms = $terms;
+ $safe_terms =~ s{'}{ }go;
+
+ my $recs = $search->request(
+ 'open-ils.search.biblio.multiclass.query' => {
+ org_unit => $org_unit->[0]->id,
+ offset => $offset,
+ limit => $limit,
+ sort => $sort,
+ sort_dir => $sortdir,
default_class => $class,
- ($lang ? ( 'language' => $lang ) : ()),
- } => $safe_terms => 1
- )->gather(1);
-
- $log->debug("Hits for [$terms]: $recs->{count}");
-
- my $feed = create_record_feed(
- 'record',
- $type,
- [ map { $_->[0] } @{$recs->{ids}} ],
- $unapi,
- $org,
- undef,
- $flesh_feed
- );
-
- $log->debug("Feed created...");
-
- $feed->root($root);
- $feed->lib($org);
- $feed->search($safe_terms);
- $feed->class($class);
-
- $feed->title("Search results for [$terms] at ".$org_unit->[0]->name);
-
- $feed->creator($host);
- $feed->update_ts();
-
- $feed->_create_node(
- $feed->{item_xpath},
- 'http://a9.com/-/spec/opensearch/1.1/',
- 'totalResults',
- $recs->{count},
- );
-
- $feed->_create_node(
- $feed->{item_xpath},
- 'http://a9.com/-/spec/opensearch/1.1/',
- 'startIndex',
- $offset + 1,
- );
-
- $feed->_create_node(
- $feed->{item_xpath},
- 'http://a9.com/-/spec/opensearch/1.1/',
- 'itemsPerPage',
- $limit,
- );
-
- $log->debug("...basic feed data added...");
-
- $feed->link(
- next =>
- $base . "/$version/$org/$type/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang&startIndex=" . int($offset + $limit + 1) . "&count=" . $limit =>
- 'application/opensearch+xml'
- ) if ($offset + $limit < $recs->{count});
-
- $feed->link(
- previous =>
- $base . "/$version/$org/$type/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang&startIndex=" . int(($offset - $limit) + 1) . "&count=" . $limit =>
- 'application/opensearch+xml'
- ) if ($offset);
-
- $feed->link(
- self =>
- $base . "/$version/$org/$type/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
- 'application/opensearch+xml'
- );
-
- $feed->link(
- alternate =>
- $base . "/$version/$org/rss2-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
- 'application/rss+xml'
- );
-
- $feed->link(
- atom =>
- $base . "/$version/$org/atom-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
- 'application/atom+xml'
- );
-
- $feed->link(
- 'html' =>
- $base . "/$version/$org/html/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
- 'text/html'
- );
-
- $feed->link(
- 'html-full' =>
- $base . "/$version/$org/html-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
- 'text/html'
- );
-
- $feed->link( 'unapi-server' => $unapi);
-
- $log->debug("...feed links added...");
-
-# $feed->link(
-# opac =>
-# $root . "../$lang/skin/default/xml/rresult.xml?rt=list&" .
-# join('&', map { 'rl=' . $_->[0] } grep { ref $_ && defined $_->[0] } @{$recs->{ids}} ),
-# 'text/html'
-# );
-
- #print $cgi->header( -type => $feed->type, -charset => 'UTF-8') . entityize($feed->toString) . "\n";
- print $cgi->header( -type => $feed->type, -charset => 'UTF-8') . $feed->toString . "\n";
-
- $log->debug("...and feed returned.");
-
- return Apache2::Const::OK;
+ ($lang ? ( 'language' => $lang ) : ()),
+ } => $safe_terms => 1
+ )->gather(1);
+
+ $log->debug("Hits for [$terms]: $recs->{count}");
+
+ my $feed = create_record_feed(
+ 'record',
+ $type,
+ [ map { $_->[0] } @{$recs->{ids}} ],
+ $unapi,
+ $org,
+ undef,
+ $flesh_feed
+ );
+
+ $log->debug("Feed created...");
+
+ $feed->root($root);
+ $feed->lib($org);
+ $feed->search($safe_terms);
+ $feed->class($class);
+
+ $feed->title("Search results for [$terms] at ".$org_unit->[0]->name);
+
+ $feed->creator($host);
+ $feed->update_ts();
+
+ $feed->_create_node(
+ $feed->{item_xpath},
+ 'http://a9.com/-/spec/opensearch/1.1/',
+ 'totalResults',
+ $recs->{count},
+ );
+
+ $feed->_create_node(
+ $feed->{item_xpath},
+ 'http://a9.com/-/spec/opensearch/1.1/',
+ 'startIndex',
+ $offset + 1,
+ );
+
+ $feed->_create_node(
+ $feed->{item_xpath},
+ 'http://a9.com/-/spec/opensearch/1.1/',
+ 'itemsPerPage',
+ $limit,
+ );
+
+ $log->debug("...basic feed data added...");
+
+ $feed->link(
+ next =>
+ $base . "/$version/$org/$type/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang&startIndex=" . int($offset + $limit + 1) . "&count=" . $limit =>
+ 'application/opensearch+xml'
+ ) if ($offset + $limit < $recs->{count});
+
+ $feed->link(
+ previous =>
+ $base . "/$version/$org/$type/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang&startIndex=" . int(($offset - $limit) + 1) . "&count=" . $limit =>
+ 'application/opensearch+xml'
+ ) if ($offset);
+
+ $feed->link(
+ self =>
+ $base . "/$version/$org/$type/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
+ 'application/opensearch+xml'
+ );
+
+ $feed->link(
+ alternate =>
+ $base . "/$version/$org/rss2-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
+ 'application/rss+xml'
+ );
+
+ $feed->link(
+ atom =>
+ $base . "/$version/$org/atom-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
+ 'application/atom+xml'
+ );
+
+ $feed->link(
+ 'html' =>
+ $base . "/$version/$org/html/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
+ 'text/html'
+ );
+
+ $feed->link(
+ 'html-full' =>
+ $base . "/$version/$org/html-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" =>
+ 'text/html'
+ );
+
+ $feed->link( 'unapi-server' => $unapi);
+
+ $log->debug("...feed links added...");
+
+# $feed->link(
+# opac =>
+# $root . "../$lang/skin/default/xml/rresult.xml?rt=list&" .
+# join('&', map { 'rl=' . $_->[0] } grep { ref $_ && defined $_->[0] } @{$recs->{ids}} ),
+# 'text/html'
+# );
+
+ #print $cgi->header( -type => $feed->type, -charset => 'UTF-8') . entityize($feed->toString) . "\n";
+ print $cgi->header( -type => $feed->type, -charset => 'UTF-8') . $feed->toString . "\n";
+
+ $log->debug("...and feed returned.");
+
+ return Apache2::Const::OK;
}
sub create_record_feed {
- my $search = shift;
- my $type = shift;
- my $records = shift;
- my $unapi = shift;
+ my $search = shift;
+ my $type = shift;
+ my $records = shift;
+ my $unapi = shift;
- my $lib = uc(shift()) || '-';
- my $depth = shift;
- my $flesh = shift;
+ my $lib = uc(shift()) || '-';
+ my $depth = shift;
+ my $flesh = shift;
- my $paging = shift;
+ my $paging = shift;
- my $cgi = new CGI;
- my $base = $cgi->url;
- my $host = $cgi->virtual_host || $cgi->server_name;
+ my $cgi = new CGI;
+ my $base = $cgi->url;
+ my $host = $cgi->virtual_host || $cgi->server_name;
my ($year,$month,$day) = reverse( (localtime)[3,4,5] );
$year += 1900;
my $tag_prefix = sprintf("tag:open-ils.org,$year-\%0.2d-\%0.2d", $month, $day);
- my $flesh_feed = defined($flesh) ? $flesh : parse_feed_type($type);
+ my $flesh_feed = defined($flesh) ? $flesh : parse_feed_type($type);
- $type =~ s/(-full|-uris)$//o;
+ $type =~ s/(-full|-uris)$//o;
- my $feed = new OpenILS::WWW::SuperCat::Feed ($type);
- $feed->base($base) if ($flesh);
- $feed->unapi($unapi) if ($flesh);
+ my $feed = new OpenILS::WWW::SuperCat::Feed ($type);
+ $feed->base($base) if ($flesh);
+ $feed->unapi($unapi) if ($flesh);
- $type = 'atom' if ($type eq 'html');
- $type = 'marcxml' if (($type eq 'htmlholdings') || ($type eq 'marctxt') || ($type eq 'ris'));
+ $type = 'atom' if ($type eq 'html');
+ $type = 'marcxml' if (($type eq 'htmlholdings') || ($type eq 'marctxt') || ($type eq 'ris'));
- #$records = $supercat->request( "open-ils.supercat.record.object.retrieve", $records )->gather(1);
+ #$records = $supercat->request( "open-ils.supercat.record.object.retrieve", $records )->gather(1);
- my $count = 0;
- for my $record (@$records) {
- next unless($record);
+ my $count = 0;
+ for my $record (@$records) {
+ next unless($record);
- #my $rec = $record->id;
- my $rec = $record;
+ #my $rec = $record->id;
+ my $rec = $record;
- my $item_tag = "$tag_prefix:biblio-record_entry/$rec/$lib";
- $item_tag = "$tag_prefix:metabib-metarecord/$rec/$lib" if ($search eq 'metarecord');
- $item_tag = "$tag_prefix:isbn/$rec/$lib" if ($search eq 'isbn');
- $item_tag .= "/$depth" if (defined($depth));
+ my $item_tag = "$tag_prefix:biblio-record_entry/$rec/$lib";
+ $item_tag = "$tag_prefix:metabib-metarecord/$rec/$lib" if ($search eq 'metarecord');
+ $item_tag = "$tag_prefix:isbn/$rec/$lib" if ($search eq 'isbn');
+ $item_tag .= "/$depth" if (defined($depth));
- $item_tag = "$tag_prefix:authority-record_entry/$rec" if ($search eq 'authority');
+ $item_tag = "$tag_prefix:authority-record_entry/$rec" if ($search eq 'authority');
- my $xml = $supercat->request(
- "open-ils.supercat.$search.$type.retrieve",
- $rec
- )->gather(1);
- next unless $xml;
+ my $xml = $supercat->request(
+ "open-ils.supercat.$search.$type.retrieve",
+ $rec
+ )->gather(1);
+ next unless $xml;
- my $node = $feed->add_item($xml);
- next unless $node;
+ my $node = $feed->add_item($xml);
+ next unless $node;
- $xml = '';
- if ($lib && ($type eq 'marcxml' || $type eq 'atom') && $flesh > 0) {
- my $r = $supercat->request( "open-ils.supercat.$search.holdings_xml.retrieve", $rec, $lib, $depth, $flesh_feed, $paging );
- while ( !$r->complete ) {
- $xml .= join('', map {$_->content} $r->recv);
- }
- $xml .= join('', map {$_->content} $r->recv);
- $node->add_holdings($xml);
- }
+ $xml = '';
+ if ($lib && ($type eq 'marcxml' || $type eq 'atom') && $flesh > 0) {
+ my $r = $supercat->request( "open-ils.supercat.$search.holdings_xml.retrieve", $rec, $lib, $depth, $flesh_feed, $paging );
+ while ( !$r->complete ) {
+ $xml .= join('', map {$_->content} $r->recv);
+ }
+ $xml .= join('', map {$_->content} $r->recv);
+ $node->add_holdings($xml);
+ }
- $node->id($item_tag);
- #$node->update_ts(cleanse_ISO8601($record->edit_date));
- $node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh > 0);
- $node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh > 0);
- $node->link(unapi => $feed->unapi . "?id=$item_tag") if ($flesh);
- $node->link('unapi-id' => $item_tag) if ($flesh);
- }
+ $node->id($item_tag);
+ #$node->update_ts(cleanse_ISO8601($record->edit_date));
+ $node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh > 0);
+ $node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh > 0);
+ $node->link(unapi => $feed->unapi . "?id=$item_tag") if ($flesh);
+ $node->link('unapi-id' => $item_tag) if ($flesh);
+ }
- return $feed;
+ return $feed;
}
sub string_browse {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
- my $cgi = new CGI;
- my $year = (gmtime())[5] + 1900;
+ my $cgi = new CGI;
+ my $year = (gmtime())[5] + 1900;
- my $host = $cgi->virtual_host || $cgi->server_name;
+ my $host = $cgi->virtual_host || $cgi->server_name;
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'browse', $url)[0];
- my $base = (split 'browse', $url)[0] . 'browse';
- my $unapi = (split 'browse', $url)[0] . 'unapi';
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'browse', $url)[0];
+ my $base = (split 'browse', $url)[0] . 'browse';
+ my $unapi = (split 'browse', $url)[0] . 'unapi';
- my $path = $cgi->path_info;
- $path =~ s/^\///og;
+ my $path = $cgi->path_info;
+ $path =~ s/^\///og;
- my ($format,$axis,$site,$string,$page,$page_size) = split '/', $path;
- #warn " >>> $format -> $axis -> $site -> $string -> $page -> $page_size ";
+ my ($format,$axis,$site,$string,$page,$page_size) = split '/', $path;
+ #warn " >>> $format -> $axis -> $site -> $string -> $page -> $page_size ";
return item_age_browse($apache) if ($axis eq 'item-age'); # short-circut to the item-age sub
- my $status = [$cgi->param('status')];
- my $cpLoc = [$cgi->param('copyLocation')];
- $site ||= $cgi->param('searchOrg');
- $page ||= $cgi->param('startPage') || 0;
- $page_size ||= $cgi->param('count') || 9;
-
- $page = 0 if ($page !~ /^-?\d+$/);
- $page_size = 9 if $page_size !~ /^\d+$/;
-
- my $prev = join('/', $base,$format,$axis,$site,$string,$page - 1,$page_size);
- my $next = join('/', $base,$format,$axis,$site,$string,$page + 1,$page_size);
-
- unless ($string and $axis and grep { $axis eq $_ } keys %browse_types) {
- warn "something's wrong...";
- warn " >>> format: $format -> axis: $axis -> site: $site -> string: $string -> page: $page -> page_size: $page_size ";
- return undef;
- }
-
- $string = decode_utf8($string);
- $string =~ s/\+/ /go;
- $string =~ s/'//go;
-
- my $tree = $supercat->request(
- "open-ils.supercat.$axis.browse",
- $string,
- (($axis =~ /^authority/) ? () : ($site)),
- $page_size,
- $page,
- $status,
- $cpLoc
- )->gather(1);
+ my $status = [$cgi->param('status')];
+ my $cpLoc = [$cgi->param('copyLocation')];
+ $site ||= $cgi->param('searchOrg');
+ $page ||= $cgi->param('startPage') || 0;
+ $page_size ||= $cgi->param('count') || 9;
+
+ $page = 0 if ($page !~ /^-?\d+$/);
+ $page_size = 9 if $page_size !~ /^\d+$/;
+
+ my $prev = join('/', $base,$format,$axis,$site,$string,$page - 1,$page_size);
+ my $next = join('/', $base,$format,$axis,$site,$string,$page + 1,$page_size);
+
+ unless ($string and $axis and grep { $axis eq $_ } keys %browse_types) {
+ warn "something's wrong...";
+ warn " >>> format: $format -> axis: $axis -> site: $site -> string: $string -> page: $page -> page_size: $page_size ";
+ return undef;
+ }
+
+ $string = decode_utf8($string);
+ $string =~ s/\+/ /go;
+ $string =~ s/'//go;
+
+ my $tree = $supercat->request(
+ "open-ils.supercat.$axis.browse",
+ $string,
+ (($axis =~ /^authority/) ? () : ($site)),
+ $page_size,
+ $page,
+ $status,
+ $cpLoc
+ )->gather(1);
(my $norm_format = $format) =~ s/(-full|-uris)$//o;
- my ($header,$content) = $browse_types{$axis}{$norm_format}->($tree,$prev,$next,$format,$unapi,$base,$site);
- print $header.$content;
- return Apache2::Const::OK;
+ my ($header,$content) = $browse_types{$axis}{$norm_format}->($tree,$prev,$next,$format,$unapi,$base,$site);
+ print $header.$content;
+ return Apache2::Const::OK;
}
sub string_startwith {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
-
- my $cgi = new CGI;
- my $year = (gmtime())[5] + 1900;
-
- my $host = $cgi->virtual_host || $cgi->server_name;
-
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
-
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'startwith', $url)[0];
- my $base = (split 'startwith', $url)[0] . 'startwith';
- my $unapi = (split 'startwith', $url)[0] . 'unapi';
-
- my $path = $cgi->path_info;
- $path =~ s/^\///og;
-
- my ($format,$axis,$site,$string,$page,$page_size) = split '/', $path;
- #warn " >>> $format -> $axis -> $site -> $string -> $page -> $page_size ";
-
- my $status = [$cgi->param('status')];
- my $cpLoc = [$cgi->param('copyLocation')];
- $site ||= $cgi->param('searchOrg');
- $page ||= $cgi->param('startPage') || 0;
- $page_size ||= $cgi->param('count') || 9;
-
- $page = 0 if ($page !~ /^-?\d+$/);
- $page_size = 9 if $page_size !~ /^\d+$/;
-
- my $prev = join('/', $base,$format,$axis,$site,$string,$page - 1,$page_size);
- my $next = join('/', $base,$format,$axis,$site,$string,$page + 1,$page_size);
-
- unless ($string and $axis and grep { $axis eq $_ } keys %browse_types) {
- warn "something's wrong...";
- warn " >>> format: $format -> axis: $axis -> site: $site -> string: $string -> page: $page -> page_size: $page_size ";
- return undef;
- }
-
- $string = decode_utf8($string);
- $string =~ s/\+/ /go;
- $string =~ s/'//go;
-
- my $tree = $supercat->request(
- "open-ils.supercat.$axis.startwith",
- $string,
- (($axis =~ /^authority/) ? () : ($site)),
- $page_size,
- $page,
- $status,
- $cpLoc
- )->gather(1);
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
+
+ my $cgi = new CGI;
+ my $year = (gmtime())[5] + 1900;
+
+ my $host = $cgi->virtual_host || $cgi->server_name;
+
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
+
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'startwith', $url)[0];
+ my $base = (split 'startwith', $url)[0] . 'startwith';
+ my $unapi = (split 'startwith', $url)[0] . 'unapi';
+
+ my $path = $cgi->path_info;
+ $path =~ s/^\///og;
+
+ my ($format,$axis,$site,$string,$page,$page_size) = split '/', $path;
+ #warn " >>> $format -> $axis -> $site -> $string -> $page -> $page_size ";
+
+ my $status = [$cgi->param('status')];
+ my $cpLoc = [$cgi->param('copyLocation')];
+ $site ||= $cgi->param('searchOrg');
+ $page ||= $cgi->param('startPage') || 0;
+ $page_size ||= $cgi->param('count') || 9;
+
+ $page = 0 if ($page !~ /^-?\d+$/);
+ $page_size = 9 if $page_size !~ /^\d+$/;
+
+ my $prev = join('/', $base,$format,$axis,$site,$string,$page - 1,$page_size);
+ my $next = join('/', $base,$format,$axis,$site,$string,$page + 1,$page_size);
+
+ unless ($string and $axis and grep { $axis eq $_ } keys %browse_types) {
+ warn "something's wrong...";
+ warn " >>> format: $format -> axis: $axis -> site: $site -> string: $string -> page: $page -> page_size: $page_size ";
+ return undef;
+ }
+
+ $string = decode_utf8($string);
+ $string =~ s/\+/ /go;
+ $string =~ s/'//go;
+
+ my $tree = $supercat->request(
+ "open-ils.supercat.$axis.startwith",
+ $string,
+ (($axis =~ /^authority/) ? () : ($site)),
+ $page_size,
+ $page,
+ $status,
+ $cpLoc
+ )->gather(1);
(my $norm_format = $format) =~ s/(-full|-uris)$//o;
- my ($header,$content) = $browse_types{$axis}{$norm_format}->($tree,$prev,$next,$format,$unapi,$base,$site);
- print $header.$content;
- return Apache2::Const::OK;
+ my ($header,$content) = $browse_types{$axis}{$norm_format}->($tree,$prev,$next,$format,$unapi,$base,$site);
+ print $header.$content;
+ return Apache2::Const::OK;
}
sub item_age_browse {
- my $apache = shift;
- return Apache2::Const::DECLINED if (-e $apache->filename);
-
- my $cgi = new CGI;
- my $year = (gmtime())[5] + 1900;
-
- my $host = $cgi->virtual_host || $cgi->server_name;
-
- my $add_path = 0;
- if ( $cgi->server_software !~ m|^Apache/2.2| ) {
- my $rel_name = $cgi->url(-relative=>1);
- $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
- }
-
- my $url = $cgi->url(-path_info=>$add_path);
- my $root = (split 'browse', $url)[0];
- my $base = (split 'browse', $url)[0] . 'browse';
- my $unapi = (split 'browse', $url)[0] . 'unapi';
-
- my $path = $cgi->path_info;
- $path =~ s/^\///og;
-
- my ($format,$axis,$site,$page,$page_size) = split '/', $path;
- #warn " >>> $format -> $axis -> $site -> $page -> $page_size ";
-
- unless ($axis eq 'item-age') {
- warn "something's wrong...";
- warn " >>> $format -> $axis -> $site -> $page -> $page_size ";
- return undef;
- }
-
- my $status = [$cgi->param('status')];
- my $cpLoc = [$cgi->param('copyLocation')];
- $site ||= $cgi->param('searchOrg') || '-';
- $page ||= $cgi->param('startPage') || 1;
- $page_size ||= $cgi->param('count') || 10;
-
- $page = 1 if ($page !~ /^-?\d+$/ || $page < 1);
- $page_size = 10 if $page_size !~ /^\d+$/;
-
- my $prev = join('/', $base,$format,$axis,$site,$page - 1,$page_size);
- my $next = join('/', $base,$format,$axis,$site,$page + 1,$page_size);
-
- my $recs = $supercat->request(
- "open-ils.supercat.new_book_list",
- $site,
- $page_size,
- $page,
- $status,
- $cpLoc
- )->gather(1);
+ my $apache = shift;
+ return Apache2::Const::DECLINED if (-e $apache->filename);
+
+ my $cgi = new CGI;
+ my $year = (gmtime())[5] + 1900;
+
+ my $host = $cgi->virtual_host || $cgi->server_name;
+
+ my $add_path = 0;
+ if ( $cgi->server_software !~ m|^Apache/2.2| ) {
+ my $rel_name = $cgi->url(-relative=>1);
+ $add_path = 1 if ($cgi->url(-path_info=>1) !~ /$rel_name$/);
+ }
+
+ my $url = $cgi->url(-path_info=>$add_path);
+ my $root = (split 'browse', $url)[0];
+ my $base = (split 'browse', $url)[0] . 'browse';
+ my $unapi = (split 'browse', $url)[0] . 'unapi';
+
+ my $path = $cgi->path_info;
+ $path =~ s/^\///og;
+
+ my ($format,$axis,$site,$page,$page_size) = split '/', $path;
+ #warn " >>> $format -> $axis -> $site -> $page -> $page_size ";
+
+ unless ($axis eq 'item-age') {
+ warn "something's wrong...";
+ warn " >>> $format -> $axis -> $site -> $page -> $page_size ";
+ return undef;
+ }
+
+ my $status = [$cgi->param('status')];
+ my $cpLoc = [$cgi->param('copyLocation')];
+ $site ||= $cgi->param('searchOrg') || '-';
+ $page ||= $cgi->param('startPage') || 1;
+ $page_size ||= $cgi->param('count') || 10;
+
+ $page = 1 if ($page !~ /^-?\d+$/ || $page < 1);
+ $page_size = 10 if $page_size !~ /^\d+$/;
+
+ my $prev = join('/', $base,$format,$axis,$site,$page - 1,$page_size);
+ my $next = join('/', $base,$format,$axis,$site,$page + 1,$page_size);
+
+ my $recs = $supercat->request(
+ "open-ils.supercat.new_book_list",
+ $site,
+ $page_size,
+ $page,
+ $status,
+ $cpLoc
+ )->gather(1);
(my $norm_format = $format) =~ s/(-full|-uris)$//o;
- my ($header,$content) = $browse_types{$axis}{$norm_format}->($recs,$prev,$next,$format,$unapi,$base,$site);
- print $header.$content;
- return Apache2::Const::OK;
+ my ($header,$content) = $browse_types{$axis}{$norm_format}->($recs,$prev,$next,$format,$unapi,$base,$site);
+ print $header.$content;
+ return Apache2::Const::OK;
}
-our %qualifier_map = (
-
- # Some EG qualifiers
- 'eg.site' => 'site',
- 'eg.sort' => 'sort',
- 'eg.direction' => 'dir',
- 'eg.available' => 'available',
-
- # Title class:
- 'eg.title' => 'title',
- 'dc.title' => 'title',
- 'bib.titleabbreviated' => 'title|abbreviated',
- 'bib.titleuniform' => 'title|uniform',
- 'bib.titletranslated' => 'title|translated',
- 'bib.titlealternative' => 'title',
- 'bib.titleseries' => 'series',
- 'eg.series' => 'title',
-
- # Author/Name class:
- 'eg.author' => 'author',
- 'eg.name' => 'author',
- 'creator' => 'author',
- 'dc.creator' => 'author',
- 'dc.contributer' => 'author',
- 'dc.publisher' => 'keyword',
- 'bib.name' => 'author',
- 'bib.namepersonal' => 'author|personal',
- 'bib.namepersonalfamily'=> 'author|personal',
- 'bib.namepersonalgiven' => 'author|personal',
- 'bib.namecorporate' => 'author|corporate',
- 'bib.nameconference' => 'author|conference',
-
- # Subject class:
- 'eg.subject' => 'subject',
- 'dc.subject' => 'subject',
- 'bib.subjectplace' => 'subject|geographic',
- 'bib.subjecttitle' => 'keyword',
- 'bib.subjectname' => 'subject|name',
- 'bib.subjectoccupation' => 'keyword',
-
- # Keyword class:
- 'eg.keyword' => 'keyword',
- 'srw.serverchoice' => 'keyword',
-
- # Identifiers:
- 'dc.identifier' => 'keyword',
-
- # Dates:
- 'bib.dateissued' => undef,
- 'bib.datecreated' => undef,
- 'bib.datevalid' => undef,
- 'bib.datemodified' => undef,
- 'bib.datecopyright' => undef,
-
- # Resource Type:
- 'dc.type' => undef,
-
- # Format:
- 'dc.format' => undef,
-
- # Genre:
- 'bib.genre' => 'keyword',
-
- # Target Audience:
- 'bib.audience' => undef,
-
- # Place of Origin:
- 'bib.originplace' => undef,
-
- # Language
- 'dc.language' => 'lang',
-
- # Edition
- 'bib.edition' => 'keyword',
-
- # Part:
- 'bib.volume' => 'keyword',
- 'bib.issue' => 'keyword',
- 'bib.startpage' => 'keyword',
- 'bib.endpage' => 'keyword',
-
- # Issuance:
- 'bib.issuance' => 'keyword',
-);
-
our %qualifier_ids = (
- eg => 'http://open-ils.org/spec/SRU/context-set/evergreen/v1',
- dc => 'info:srw/cql-context-set/1/dc-v1.1',
- bib => 'info:srw/cql-context-set/1/bib-v1.0',
- srw => ''
-);
-
-our %nested_qualifier_map = (
- eg => {
- site => ['site','Evergreen Site Code (shortname)'],
- sort => ['sort','Sort on relevance, title, author, pubdate, create_date or edit_date'],
- direction => ['dir','Sort direction (asc|desc)'],
- available => ['available','Filter to available (true|false)'],
- title => ['title'],
- author => ['author'],
- name => ['author'],
- subject => ['subject'],
- keyword => ['keyword'],
- series => ['series'],
- },
- dc => {
- title => ['title'],
- creator => ['author'],
- contributor => ['author'],
- publisher => ['keyword'],
- subject => ['subject'],
- identifier => ['keyword'],
- type => [undef],
- format => [undef],
- language => ['lang'],
- },
- bib => {
- # Title class:
- titleAbbreviated => ['title'],
- titleUniform => ['title'],
- titleTranslated => ['title'],
- titleAlternative => ['title'],
- titleSeries => ['series'],
-
- # Author/Name class:
- name => ['author'],
- namePersonal => ['author'],
- namePersonalFamily => ['author'],
- namePersonalGiven => ['author'],
- nameCorporate => ['author'],
- nameConference => ['author'],
-
- # Subject class:
- subjectPlace => ['subject'],
- subjectTitle => ['keyword'],
- subjectName => ['subject|name'],
- subjectOccupation => ['keyword'],
-
- # Keyword class:
-
- # Dates:
- dateIssued => [undef],
- dateCreated => [undef],
- dateValid => [undef],
- dateModified => [undef],
- dateCopyright => [undef],
-
- # Genre:
- genre => ['keyword'],
-
- # Target Audience:
- audience => [undef],
-
- # Place of Origin:
- originPlace => [undef],
-
- # Edition
- edition => ['keyword'],
-
- # Part:
- volume => ['keyword'],
- issue => ['keyword'],
- startPage => ['keyword'],
- endPage => ['keyword'],
-
- # Issuance:
- issuance => ['keyword'],
- },
- srw => {
- serverChoice => ['keyword'],
- },
+ eg => 'http://open-ils.org/spec/SRU/context-set/evergreen/v1',
+ dc => 'info:srw/cql-context-set/1/dc-v1.1',
+ bib => 'info:srw/cql-context-set/1/bib-v1.0',
+ srw => ''
);
# Our authority search options are currently pretty impoverished;
# ID number
our %nested_auth_qualifier_map = (
eg => {
- id => ['id', 'Record number'],
- name => ['author', 'Personal or corporate author, or meeting name'],
- title => ['title', 'Uniform title'],
- subject => ['subject', 'Chronological term, topical term, geographic name, or genre/form term'],
- topic => ['topic', 'Topical term'],
+ id => { index => 'id', title => 'Record number'},
+ name => { index => 'author', title => 'Personal or corporate author, or meeting name'},
+ title => { index => 'title', title => 'Uniform title'},
+ subject => { index => 'subject', title => 'Chronological term, topical term, geographic name, or genre/form term'},
+ topic => { index => 'topic', title => 'Topical term'},
},
);
my $base_explain = <<XML;
<explain
- id="evergreen-sru-explain-full"
- authoritative="true"
- xmlns:z="http://explain.z3950.org/dtd/2.0/"
- xmlns="http://explain.z3950.org/dtd/2.0/">
- <serverInfo transport="http" protocol="SRU" version="1.1">
- <host/>
- <port/>
- <database/>
- </serverInfo>
-
- <databaseInfo>
- <title primary="true"/>
- <description primary="true"/>
- </databaseInfo>
-
- <indexInfo>
- <set identifier="info:srw/cql-context-set/1/cql-v1.2" name="cql"/>
- </indexInfo>
-
- <schemaInfo>
- <schema
- identifier="info:srw/schema/1/marcxml-v1.1"
- location="http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
- sort="true"
- retrieve="true"
- name="marcxml">
- <title>MARC21Slim (marcxml)</title>
- </schema>
- </schemaInfo>
-
- <configInfo>
- <default type="numberOfRecords">10</default>
- <default type="contextSet">eg</default>
- <default type="index">keyword</default>
- <default type="relation">all</default>
- <default type="sortSchema">marcxml</default>
- <default type="retrieveSchema">marcxml</default>
- <setting type="maximumRecords">50</setting>
- <supports type="relationModifier">relevant</supports>
- <supports type="relationModifier">stem</supports>
- <supports type="relationModifier">fuzzy</supports>
- <supports type="relationModifier">word</supports>
- </configInfo>
+ id="evergreen-sru-explain-full"
+ authoritative="true"
+ xmlns:z="http://explain.z3950.org/dtd/2.0/"
+ xmlns="http://explain.z3950.org/dtd/2.0/">
+ <serverInfo transport="http" protocol="SRU" version="1.1">
+ <host/>
+ <port/>
+ <database/>
+ </serverInfo>
+
+ <databaseInfo>
+ <title primary="true"/>
+ <description primary="true"/>
+ </databaseInfo>
+
+ <indexInfo>
+ <set identifier="info:srw/cql-context-set/1/cql-v1.2" name="cql"/>
+ </indexInfo>
+
+ <schemaInfo>
+ <schema
+ identifier="info:srw/schema/1/marcxml-v1.1"
+ location="http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
+ sort="true"
+ retrieve="true"
+ name="marcxml">
+ <title>MARC21Slim (marcxml)</title>
+ </schema>
+ </schemaInfo>
+
+ <configInfo>
+ <default type="numberOfRecords">10</default>
+ <default type="contextSet">eg</default>
+ <default type="index">keyword</default>
+ <default type="relation">all</default>
+ <default type="sortSchema">marcxml</default>
+ <default type="retrieveSchema">marcxml</default>
+ <setting type="maximumRecords">50</setting>
+ <supports type="relationModifier">relevant</supports>
+ <supports type="relationModifier">stem</supports>
+ <supports type="relationModifier">fuzzy</supports>
+ <supports type="relationModifier">word</supports>
+ </configInfo>
</explain>
XML
my $ex_doc;
sub sru_search {
- my $cgi = new CGI;
+ my $cgi = new CGI;
- my $req = SRU::Request->newFromCGI( $cgi );
- my $resp = SRU::Response->newFromRequest( $req );
+ my $req = SRU::Request->newFromCGI( $cgi );
+ my $resp = SRU::Response->newFromRequest( $req );
- # Find the org_unit shortname, if passed as part of the URL
- # http://example.com/opac/extras/sru/SHORTNAME
- my $url = $cgi->path_info;
- my ($shortname, $holdings) = $url =~ m#/?([^/]*)(/holdings)?#;
+ # Find the org_unit shortname, if passed as part of the URL
+ # http://example.com/opac/extras/sru/SHORTNAME
+ my $url = $cgi->path_info;
+ my ($shortname, $holdings) = $url =~ m#/?([^/]*)(/holdings)?#;
- if ( $resp->type eq 'searchRetrieve' ) {
+ if ( $resp->type eq 'searchRetrieve' ) {
- # Older versions of Debian packages returned terms to us double-encoded,
- # so we had to forcefully double-decode them a second time with
- # an outer decode('utf8', $string) call; this seems to be resolved with
- # Debian Lenny packages sometime between 2009-07-27 and 2010-02-15
- my $cql_query = decode_utf8($req->query);
- my $search_string = decode_utf8($req->cql->toEvergreen);
+ # Older versions of Debian packages returned terms to us double-encoded,
+ # so we had to forcefully double-decode them a second time with
+ # an outer decode('utf8', $string) call; this seems to be resolved with
+ # Debian Lenny packages sometime between 2009-07-27 and 2010-02-15
+ my $cql_query = decode_utf8($req->query);
+ my $search_string = decode_utf8($req->cql->toEvergreen);
- # Ensure the search string overrides the default site
- if ($shortname and $search_string !~ m#site:#) {
- $search_string .= " site:$shortname";
- }
+ # Ensure the search string overrides the default site
+ if ($shortname and $search_string !~ m#site:#) {
+ $search_string .= " site:$shortname";
+ }
my $offset = $req->startRecord;
$offset-- if ($offset);
$log->info("SRU search string [$cql_query] converted to [$search_string]\n");
- my $recs = $search->request(
- 'open-ils.search.biblio.multiclass.query' => {offset => $offset, limit => $limit} => $search_string => 1
- )->gather(1);
-
- my $bre = $supercat->request( 'open-ils.supercat.record.object.retrieve' => [ map { $_->[0] } @{$recs->{ids}} ] )->gather(1);
-
- foreach my $record (@$bre) {
- my $marcxml = $record->marc;
- # Make the beast conform to a VDX-supported format
- # See http://vdxipedia.oclc.org/index.php/Holdings_Parsing
- # Trying to implement LIBSOL_852_A format; so much for standards
- if ($holdings) {
- my $bib_holdings = $supercat->request('open-ils.supercat.record.basic_holdings.retrieve', $record->id, $shortname || '-')->gather(1);
- my $marc = MARC::Record->new_from_xml($marcxml, 'UTF8', 'XML');
-
- # Force record leader to 'a' as our data is always UTF8
- # Avoids marc8_to_utf8 from being invoked with horrible results
- # on the off-chance the record leader isn't correct
- my $ldr = $marc->leader;
- substr($ldr, 9, 1, 'a');
- $marc->leader($ldr);
-
- # Expects the record ID in the 001
- $marc->delete_field($_) for ($marc->field('001'));
- if (!$marc->field('001')) {
- $marc->insert_fields_ordered(
- MARC::Field->new( '001', $record->id )
- );
- }
- $marc->delete_field($_) for ($marc->field('852')); # remove any legacy 852s
- foreach my $cn (keys %$bib_holdings) {
- foreach my $cp (@{$bib_holdings->{$cn}->{'copies'}}) {
- $marc->insert_fields_ordered(
- MARC::Field->new(
- '852', '4', '',
- a => $cp->{'location'},
- b => $bib_holdings->{$cn}->{'owning_lib'},
- c => $cn,
- d => $cp->{'circlib'},
- g => $cp->{'barcode'},
- n => $cp->{'status'},
- )
- );
- }
- }
-
- # Ensure the data is encoded as UTF8 before we hand it off
- $marcxml = encode_utf8($marc->as_xml_record());
- $marcxml =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>//o;
-
- }
- $resp->addRecord(
- SRU::Response::Record->new(
- recordSchema => 'info:srw/schema/1/marcxml-v1.1',
- recordData => $marcxml,
- recordPosition => ++$offset
- )
- );
- }
-
- $resp->numberOfRecords($recs->{count});
-
- } elsif ( $resp->type eq 'explain' ) {
- return_sru_explain($cgi, $req, $resp, \$ex_doc,
- \%OpenILS::WWW::SuperCat::nested_qualifier_map,
- \%OpenILS::WWW::SuperCat::qualifier_ids
- );
-
- $resp->record(
- SRU::Response::Record->new(
- recordSchema => 'info:srw/cql-context-set/2/zeerex-1.1',
- recordData => $ex_doc
- )
- );
- }
-
- print $cgi->header( -type => 'application/xml' );
- print $U->entityize($resp->asXML) . "\n";
- return Apache2::Const::OK;
+ my $recs = $search->request(
+ 'open-ils.search.biblio.multiclass.query' => {offset => $offset, limit => $limit} => $search_string => 1
+ )->gather(1);
+
+ my $bre = $supercat->request( 'open-ils.supercat.record.object.retrieve' => [ map { $_->[0] } @{$recs->{ids}} ] )->gather(1);
+
+ foreach my $record (@$bre) {
+ my $marcxml = $record->marc;
+ # Make the beast conform to a VDX-supported format
+ # See http://vdxipedia.oclc.org/index.php/Holdings_Parsing
+ # Trying to implement LIBSOL_852_A format; so much for standards
+ if ($holdings) {
+ my $bib_holdings = $supercat->request('open-ils.supercat.record.basic_holdings.retrieve', $record->id, $shortname || '-')->gather(1);
+ my $marc = MARC::Record->new_from_xml($marcxml, 'UTF8', 'XML');
+
+ # Force record leader to 'a' as our data is always UTF8
+ # Avoids marc8_to_utf8 from being invoked with horrible results
+ # on the off-chance the record leader isn't correct
+ my $ldr = $marc->leader;
+ substr($ldr, 9, 1, 'a');
+ $marc->leader($ldr);
+
+ # Expects the record ID in the 001
+ $marc->delete_field($_) for ($marc->field('001'));
+ if (!$marc->field('001')) {
+ $marc->insert_fields_ordered(
+ MARC::Field->new( '001', $record->id )
+ );
+ }
+ $marc->delete_field($_) for ($marc->field('852')); # remove any legacy 852s
+ foreach my $cn (keys %$bib_holdings) {
+ foreach my $cp (@{$bib_holdings->{$cn}->{'copies'}}) {
+ $marc->insert_fields_ordered(
+ MARC::Field->new(
+ '852', '4', '',
+ a => $cp->{'location'},
+ b => $bib_holdings->{$cn}->{'owning_lib'},
+ c => $cn,
+ d => $cp->{'circlib'},
+ g => $cp->{'barcode'},
+ n => $cp->{'status'},
+ )
+ );
+ }
+ }
+
+ # Ensure the data is encoded as UTF8 before we hand it off
+ $marcxml = encode_utf8($marc->as_xml_record());
+ $marcxml =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>//o;
+
+ }
+ $resp->addRecord(
+ SRU::Response::Record->new(
+ recordSchema => 'info:srw/schema/1/marcxml-v1.1',
+ recordData => $marcxml,
+ recordPosition => ++$offset
+ )
+ );
+ }
+
+ $resp->numberOfRecords($recs->{count});
+
+ } elsif ( $resp->type eq 'explain' ) {
+ return_sru_explain($cgi, $req, $resp, \$ex_doc,
+ undef,
+ \%OpenILS::WWW::SuperCat::qualifier_ids
+ );
+
+ $resp->record(
+ SRU::Response::Record->new(
+ recordSchema => 'info:srw/cql-context-set/2/zeerex-1.1',
+ recordData => $ex_doc
+ )
+ );
+ }
+
+ print $cgi->header( -type => 'application/xml' );
+ print $U->entityize($resp->asXML) . "\n";
+ return Apache2::Const::OK;
}
if ( $qualifier ) {
my ($qset, $qname) = split(/\./, $qualifier);
- $log->debug("SRU toEvergreen: $qset, $qname $OpenILS::WWW::SuperCat::nested_qualifier_map{$qset}{$qname}[0]\n");
-
- if ( exists($OpenILS::WWW::SuperCat::nested_qualifier_map{$qset}{$qname}) ) {
- $qualifier = $OpenILS::WWW::SuperCat::nested_qualifier_map{$qset}{$qname}[0] || 'kw';
+ if ( exists($qualifier_map{$qset}{$qname}) ) {
+ $qualifier = $qualifier_map{$qset}{$qname}{'index'} || 'kw';
+ $log->debug("SRU toEvergreen: $qset, $qname $qualifier_map{$qset}{$qname}{'index'}\n");
}
my @modifiers = $relation->getModifiers();
if ( $qualifier ) {
my ($qset, $qname) = split(/\./, $qualifier);
- $log->debug("SRU toEvergreenAuth: $qset, $qname $OpenILS::WWW::SuperCat::nested_auth_qualifier_map{$qset}{$qname}[0]\n");
-
if ( exists($OpenILS::WWW::SuperCat::nested_auth_qualifier_map{$qset}{$qname}) ) {
- $qualifier = $OpenILS::WWW::SuperCat::nested_auth_qualifier_map{$qset}{$qname}[0] || 'author';
+ $qualifier = $OpenILS::WWW::SuperCat::nested_auth_qualifier_map{$qset}{$qname}{'index'} || 'author';
+ $log->debug("SRU toEvergreenAuth: $qset, $qname $OpenILS::WWW::SuperCat::nested_auth_qualifier_map{$qset}{$qname}{'index'}\n");
}
}
return { qualifier => $qualifier, term => $term };
}
sub return_sru_explain {
- my ($cgi, $req, $resp, $explain, $qualifier_map, $qualifier_ids) = @_;
+ my ($cgi, $req, $resp, $explain, $index_map, $qualifier_ids) = @_;
+ $index_map ||= \%qualifier_map;
if (!$$explain) {
my ($doc, $e) = explain_header($cgi);
- for my $name ( keys %$qualifier_map ) {
+ for my $name ( keys %{$index_map} ) {
my $identifier = $qualifier_ids->{ $name };
$set_node->setAttribute( name => $name );
$e->findnodes('/z:explain/z:indexInfo')->shift->appendChild( $set_node );
-
- for my $index ( keys %{ $qualifier_map->{$name} } ) {
- my $desc = $qualifier_map->{$name}{$index}[1] || $index;
-
+ for my $index ( sort keys %{$index_map->{$name}} ) {
my $name_node = $doc->createElementNS( 'http://explain.z3950.org/dtd/2.0/', 'name' );
my $map_node = $doc->createElementNS( 'http://explain.z3950.org/dtd/2.0/', 'map' );
$index_node->appendChild( $title_node );
$index_node->appendChild( $map_node );
- $index_node->setAttribute( id => $name . '.' . $index );
- $title_node->appendText( $desc );
+ $index_node->setAttribute( id => "$name.$index" );
+ $title_node->appendText($index_map->{$name}{$index}{'title'});
$name_node->setAttribute( set => $name );
- $name_node->appendText($index );
+ $name_node->appendText($index_map->{$name}{$index}{'index'});
$e->findnodes('/z:explain/z:indexInfo')->shift->appendChild( $index_node );
}
=cut
sub get_ou {
- my $org = shift || '-';
- my $org_unit;
-
- if ($org eq '-') {
- $org_unit = $actor->request(
- 'open-ils.actor.org_unit_list.search' => parent_ou => undef
- )->gather(1);
- } elsif ($org !~ /^\d+$/o) {
- $org_unit = $actor->request(
- 'open-ils.actor.org_unit_list.search' => shortname => uc($org)
- )->gather(1);
- } else {
- $org_unit = $actor->request(
- 'open-ils.actor.org_unit_list.search' => id => $org
- )->gather(1);
- }
-
- return $org_unit;
+ my $org = shift || '-';
+ my $org_unit;
+
+ if ($org eq '-') {
+ $org_unit = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => parent_ou => undef
+ )->gather(1);
+ } elsif ($org !~ /^\d+$/o) {
+ $org_unit = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => shortname => uc($org)
+ )->gather(1);
+ } else {
+ $org_unit = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => id => $org
+ )->gather(1);
+ }
+
+ return $org_unit;
}
1;
INSERT INTO config.xml_transform VALUES ( 'mods33', 'http://www.loc.gov/mods/v3', 'mods33', '');
INSERT INTO config.xml_transform VALUES ( 'marc21expand880', 'http://www.loc.gov/MARC21/slim', 'marc', '' );
+-- Index Definitions
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
(1, 'series', 'seriestitle', oils_i18n_gettext(1, 'Series Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo$$, TRUE );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(15, 'keyword', 'keyword', oils_i18n_gettext(15, 'General Keywords', 'cmf', 'label'), 'mods32', $$//mods32:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */;
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (16, 'subject', 'complete', oils_i18n_gettext(16, 'All Subjects', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject//text()$$ );
+ (16, 'subject', 'complete', oils_i18n_gettext(16, 'All Subjects', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(17, 'identifier', 'accession', oils_i18n_gettext(17, 'Accession Number', 'cmf', 'label'), 'marcxml', $$//marc:controlfield[@tag='001']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(19, 'identifier', 'issn', oils_i18n_gettext(19, 'ISSN', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='022']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (20, 'identifier', 'upc', oils_i18n_gettext(20, 'UPC', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and ind1='1']/marc:subfield[@code='a' or @code='z']$$ );
+ (20, 'identifier', 'upc', oils_i18n_gettext(20, 'UPC', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and @ind1='1']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (21, 'identifier', 'ismn', oils_i18n_gettext(21, 'ISMN', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and ind1='2']/marc:subfield[@code='a' or @code='z']$$ );
+ (21, 'identifier', 'ismn', oils_i18n_gettext(21, 'ISMN', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and @ind1='2']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (22, 'identifier', 'ean', oils_i18n_gettext(22, 'EAN', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and ind1='3']/marc:subfield[@code='a' or @code='z']$$ );
+ (22, 'identifier', 'ean', oils_i18n_gettext(22, 'EAN', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and @ind1='3']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (23, 'identifier', 'isrc', oils_i18n_gettext(23, 'ISRC', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and ind1='0']/marc:subfield[@code='a' or @code='z']$$ );
+ (23, 'identifier', 'isrc', oils_i18n_gettext(23, 'ISRC', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and @ind1='0']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (24, 'identifier', 'sici', oils_i18n_gettext(24, 'SICI', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and ind1='4']/marc:subfield[@code='a' or @code='z']$$ );
+ (24, 'identifier', 'sici', oils_i18n_gettext(24, 'SICI', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='024' and @ind1='4']/marc:subfield[@code='a' or @code='z']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
- (25, 'identifier', 'bibcn', oils_i18n_gettext(25, 'Local Free-Text Call Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='099']//text()$$ );
+ (25, 'identifier', 'bibcn', oils_i18n_gettext(25, 'Local Free-Text Call Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='099']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(26, 'identifier', 'tcn', oils_i18n_gettext(26, 'Title Control Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='901']/marc:subfield[@code='a']$$ );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(3, oils_i18n_gettext(3, 'No Access', 'cnal', 'name'));
SELECT SETVAL('config.net_access_level_id_seq'::TEXT, 100);
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('', oils_i18n_gettext('', 'Unknown or unspecified', 'cam', 'value'),
- oils_i18n_gettext('', 'The target audience for the item not known or not specified.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('a', oils_i18n_gettext('a', 'Preschool', 'cam', 'value'),
- oils_i18n_gettext('a', 'The item is intended for children, approximate ages 0-5 years.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('b', oils_i18n_gettext('b', 'Primary', 'cam', 'value'),
- oils_i18n_gettext('b', 'The item is intended for children, approximate ages 6-8 years.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('c', oils_i18n_gettext('c', 'Pre-adolescent', 'cam', 'value'),
- oils_i18n_gettext('c', 'The item is intended for young people, approximate ages 9-13 years.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('d', oils_i18n_gettext('d', 'Adolescent', 'cam', 'value'),
- oils_i18n_gettext('d', 'The item is intended for young people, approximate ages 14-17 years.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('e', oils_i18n_gettext('e', 'Adult', 'cam', 'value'),
- oils_i18n_gettext('e', 'The item is intended for adults.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('f', oils_i18n_gettext('f', 'Specialized', 'cam', 'value'),
- oils_i18n_gettext('f', 'The item is aimed at a particular audience and the nature of the presentation makes the item of little interest to another audience.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('g', oils_i18n_gettext('g', 'General', 'cam', 'value'),
- oils_i18n_gettext('g', 'The item is of general interest and not aimed at an audience of a particular intellectual level.', 'cam', 'description'));
-INSERT INTO config.audience_map (code, value, description) VALUES
- ('j', oils_i18n_gettext('j', 'Juvenile', 'cam', 'value'),
- oils_i18n_gettext('j', 'The item is intended for children and young people, approximate ages 0-15 years.', 'cam', 'description'));
-
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('0', oils_i18n_gettext('0', 'Not fiction (not further specified)', 'clfm', 'value'),
- oils_i18n_gettext('0', 'The item is not a work of fiction and no further identification of the literary form is desired', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('1', oils_i18n_gettext('1', 'Fiction (not further specified)', 'clfm', 'value'),
- oils_i18n_gettext('1', 'The item is a work of fiction and no further identification of the literary form is desired', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('c', oils_i18n_gettext('c', 'Comic strips', 'clfm', 'value'), NULL);
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('d', oils_i18n_gettext('d', 'Dramas', 'clfm', 'value'), NULL);
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('e', oils_i18n_gettext('e', 'Essays', 'clfm', 'value'), NULL);
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('f', oils_i18n_gettext('f', 'Novels', 'clfm', 'value'), NULL);
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('h', oils_i18n_gettext('h', 'Humor, satires, etc.', 'clfm', 'value'),
- oils_i18n_gettext('h', 'The item is a humorous work, satire or of similar literary form.', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('i', oils_i18n_gettext('i', 'Letters', 'clfm', 'value'),
- oils_i18n_gettext('i', 'The item is a single letter or collection of correspondence.', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('j', oils_i18n_gettext('j', 'Short stories', 'clfm', 'value'),
- oils_i18n_gettext('j', 'The item is a short story or collection of short stories.', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('m', oils_i18n_gettext('m', 'Mixed forms', 'clfm', 'value'),
- oils_i18n_gettext('m', 'The item is a variety of literary forms (e.g., poetry and short stories).', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('p', oils_i18n_gettext('p', 'Poetry', 'clfm', 'value'),
- oils_i18n_gettext('p', 'The item is a poem or collection of poems.', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('s', oils_i18n_gettext('s', 'Speeches', 'clfm', 'value'),
- oils_i18n_gettext('s', 'The item is a speech or collection of speeches.', 'clfm', 'description'));
-INSERT INTO config.lit_form_map (code, value, description) VALUES
- ('u', oils_i18n_gettext('u', 'Unknown', 'clfm', 'value'),
- oils_i18n_gettext('u', 'The literary form of the item is unknown.', 'clfm', 'description'));
-
--- TO-DO: Auto-generate these values from CLDR
--- XXX These are the values used in MARC records ... does that match CLDR, including deprecated languages?
-INSERT INTO config.language_map (code, value) VALUES ('aar', oils_i18n_gettext('aar', 'Afar', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('abk', oils_i18n_gettext('abk', 'Abkhaz', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ace', oils_i18n_gettext('ace', 'Achinese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ach', oils_i18n_gettext('ach', 'Acoli', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ada', oils_i18n_gettext('ada', 'Adangme', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ady', oils_i18n_gettext('ady', 'Adygei', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('afa', oils_i18n_gettext('afa', 'Afroasiatic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('afh', oils_i18n_gettext('afh', 'Afrihili (Artificial language)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('afr', oils_i18n_gettext('afr', 'Afrikaans', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-ajm', oils_i18n_gettext('-ajm', 'AljamÃa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('aka', oils_i18n_gettext('aka', 'Akan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('akk', oils_i18n_gettext('akk', 'Akkadian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('alb', oils_i18n_gettext('alb', 'Albanian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ale', oils_i18n_gettext('ale', 'Aleut', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('alg', oils_i18n_gettext('alg', 'Algonquian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('amh', oils_i18n_gettext('amh', 'Amharic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ang', oils_i18n_gettext('ang', 'English, Old (ca. 450-1100)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('apa', oils_i18n_gettext('apa', 'Apache languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ara', oils_i18n_gettext('ara', 'Arabic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('arc', oils_i18n_gettext('arc', 'Aramaic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('arg', oils_i18n_gettext('arg', 'Aragonese Spanish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('arm', oils_i18n_gettext('arm', 'Armenian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('arn', oils_i18n_gettext('arn', 'Mapuche', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('arp', oils_i18n_gettext('arp', 'Arapaho', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('art', oils_i18n_gettext('art', 'Artificial (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('arw', oils_i18n_gettext('arw', 'Arawak', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('asm', oils_i18n_gettext('asm', 'Assamese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ast', oils_i18n_gettext('ast', 'Bable', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ath', oils_i18n_gettext('ath', 'Athapascan (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('aus', oils_i18n_gettext('aus', 'Australian languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ava', oils_i18n_gettext('ava', 'Avaric', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ave', oils_i18n_gettext('ave', 'Avestan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('awa', oils_i18n_gettext('awa', 'Awadhi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('aym', oils_i18n_gettext('aym', 'Aymara', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('aze', oils_i18n_gettext('aze', 'Azerbaijani', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bad', oils_i18n_gettext('bad', 'Banda', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bai', oils_i18n_gettext('bai', 'Bamileke languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bak', oils_i18n_gettext('bak', 'Bashkir', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bal', oils_i18n_gettext('bal', 'Baluchi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bam', oils_i18n_gettext('bam', 'Bambara', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ban', oils_i18n_gettext('ban', 'Balinese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('baq', oils_i18n_gettext('baq', 'Basque', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bas', oils_i18n_gettext('bas', 'Basa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bat', oils_i18n_gettext('bat', 'Baltic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bej', oils_i18n_gettext('bej', 'Beja', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bel', oils_i18n_gettext('bel', 'Belarusian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bem', oils_i18n_gettext('bem', 'Bemba', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ben', oils_i18n_gettext('ben', 'Bengali', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ber', oils_i18n_gettext('ber', 'Berber (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bho', oils_i18n_gettext('bho', 'Bhojpuri', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bih', oils_i18n_gettext('bih', 'Bihari', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bik', oils_i18n_gettext('bik', 'Bikol', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bin', oils_i18n_gettext('bin', 'Edo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bis', oils_i18n_gettext('bis', 'Bislama', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bla', oils_i18n_gettext('bla', 'Siksika', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bnt', oils_i18n_gettext('bnt', 'Bantu (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bos', oils_i18n_gettext('bos', 'Bosnian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bra', oils_i18n_gettext('bra', 'Braj', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bre', oils_i18n_gettext('bre', 'Breton', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('btk', oils_i18n_gettext('btk', 'Batak', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bua', oils_i18n_gettext('bua', 'Buriat', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bug', oils_i18n_gettext('bug', 'Bugis', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bul', oils_i18n_gettext('bul', 'Bulgarian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('bur', oils_i18n_gettext('bur', 'Burmese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cad', oils_i18n_gettext('cad', 'Caddo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cai', oils_i18n_gettext('cai', 'Central American Indian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-cam', oils_i18n_gettext('-cam', 'Khmer', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('car', oils_i18n_gettext('car', 'Carib', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cat', oils_i18n_gettext('cat', 'Catalan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cau', oils_i18n_gettext('cau', 'Caucasian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ceb', oils_i18n_gettext('ceb', 'Cebuano', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cel', oils_i18n_gettext('cel', 'Celtic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cha', oils_i18n_gettext('cha', 'Chamorro', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chb', oils_i18n_gettext('chb', 'Chibcha', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('che', oils_i18n_gettext('che', 'Chechen', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chg', oils_i18n_gettext('chg', 'Chagatai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chi', oils_i18n_gettext('chi', 'Chinese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chk', oils_i18n_gettext('chk', 'Truk', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chm', oils_i18n_gettext('chm', 'Mari', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chn', oils_i18n_gettext('chn', 'Chinook jargon', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cho', oils_i18n_gettext('cho', 'Choctaw', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chp', oils_i18n_gettext('chp', 'Chipewyan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chr', oils_i18n_gettext('chr', 'Cherokee', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chu', oils_i18n_gettext('chu', 'Church Slavic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chv', oils_i18n_gettext('chv', 'Chuvash', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('chy', oils_i18n_gettext('chy', 'Cheyenne', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cmc', oils_i18n_gettext('cmc', 'Chamic languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cop', oils_i18n_gettext('cop', 'Coptic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cor', oils_i18n_gettext('cor', 'Cornish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cos', oils_i18n_gettext('cos', 'Corsican', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cpe', oils_i18n_gettext('cpe', 'Creoles and Pidgins, English-based (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cpf', oils_i18n_gettext('cpf', 'Creoles and Pidgins, French-based (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cpp', oils_i18n_gettext('cpp', 'Creoles and Pidgins, Portuguese-based (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cre', oils_i18n_gettext('cre', 'Cree', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('crh', oils_i18n_gettext('crh', 'Crimean Tatar', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('crp', oils_i18n_gettext('crp', 'Creoles and Pidgins (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cus', oils_i18n_gettext('cus', 'Cushitic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('cze', oils_i18n_gettext('cze', 'Czech', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dak', oils_i18n_gettext('dak', 'Dakota', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dan', oils_i18n_gettext('dan', 'Danish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dar', oils_i18n_gettext('dar', 'Dargwa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('day', oils_i18n_gettext('day', 'Dayak', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('del', oils_i18n_gettext('del', 'Delaware', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('den', oils_i18n_gettext('den', 'Slave', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dgr', oils_i18n_gettext('dgr', 'Dogrib', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('din', oils_i18n_gettext('din', 'Dinka', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('div', oils_i18n_gettext('div', 'Divehi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('doi', oils_i18n_gettext('doi', 'Dogri', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dra', oils_i18n_gettext('dra', 'Dravidian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dua', oils_i18n_gettext('dua', 'Duala', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dum', oils_i18n_gettext('dum', 'Dutch, Middle (ca. 1050-1350)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dut', oils_i18n_gettext('dut', 'Dutch', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dyu', oils_i18n_gettext('dyu', 'Dyula', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('dzo', oils_i18n_gettext('dzo', 'Dzongkha', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('efi', oils_i18n_gettext('efi', 'Efik', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('egy', oils_i18n_gettext('egy', 'Egyptian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('eka', oils_i18n_gettext('eka', 'Ekajuk', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('elx', oils_i18n_gettext('elx', 'Elamite', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('eng', oils_i18n_gettext('eng', 'English', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('enm', oils_i18n_gettext('enm', 'English, Middle (1100-1500)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('epo', oils_i18n_gettext('epo', 'Esperanto', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-esk', oils_i18n_gettext('-esk', 'Eskimo languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-esp', oils_i18n_gettext('-esp', 'Esperanto', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('est', oils_i18n_gettext('est', 'Estonian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-eth', oils_i18n_gettext('-eth', 'Ethiopic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ewe', oils_i18n_gettext('ewe', 'Ewe', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ewo', oils_i18n_gettext('ewo', 'Ewondo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fan', oils_i18n_gettext('fan', 'Fang', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fao', oils_i18n_gettext('fao', 'Faroese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-far', oils_i18n_gettext('-far', 'Faroese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fat', oils_i18n_gettext('fat', 'Fanti', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fij', oils_i18n_gettext('fij', 'Fijian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fin', oils_i18n_gettext('fin', 'Finnish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fiu', oils_i18n_gettext('fiu', 'Finno-Ugrian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fon', oils_i18n_gettext('fon', 'Fon', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fre', oils_i18n_gettext('fre', 'French', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-fri', oils_i18n_gettext('-fri', 'Frisian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('frm', oils_i18n_gettext('frm', 'French, Middle (ca. 1400-1600)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fro', oils_i18n_gettext('fro', 'French, Old (ca. 842-1400)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fry', oils_i18n_gettext('fry', 'Frisian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ful', oils_i18n_gettext('ful', 'Fula', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('fur', oils_i18n_gettext('fur', 'Friulian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gaa', oils_i18n_gettext('gaa', 'Gã', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-gae', oils_i18n_gettext('-gae', 'Scottish Gaelic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-gag', oils_i18n_gettext('-gag', 'Galician', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-gal', oils_i18n_gettext('-gal', 'Oromo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gay', oils_i18n_gettext('gay', 'Gayo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gba', oils_i18n_gettext('gba', 'Gbaya', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gem', oils_i18n_gettext('gem', 'Germanic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('geo', oils_i18n_gettext('geo', 'Georgian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ger', oils_i18n_gettext('ger', 'German', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gez', oils_i18n_gettext('gez', 'Ethiopic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gil', oils_i18n_gettext('gil', 'Gilbertese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gla', oils_i18n_gettext('gla', 'Scottish Gaelic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gle', oils_i18n_gettext('gle', 'Irish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('glg', oils_i18n_gettext('glg', 'Galician', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('glv', oils_i18n_gettext('glv', 'Manx', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gmh', oils_i18n_gettext('gmh', 'German, Middle High (ca. 1050-1500)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('goh', oils_i18n_gettext('goh', 'German, Old High (ca. 750-1050)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gon', oils_i18n_gettext('gon', 'Gondi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gor', oils_i18n_gettext('gor', 'Gorontalo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('got', oils_i18n_gettext('got', 'Gothic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('grb', oils_i18n_gettext('grb', 'Grebo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('grc', oils_i18n_gettext('grc', 'Greek, Ancient (to 1453)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gre', oils_i18n_gettext('gre', 'Greek, Modern (1453- )', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('grn', oils_i18n_gettext('grn', 'Guarani', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-gua', oils_i18n_gettext('-gua', 'Guarani', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('guj', oils_i18n_gettext('guj', 'Gujarati', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('gwi', oils_i18n_gettext('gwi', 'Gwich', 'clm', 'value''in'));
-INSERT INTO config.language_map (code, value) VALUES ('hai', oils_i18n_gettext('hai', 'Haida', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hat', oils_i18n_gettext('hat', 'Haitian French Creole', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hau', oils_i18n_gettext('hau', 'Hausa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('haw', oils_i18n_gettext('haw', 'Hawaiian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('heb', oils_i18n_gettext('heb', 'Hebrew', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('her', oils_i18n_gettext('her', 'Herero', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hil', oils_i18n_gettext('hil', 'Hiligaynon', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('him', oils_i18n_gettext('him', 'Himachali', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hin', oils_i18n_gettext('hin', 'Hindi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hit', oils_i18n_gettext('hit', 'Hittite', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hmn', oils_i18n_gettext('hmn', 'Hmong', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hmo', oils_i18n_gettext('hmo', 'Hiri Motu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hun', oils_i18n_gettext('hun', 'Hungarian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('hup', oils_i18n_gettext('hup', 'Hupa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('iba', oils_i18n_gettext('iba', 'Iban', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ibo', oils_i18n_gettext('ibo', 'Igbo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ice', oils_i18n_gettext('ice', 'Icelandic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ido', oils_i18n_gettext('ido', 'Ido', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('iii', oils_i18n_gettext('iii', 'Sichuan Yi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ijo', oils_i18n_gettext('ijo', 'Ijo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('iku', oils_i18n_gettext('iku', 'Inuktitut', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ile', oils_i18n_gettext('ile', 'Interlingue', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ilo', oils_i18n_gettext('ilo', 'Iloko', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ina', oils_i18n_gettext('ina', 'Interlingua (International Auxiliary Language Association)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('inc', oils_i18n_gettext('inc', 'Indic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ind', oils_i18n_gettext('ind', 'Indonesian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ine', oils_i18n_gettext('ine', 'Indo-European (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('inh', oils_i18n_gettext('inh', 'Ingush', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-int', oils_i18n_gettext('-int', 'Interlingua (International Auxiliary Language Association)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ipk', oils_i18n_gettext('ipk', 'Inupiaq', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ira', oils_i18n_gettext('ira', 'Iranian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-iri', oils_i18n_gettext('-iri', 'Irish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('iro', oils_i18n_gettext('iro', 'Iroquoian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ita', oils_i18n_gettext('ita', 'Italian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('jav', oils_i18n_gettext('jav', 'Javanese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('jpn', oils_i18n_gettext('jpn', 'Japanese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('jpr', oils_i18n_gettext('jpr', 'Judeo-Persian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('jrb', oils_i18n_gettext('jrb', 'Judeo-Arabic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kaa', oils_i18n_gettext('kaa', 'Kara-Kalpak', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kab', oils_i18n_gettext('kab', 'Kabyle', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kac', oils_i18n_gettext('kac', 'Kachin', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kal', oils_i18n_gettext('kal', 'Kalâtdlisut', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kam', oils_i18n_gettext('kam', 'Kamba', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kan', oils_i18n_gettext('kan', 'Kannada', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kar', oils_i18n_gettext('kar', 'Karen', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kas', oils_i18n_gettext('kas', 'Kashmiri', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kau', oils_i18n_gettext('kau', 'Kanuri', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kaw', oils_i18n_gettext('kaw', 'Kawi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kaz', oils_i18n_gettext('kaz', 'Kazakh', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kbd', oils_i18n_gettext('kbd', 'Kabardian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kha', oils_i18n_gettext('kha', 'Khasi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('khi', oils_i18n_gettext('khi', 'Khoisan (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('khm', oils_i18n_gettext('khm', 'Khmer', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kho', oils_i18n_gettext('kho', 'Khotanese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kik', oils_i18n_gettext('kik', 'Kikuyu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kin', oils_i18n_gettext('kin', 'Kinyarwanda', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kir', oils_i18n_gettext('kir', 'Kyrgyz', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kmb', oils_i18n_gettext('kmb', 'Kimbundu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kok', oils_i18n_gettext('kok', 'Konkani', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kom', oils_i18n_gettext('kom', 'Komi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kon', oils_i18n_gettext('kon', 'Kongo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kor', oils_i18n_gettext('kor', 'Korean', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kos', oils_i18n_gettext('kos', 'Kusaie', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kpe', oils_i18n_gettext('kpe', 'Kpelle', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kro', oils_i18n_gettext('kro', 'Kru', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kru', oils_i18n_gettext('kru', 'Kurukh', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kua', oils_i18n_gettext('kua', 'Kuanyama', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kum', oils_i18n_gettext('kum', 'Kumyk', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kur', oils_i18n_gettext('kur', 'Kurdish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-kus', oils_i18n_gettext('-kus', 'Kusaie', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('kut', oils_i18n_gettext('kut', 'Kutenai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lad', oils_i18n_gettext('lad', 'Ladino', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lah', oils_i18n_gettext('lah', 'Lahnda', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lam', oils_i18n_gettext('lam', 'Lamba', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-lan', oils_i18n_gettext('-lan', 'Occitan (post-1500)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lao', oils_i18n_gettext('lao', 'Lao', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-lap', oils_i18n_gettext('-lap', 'Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lat', oils_i18n_gettext('lat', 'Latin', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lav', oils_i18n_gettext('lav', 'Latvian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lez', oils_i18n_gettext('lez', 'Lezgian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lim', oils_i18n_gettext('lim', 'Limburgish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lin', oils_i18n_gettext('lin', 'Lingala', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lit', oils_i18n_gettext('lit', 'Lithuanian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lol', oils_i18n_gettext('lol', 'Mongo-Nkundu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('loz', oils_i18n_gettext('loz', 'Lozi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ltz', oils_i18n_gettext('ltz', 'Letzeburgesch', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lua', oils_i18n_gettext('lua', 'Luba-Lulua', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lub', oils_i18n_gettext('lub', 'Luba-Katanga', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lug', oils_i18n_gettext('lug', 'Ganda', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lui', oils_i18n_gettext('lui', 'Luiseño', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lun', oils_i18n_gettext('lun', 'Lunda', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('luo', oils_i18n_gettext('luo', 'Luo (Kenya and Tanzania)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('lus', oils_i18n_gettext('lus', 'Lushai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mac', oils_i18n_gettext('mac', 'Macedonian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mad', oils_i18n_gettext('mad', 'Madurese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mag', oils_i18n_gettext('mag', 'Magahi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mah', oils_i18n_gettext('mah', 'Marshallese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mai', oils_i18n_gettext('mai', 'Maithili', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mak', oils_i18n_gettext('mak', 'Makasar', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mal', oils_i18n_gettext('mal', 'Malayalam', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('man', oils_i18n_gettext('man', 'Mandingo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mao', oils_i18n_gettext('mao', 'Maori', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('map', oils_i18n_gettext('map', 'Austronesian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mar', oils_i18n_gettext('mar', 'Marathi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mas', oils_i18n_gettext('mas', 'Masai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-max', oils_i18n_gettext('-max', 'Manx', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('may', oils_i18n_gettext('may', 'Malay', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mdr', oils_i18n_gettext('mdr', 'Mandar', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('men', oils_i18n_gettext('men', 'Mende', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mga', oils_i18n_gettext('mga', 'Irish, Middle (ca. 1100-1550)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mic', oils_i18n_gettext('mic', 'Micmac', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('min', oils_i18n_gettext('min', 'Minangkabau', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mis', oils_i18n_gettext('mis', 'Miscellaneous languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mkh', oils_i18n_gettext('mkh', 'Mon-Khmer (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-mla', oils_i18n_gettext('-mla', 'Malagasy', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mlg', oils_i18n_gettext('mlg', 'Malagasy', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mlt', oils_i18n_gettext('mlt', 'Maltese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mnc', oils_i18n_gettext('mnc', 'Manchu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mni', oils_i18n_gettext('mni', 'Manipuri', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mno', oils_i18n_gettext('mno', 'Manobo languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('moh', oils_i18n_gettext('moh', 'Mohawk', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mol', oils_i18n_gettext('mol', 'Moldavian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mon', oils_i18n_gettext('mon', 'Mongolian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mos', oils_i18n_gettext('mos', 'Mooré', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mul', oils_i18n_gettext('mul', 'Multiple languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mun', oils_i18n_gettext('mun', 'Munda (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mus', oils_i18n_gettext('mus', 'Creek', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('mwr', oils_i18n_gettext('mwr', 'Marwari', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('myn', oils_i18n_gettext('myn', 'Mayan languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nah', oils_i18n_gettext('nah', 'Nahuatl', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nai', oils_i18n_gettext('nai', 'North American Indian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nap', oils_i18n_gettext('nap', 'Neapolitan Italian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nau', oils_i18n_gettext('nau', 'Nauru', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nav', oils_i18n_gettext('nav', 'Navajo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nbl', oils_i18n_gettext('nbl', 'Ndebele (South Africa)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nde', oils_i18n_gettext('nde', 'Ndebele (Zimbabwe) ', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ndo', oils_i18n_gettext('ndo', 'Ndonga', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nds', oils_i18n_gettext('nds', 'Low German', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nep', oils_i18n_gettext('nep', 'Nepali', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('new', oils_i18n_gettext('new', 'Newari', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nia', oils_i18n_gettext('nia', 'Nias', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nic', oils_i18n_gettext('nic', 'Niger-Kordofanian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('niu', oils_i18n_gettext('niu', 'Niuean', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nno', oils_i18n_gettext('nno', 'Norwegian (Nynorsk)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nob', oils_i18n_gettext('nob', 'Norwegian (Bokmål)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nog', oils_i18n_gettext('nog', 'Nogai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('non', oils_i18n_gettext('non', 'Old Norse', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nor', oils_i18n_gettext('nor', 'Norwegian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nso', oils_i18n_gettext('nso', 'Northern Sotho', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nub', oils_i18n_gettext('nub', 'Nubian languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nya', oils_i18n_gettext('nya', 'Nyanja', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nym', oils_i18n_gettext('nym', 'Nyamwezi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nyn', oils_i18n_gettext('nyn', 'Nyankole', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nyo', oils_i18n_gettext('nyo', 'Nyoro', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('nzi', oils_i18n_gettext('nzi', 'Nzima', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('oci', oils_i18n_gettext('oci', 'Occitan (post-1500)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('oji', oils_i18n_gettext('oji', 'Ojibwa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ori', oils_i18n_gettext('ori', 'Oriya', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('orm', oils_i18n_gettext('orm', 'Oromo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('osa', oils_i18n_gettext('osa', 'Osage', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('oss', oils_i18n_gettext('oss', 'Ossetic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ota', oils_i18n_gettext('ota', 'Turkish, Ottoman', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('oto', oils_i18n_gettext('oto', 'Otomian languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('paa', oils_i18n_gettext('paa', 'Papuan (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pag', oils_i18n_gettext('pag', 'Pangasinan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pal', oils_i18n_gettext('pal', 'Pahlavi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pam', oils_i18n_gettext('pam', 'Pampanga', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pan', oils_i18n_gettext('pan', 'Panjabi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pap', oils_i18n_gettext('pap', 'Papiamento', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pau', oils_i18n_gettext('pau', 'Palauan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('peo', oils_i18n_gettext('peo', 'Old Persian (ca. 600-400 B.C.)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('per', oils_i18n_gettext('per', 'Persian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('phi', oils_i18n_gettext('phi', 'Philippine (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('phn', oils_i18n_gettext('phn', 'Phoenician', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pli', oils_i18n_gettext('pli', 'Pali', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pol', oils_i18n_gettext('pol', 'Polish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pon', oils_i18n_gettext('pon', 'Ponape', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('por', oils_i18n_gettext('por', 'Portuguese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pra', oils_i18n_gettext('pra', 'Prakrit languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pro', oils_i18n_gettext('pro', 'Provençal (to 1500)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('pus', oils_i18n_gettext('pus', 'Pushto', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('que', oils_i18n_gettext('que', 'Quechua', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('raj', oils_i18n_gettext('raj', 'Rajasthani', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('rap', oils_i18n_gettext('rap', 'Rapanui', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('rar', oils_i18n_gettext('rar', 'Rarotongan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('roa', oils_i18n_gettext('roa', 'Romance (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('roh', oils_i18n_gettext('roh', 'Raeto-Romance', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('rom', oils_i18n_gettext('rom', 'Romani', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('rum', oils_i18n_gettext('rum', 'Romanian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('run', oils_i18n_gettext('run', 'Rundi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('rus', oils_i18n_gettext('rus', 'Russian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sad', oils_i18n_gettext('sad', 'Sandawe', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sag', oils_i18n_gettext('sag', 'Sango (Ubangi Creole)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sah', oils_i18n_gettext('sah', 'Yakut', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sai', oils_i18n_gettext('sai', 'South American Indian (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sal', oils_i18n_gettext('sal', 'Salishan languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sam', oils_i18n_gettext('sam', 'Samaritan Aramaic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('san', oils_i18n_gettext('san', 'Sanskrit', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-sao', oils_i18n_gettext('-sao', 'Samoan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sas', oils_i18n_gettext('sas', 'Sasak', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sat', oils_i18n_gettext('sat', 'Santali', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('scc', oils_i18n_gettext('scc', 'Serbian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sco', oils_i18n_gettext('sco', 'Scots', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('scr', oils_i18n_gettext('scr', 'Croatian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sel', oils_i18n_gettext('sel', 'Selkup', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sem', oils_i18n_gettext('sem', 'Semitic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sga', oils_i18n_gettext('sga', 'Irish, Old (to 1100)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sgn', oils_i18n_gettext('sgn', 'Sign languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('shn', oils_i18n_gettext('shn', 'Shan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-sho', oils_i18n_gettext('-sho', 'Shona', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sid', oils_i18n_gettext('sid', 'Sidamo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sin', oils_i18n_gettext('sin', 'Sinhalese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sio', oils_i18n_gettext('sio', 'Siouan (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sit', oils_i18n_gettext('sit', 'Sino-Tibetan (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sla', oils_i18n_gettext('sla', 'Slavic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('slo', oils_i18n_gettext('slo', 'Slovak', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('slv', oils_i18n_gettext('slv', 'Slovenian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sma', oils_i18n_gettext('sma', 'Southern Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sme', oils_i18n_gettext('sme', 'Northern Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('smi', oils_i18n_gettext('smi', 'Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('smj', oils_i18n_gettext('smj', 'Lule Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('smn', oils_i18n_gettext('smn', 'Inari Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('smo', oils_i18n_gettext('smo', 'Samoan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sms', oils_i18n_gettext('sms', 'Skolt Sami', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sna', oils_i18n_gettext('sna', 'Shona', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('snd', oils_i18n_gettext('snd', 'Sindhi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-snh', oils_i18n_gettext('-snh', 'Sinhalese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('snk', oils_i18n_gettext('snk', 'Soninke', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sog', oils_i18n_gettext('sog', 'Sogdian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('som', oils_i18n_gettext('som', 'Somali', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('son', oils_i18n_gettext('son', 'Songhai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sot', oils_i18n_gettext('sot', 'Sotho', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('spa', oils_i18n_gettext('spa', 'Spanish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('srd', oils_i18n_gettext('srd', 'Sardinian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('srr', oils_i18n_gettext('srr', 'Serer', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ssa', oils_i18n_gettext('ssa', 'Nilo-Saharan (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-sso', oils_i18n_gettext('-sso', 'Sotho', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ssw', oils_i18n_gettext('ssw', 'Swazi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('suk', oils_i18n_gettext('suk', 'Sukuma', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sun', oils_i18n_gettext('sun', 'Sundanese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sus', oils_i18n_gettext('sus', 'Susu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('sux', oils_i18n_gettext('sux', 'Sumerian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('swa', oils_i18n_gettext('swa', 'Swahili', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('swe', oils_i18n_gettext('swe', 'Swedish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-swz', oils_i18n_gettext('-swz', 'Swazi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('syr', oils_i18n_gettext('syr', 'Syriac', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-tag', oils_i18n_gettext('-tag', 'Tagalog', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tah', oils_i18n_gettext('tah', 'Tahitian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tai', oils_i18n_gettext('tai', 'Tai (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-taj', oils_i18n_gettext('-taj', 'Tajik', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tam', oils_i18n_gettext('tam', 'Tamil', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-tar', oils_i18n_gettext('-tar', 'Tatar', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tat', oils_i18n_gettext('tat', 'Tatar', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tel', oils_i18n_gettext('tel', 'Telugu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tem', oils_i18n_gettext('tem', 'Temne', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ter', oils_i18n_gettext('ter', 'Terena', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tet', oils_i18n_gettext('tet', 'Tetum', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tgk', oils_i18n_gettext('tgk', 'Tajik', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tgl', oils_i18n_gettext('tgl', 'Tagalog', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tha', oils_i18n_gettext('tha', 'Thai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tib', oils_i18n_gettext('tib', 'Tibetan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tig', oils_i18n_gettext('tig', 'Tigré', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tir', oils_i18n_gettext('tir', 'Tigrinya', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tiv', oils_i18n_gettext('tiv', 'Tiv', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tkl', oils_i18n_gettext('tkl', 'Tokelauan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tli', oils_i18n_gettext('tli', 'Tlingit', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tmh', oils_i18n_gettext('tmh', 'Tamashek', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tog', oils_i18n_gettext('tog', 'Tonga (Nyasa)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ton', oils_i18n_gettext('ton', 'Tongan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tpi', oils_i18n_gettext('tpi', 'Tok Pisin', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-tru', oils_i18n_gettext('-tru', 'Truk', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tsi', oils_i18n_gettext('tsi', 'Tsimshian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tsn', oils_i18n_gettext('tsn', 'Tswana', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tso', oils_i18n_gettext('tso', 'Tsonga', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('-tsw', oils_i18n_gettext('-tsw', 'Tswana', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tuk', oils_i18n_gettext('tuk', 'Turkmen', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tum', oils_i18n_gettext('tum', 'Tumbuka', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tup', oils_i18n_gettext('tup', 'Tupi languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tur', oils_i18n_gettext('tur', 'Turkish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tut', oils_i18n_gettext('tut', 'Altaic (Other)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tvl', oils_i18n_gettext('tvl', 'Tuvaluan', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('twi', oils_i18n_gettext('twi', 'Twi', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('tyv', oils_i18n_gettext('tyv', 'Tuvinian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('udm', oils_i18n_gettext('udm', 'Udmurt', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('uga', oils_i18n_gettext('uga', 'Ugaritic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('uig', oils_i18n_gettext('uig', 'Uighur', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ukr', oils_i18n_gettext('ukr', 'Ukrainian', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('umb', oils_i18n_gettext('umb', 'Umbundu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('und', oils_i18n_gettext('und', 'Undetermined', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('urd', oils_i18n_gettext('urd', 'Urdu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('uzb', oils_i18n_gettext('uzb', 'Uzbek', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('vai', oils_i18n_gettext('vai', 'Vai', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ven', oils_i18n_gettext('ven', 'Venda', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('vie', oils_i18n_gettext('vie', 'Vietnamese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('vol', oils_i18n_gettext('vol', 'Volapük', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('vot', oils_i18n_gettext('vot', 'Votic', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('wak', oils_i18n_gettext('wak', 'Wakashan languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('wal', oils_i18n_gettext('wal', 'Walamo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('war', oils_i18n_gettext('war', 'Waray', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('was', oils_i18n_gettext('was', 'Washo', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('wel', oils_i18n_gettext('wel', 'Welsh', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('wen', oils_i18n_gettext('wen', 'Sorbian languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('wln', oils_i18n_gettext('wln', 'Walloon', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('wol', oils_i18n_gettext('wol', 'Wolof', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('xal', oils_i18n_gettext('xal', 'Kalmyk', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('xho', oils_i18n_gettext('xho', 'Xhosa', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('yao', oils_i18n_gettext('yao', 'Yao (Africa)', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('yap', oils_i18n_gettext('yap', 'Yapese', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('yid', oils_i18n_gettext('yid', 'Yiddish', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('yor', oils_i18n_gettext('yor', 'Yoruba', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('ypk', oils_i18n_gettext('ypk', 'Yupik languages', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('zap', oils_i18n_gettext('zap', 'Zapotec', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('zen', oils_i18n_gettext('zen', 'Zenaga', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('zha', oils_i18n_gettext('zha', 'Zhuang', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('znd', oils_i18n_gettext('znd', 'Zande', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('zul', oils_i18n_gettext('zul', 'Zulu', 'clm', 'value'));
-INSERT INTO config.language_map (code, value) VALUES ('zun', oils_i18n_gettext('zun', 'Zuni', 'clm', 'value'));
-
-INSERT INTO config.item_form_map (code, value) VALUES ('a', oils_i18n_gettext('a', 'Microfilm', 'cifm', 'value'));
-INSERT INTO config.item_form_map (code, value) VALUES ('b', oils_i18n_gettext('b', 'Microfiche', 'cifm', 'value'));
-INSERT INTO config.item_form_map (code, value) VALUES ('c', oils_i18n_gettext('c', 'Microopaque', 'cifm', 'value'));
-INSERT INTO config.item_form_map (code, value) VALUES ('d', oils_i18n_gettext('d', 'Large print', 'cifm', 'value'));
-INSERT INTO config.item_form_map (code, value) VALUES ('f', oils_i18n_gettext('f', 'Braille', 'cifm', 'value'));
-INSERT INTO config.item_form_map (code, value) VALUES ('r', oils_i18n_gettext('r', 'Regular print reproduction', 'cifm', 'value'));
-INSERT INTO config.item_form_map (code, value) VALUES ('s', oils_i18n_gettext('s', 'Electronic', 'cifm', 'value'));
-
-INSERT INTO config.item_type_map (code, value) VALUES ('a', oils_i18n_gettext('a', 'Language material', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('t', oils_i18n_gettext('t', 'Manuscript language material', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('g', oils_i18n_gettext('g', 'Projected medium', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('k', oils_i18n_gettext('k', 'Two-dimensional nonprojectable graphic', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('r', oils_i18n_gettext('r', 'Three-dimensional artifact or naturally occurring object', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('o', oils_i18n_gettext('o', 'Kit', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('p', oils_i18n_gettext('p', 'Mixed materials', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('e', oils_i18n_gettext('e', 'Cartographic material', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('f', oils_i18n_gettext('f', 'Manuscript cartographic material', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('c', oils_i18n_gettext('c', 'Notated music', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('d', oils_i18n_gettext('d', 'Manuscript notated music', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('i', oils_i18n_gettext('i', 'Nonmusical sound recording', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('j', oils_i18n_gettext('j', 'Musical sound recording', 'citm', 'value'));
-INSERT INTO config.item_type_map (code, value) VALUES ('m', oils_i18n_gettext('m', 'Computer file', 'citm', 'value'));
-
-INSERT INTO config.bib_level_map (code, value) VALUES ('a', oils_i18n_gettext('a', 'Monographic component part', 'cblvl', 'value'));
-INSERT INTO config.bib_level_map (code, value) VALUES ('b', oils_i18n_gettext('b', 'Serial component part', 'cblvl', 'value'));
-INSERT INTO config.bib_level_map (code, value) VALUES ('c', oils_i18n_gettext('c', 'Collection', 'cblvl', 'value'));
-INSERT INTO config.bib_level_map (code, value) VALUES ('d', oils_i18n_gettext('d', 'Subunit', 'cblvl', 'value'));
-INSERT INTO config.bib_level_map (code, value) VALUES ('i', oils_i18n_gettext('i', 'Integrating resource', 'cblvl', 'value'));
-INSERT INTO config.bib_level_map (code, value) VALUES ('m', oils_i18n_gettext('m', 'Monograph/Item', 'cblvl', 'value'));
-INSERT INTO config.bib_level_map (code, value) VALUES ('s', oils_i18n_gettext('s', 'Serial', 'cblvl', 'value'));
-
-- available locales
INSERT INTO config.i18n_locale (code,marc_code,name,description)
VALUES ('en-US', 'eng', oils_i18n_gettext('en-US', 'English (US)', 'i18n_l', 'name'),
'interval'
);
+-- 0XXX.patron_registration.sql
+INSERT into config.org_unit_setting_type
+( name, label, description, datatype ) VALUES
+
+( 'ui.patron.edit.au.active.show',
+ oils_i18n_gettext('ui.patron.edit.au.active.show', 'GUI: Show active field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.active.show', 'The active field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.active.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.active.suggest', 'GUI: Suggest active field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.active.suggest', 'The active field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.alert_message.show',
+ oils_i18n_gettext('ui.patron.edit.au.alert_message.show', 'GUI: Show alert_message field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.alert_message.show', 'The alert_message field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.alert_message.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.alert_message.suggest', 'GUI: Suggest alert_message field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.alert_message.suggest', 'The alert_message field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.alias.show',
+ oils_i18n_gettext('ui.patron.edit.au.alias.show', 'GUI: Show alias field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.alias.show', 'The alias field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.alias.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.alias.suggest', 'GUI: Suggest alias field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.alias.suggest', 'The alias field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.barred.show',
+ oils_i18n_gettext('ui.patron.edit.au.barred.show', 'GUI: Show barred field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.barred.show', 'The barred field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.barred.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.barred.suggest', 'GUI: Suggest barred field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.barred.suggest', 'The barred field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.claims_never_checked_out_count.show',
+ oils_i18n_gettext('ui.patron.edit.au.claims_never_checked_out_count.show', 'GUI: Show claims_never_checked_out_count field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.claims_never_checked_out_count.show', 'The claims_never_checked_out_count field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.claims_never_checked_out_count.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.claims_never_checked_out_count.suggest', 'GUI: Suggest claims_never_checked_out_count field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.claims_never_checked_out_count.suggest', 'The claims_never_checked_out_count field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.claims_returned_count.show',
+ oils_i18n_gettext('ui.patron.edit.au.claims_returned_count.show', 'GUI: Show claims_returned_count field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.claims_returned_count.show', 'The claims_returned_count field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.claims_returned_count.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.claims_returned_count.suggest', 'GUI: Suggest claims_returned_count field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.claims_returned_count.suggest', 'The claims_returned_count field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.day_phone.example',
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.example', 'GUI: Example for day_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.example', 'The Example for validation on the day_phone field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.day_phone.regex',
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.regex', 'GUI: Regex for day_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.regex', 'The Regular Expression for validation on the day_phone field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.day_phone.require',
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.require', 'GUI: Require day_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.require', 'The day_phone field will be required on the patron registration screen.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.day_phone.show',
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.show', 'GUI: Show day_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.show', 'The day_phone field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.day_phone.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.suggest', 'GUI: Suggest day_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.day_phone.suggest', 'The day_phone field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.dob.calendar',
+ oils_i18n_gettext('ui.patron.edit.au.dob.calendar', 'GUI: Show calendar widget for dob field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.dob.calendar', 'If set the calendar widget will appear when editing the dob field on the patron registration form.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.dob.require',
+ oils_i18n_gettext('ui.patron.edit.au.dob.require', 'GUI: Require dob field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.dob.require', 'The dob field will be required on the patron registration screen.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.dob.show',
+ oils_i18n_gettext('ui.patron.edit.au.dob.show', 'GUI: Show dob field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.dob.show', 'The dob field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.dob.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.dob.suggest', 'GUI: Suggest dob field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.dob.suggest', 'The dob field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.email.example',
+ oils_i18n_gettext('ui.patron.edit.au.email.example', 'GUI: Example for email field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.email.example', 'The Example for validation on the email field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.email.regex',
+ oils_i18n_gettext('ui.patron.edit.au.email.regex', 'GUI: Regex for email field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.email.regex', 'The Regular Expression for validation on the email field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.email.require',
+ oils_i18n_gettext('ui.patron.edit.au.email.require', 'GUI: Require email field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.email.require', 'The email field will be required on the patron registration screen.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.email.show',
+ oils_i18n_gettext('ui.patron.edit.au.email.show', 'GUI: Show email field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.email.show', 'The email field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.email.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.email.suggest', 'GUI: Suggest email field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.email.suggest', 'The email field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.evening_phone.example',
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.example', 'GUI: Example for evening_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.example', 'The Example for validation on the evening_phone field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.evening_phone.regex',
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.regex', 'GUI: Regex for evening_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.regex', 'The Regular Expression for validation on the evening_phone field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.evening_phone.require',
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.require', 'GUI: Require evening_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.require', 'The evening_phone field will be required on the patron registration screen.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.evening_phone.show',
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.show', 'GUI: Show evening_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.show', 'The evening_phone field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.evening_phone.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.suggest', 'GUI: Suggest evening_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.evening_phone.suggest', 'The evening_phone field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.ident_value.show',
+ oils_i18n_gettext('ui.patron.edit.au.ident_value.show', 'GUI: Show ident_value field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.ident_value.show', 'The ident_value field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.ident_value.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.ident_value.suggest', 'GUI: Suggest ident_value field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.ident_value.suggest', 'The ident_value field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.ident_value2.show',
+ oils_i18n_gettext('ui.patron.edit.au.ident_value2.show', 'GUI: Show ident_value2 field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.ident_value2.show', 'The ident_value2 field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.ident_value2.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.ident_value2.suggest', 'GUI: Suggest ident_value2 field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.ident_value2.suggest', 'The ident_value2 field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.juvenile.show',
+ oils_i18n_gettext('ui.patron.edit.au.juvenile.show', 'GUI: Show juvenile field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.juvenile.show', 'The juvenile field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.juvenile.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.juvenile.suggest', 'GUI: Suggest juvenile field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.juvenile.suggest', 'The juvenile field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.master_account.show',
+ oils_i18n_gettext('ui.patron.edit.au.master_account.show', 'GUI: Show master_account field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.master_account.show', 'The master_account field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.master_account.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.master_account.suggest', 'GUI: Suggest master_account field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.master_account.suggest', 'The master_account field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.other_phone.example',
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.example', 'GUI: Example for other_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.example', 'The Example for validation on the other_phone field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.other_phone.regex',
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.regex', 'GUI: Regex for other_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.regex', 'The Regular Expression for validation on the other_phone field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.au.other_phone.require',
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.require', 'GUI: Require other_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.require', 'The other_phone field will be required on the patron registration screen.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.other_phone.show',
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.show', 'GUI: Show other_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.show', 'The other_phone field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.other_phone.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.suggest', 'GUI: Suggest other_phone field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.other_phone.suggest', 'The other_phone field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.second_given_name.show',
+ oils_i18n_gettext('ui.patron.edit.au.second_given_name.show', 'GUI: Show second_given_name field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.second_given_name.show', 'The second_given_name field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.second_given_name.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.second_given_name.suggest', 'GUI: Suggest second_given_name field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.second_given_name.suggest', 'The second_given_name field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.suffix.show',
+ oils_i18n_gettext('ui.patron.edit.au.suffix.show', 'GUI: Show suffix field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.suffix.show', 'The suffix field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.au.suffix.suggest',
+ oils_i18n_gettext('ui.patron.edit.au.suffix.suggest', 'GUI: Suggest suffix field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.au.suffix.suggest', 'The suffix field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.aua.county.require',
+ oils_i18n_gettext('ui.patron.edit.aua.county.require', 'GUI: Require county field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.aua.county.require', 'The county field will be required on the patron registration screen.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.aua.post_code.example',
+ oils_i18n_gettext('ui.patron.edit.aua.post_code.example', 'GUI: Example for post_code field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.aua.post_code.example', 'The Example for validation on the post_code field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.aua.post_code.regex',
+ oils_i18n_gettext('ui.patron.edit.aua.post_code.regex', 'GUI: Regex for post_code field on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.aua.post_code.regex', 'The Regular Expression for validation on the post_code field in patron registration.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.default_suggested',
+ oils_i18n_gettext('ui.patron.edit.default_suggested', 'GUI: Default showing suggested patron registration fields', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.default_suggested', 'Instead of All fields, show just suggested fields in patron registration by default.', 'coust', 'description'),
+ 'bool'),
+( 'ui.patron.edit.phone.example',
+ oils_i18n_gettext('ui.patron.edit.phone.example', 'GUI: Example for phone fields on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.phone.example', 'The Example for validation on phone fields in patron registration. Applies to all phone fields without their own setting.', 'coust', 'description'),
+ 'string'),
+( 'ui.patron.edit.phone.regex',
+ oils_i18n_gettext('ui.patron.edit.phone.regex', 'GUI: Regex for phone fields on patron registration', 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.phone.regex', 'The Regular Expression for validation on phone fields in patron registration. Applies to all phone fields without their own setting.', 'coust', 'description'),
+ 'string');
+
-- *** Has to go below coust definition to satisfy referential integrity ***
-- In booking, elbow room defines:
-- a) how far in the future you must make a reservation on a given item if
INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Type', 'ldr', 'SER', 6, 1, 'a');
INSERT INTO config.marc21_ff_pos_map (fixed_field, tag, rec_type,start_pos, length, default_val) VALUES ('Type', 'ldr', 'VIS', 6, 1, 'g');
+-- record attributes
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('alph','Alph','Alph');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('audience','Audn','Audn');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('bib_level','BLvl','BLvl');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('biog','Biog','Biog');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('conf','Conf','Conf');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('control_type','Ctrl','Ctrl');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('ctry','Ctry','Ctry');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('date1','Date1','Date1');
+INSERT INTO config.record_attr_definition (name,label,fixed_field,sorter,filter) values ('pubdate','Pub Date','Date1',TRUE,FALSE);
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('date2','Date2','Date2');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('cat_form','Desc','Desc');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('pub_status','DtSt','DtSt');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('enc_level','ELvl','ELvl');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('fest','Fest','Fest');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('item_form','Form','Form');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('gpub','GPub','GPub');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('ills','Ills','Ills');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('indx','Indx','Indx');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('item_lang','Lang','Lang');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('lit_form','LitF','LitF');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('mrec','MRec','MRec');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('ff_sl','S/L','S/L');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('type_mat','TMat','TMat');
+INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('item_type','Type','Type');
+INSERT INTO config.record_attr_definition (name,label,phys_char_sf) values ('vr_format','Videorecording format',72);
+INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag) values ('titlesort','Title',TRUE,FALSE,'tnf');
+INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag) values ('authorsort','Author',TRUE,FALSE,'1%');
+
+-- TO-DO: Auto-generate these values from CLDR
+-- XXX These are the values used in MARC records ... does that match CLDR, including deprecated languages?
+INSERT INTO config.coded_value_map (id, ctype, code, value) VALUES
+ (1, 'item_lang', 'aar', oils_i18n_gettext('aar', 'Afar', 'ccvm', 'value')),
+ (2, 'item_lang', 'abk', oils_i18n_gettext('abk', 'Abkhaz', 'ccvm', 'value')),
+ (3, 'item_lang', 'ace', oils_i18n_gettext('ace', 'Achinese', 'ccvm', 'value')),
+ (4, 'item_lang', 'ach', oils_i18n_gettext('ach', 'Acoli', 'ccvm', 'value')),
+ (5, 'item_lang', 'ada', oils_i18n_gettext('ada', 'Adangme', 'ccvm', 'value')),
+ (6, 'item_lang', 'ady', oils_i18n_gettext('ady', 'Adygei', 'ccvm', 'value')),
+ (7, 'item_lang', 'afa', oils_i18n_gettext('afa', 'Afroasiatic (Other)', 'ccvm', 'value')),
+ (8, 'item_lang', 'afh', oils_i18n_gettext('afh', 'Afrihili (Artificial language)', 'ccvm', 'value')),
+ (9, 'item_lang', 'afr', oils_i18n_gettext('afr', 'Afrikaans', 'ccvm', 'value')),
+ (10, 'item_lang', '-ajm', oils_i18n_gettext('-ajm', 'AljamÃa', 'ccvm', 'value')),
+ (11, 'item_lang', 'aka', oils_i18n_gettext('aka', 'Akan', 'ccvm', 'value')),
+ (12, 'item_lang', 'akk', oils_i18n_gettext('akk', 'Akkadian', 'ccvm', 'value')),
+ (13, 'item_lang', 'alb', oils_i18n_gettext('alb', 'Albanian', 'ccvm', 'value')),
+ (14, 'item_lang', 'ale', oils_i18n_gettext('ale', 'Aleut', 'ccvm', 'value')),
+ (15, 'item_lang', 'alg', oils_i18n_gettext('alg', 'Algonquian (Other)', 'ccvm', 'value')),
+ (16, 'item_lang', 'amh', oils_i18n_gettext('amh', 'Amharic', 'ccvm', 'value')),
+ (17, 'item_lang', 'ang', oils_i18n_gettext('ang', 'English, Old (ca. 450-1100)', 'ccvm', 'value')),
+ (18, 'item_lang', 'apa', oils_i18n_gettext('apa', 'Apache languages', 'ccvm', 'value')),
+ (19, 'item_lang', 'ara', oils_i18n_gettext('ara', 'Arabic', 'ccvm', 'value')),
+ (20, 'item_lang', 'arc', oils_i18n_gettext('arc', 'Aramaic', 'ccvm', 'value')),
+ (21, 'item_lang', 'arg', oils_i18n_gettext('arg', 'Aragonese Spanish', 'ccvm', 'value')),
+ (22, 'item_lang', 'arm', oils_i18n_gettext('arm', 'Armenian', 'ccvm', 'value')),
+ (23, 'item_lang', 'arn', oils_i18n_gettext('arn', 'Mapuche', 'ccvm', 'value')),
+ (24, 'item_lang', 'arp', oils_i18n_gettext('arp', 'Arapaho', 'ccvm', 'value')),
+ (25, 'item_lang', 'art', oils_i18n_gettext('art', 'Artificial (Other)', 'ccvm', 'value')),
+ (26, 'item_lang', 'arw', oils_i18n_gettext('arw', 'Arawak', 'ccvm', 'value')),
+ (27, 'item_lang', 'asm', oils_i18n_gettext('asm', 'Assamese', 'ccvm', 'value')),
+ (28, 'item_lang', 'ast', oils_i18n_gettext('ast', 'Bable', 'ccvm', 'value')),
+ (29, 'item_lang', 'ath', oils_i18n_gettext('ath', 'Athapascan (Other)', 'ccvm', 'value')),
+ (30, 'item_lang', 'aus', oils_i18n_gettext('aus', 'Australian languages', 'ccvm', 'value')),
+ (31, 'item_lang', 'ava', oils_i18n_gettext('ava', 'Avaric', 'ccvm', 'value')),
+ (32, 'item_lang', 'ave', oils_i18n_gettext('ave', 'Avestan', 'ccvm', 'value')),
+ (33, 'item_lang', 'awa', oils_i18n_gettext('awa', 'Awadhi', 'ccvm', 'value')),
+ (34, 'item_lang', 'aym', oils_i18n_gettext('aym', 'Aymara', 'ccvm', 'value')),
+ (35, 'item_lang', 'aze', oils_i18n_gettext('aze', 'Azerbaijani', 'ccvm', 'value')),
+ (36, 'item_lang', 'bad', oils_i18n_gettext('bad', 'Banda', 'ccvm', 'value')),
+ (37, 'item_lang', 'bai', oils_i18n_gettext('bai', 'Bamileke languages', 'ccvm', 'value')),
+ (38, 'item_lang', 'bak', oils_i18n_gettext('bak', 'Bashkir', 'ccvm', 'value')),
+ (39, 'item_lang', 'bal', oils_i18n_gettext('bal', 'Baluchi', 'ccvm', 'value')),
+ (40, 'item_lang', 'bam', oils_i18n_gettext('40', 'Bambara', 'ccvm', 'value')),
+ (41, 'item_lang', 'ban', oils_i18n_gettext('41', 'Balinese', 'ccvm', 'value')),
+ (42, 'item_lang', 'baq', oils_i18n_gettext('42', 'Basque', 'ccvm', 'value')),
+ (43, 'item_lang', 'bas', oils_i18n_gettext('43', 'Basa', 'ccvm', 'value')),
+ (44, 'item_lang', 'bat', oils_i18n_gettext('44', 'Baltic (Other)', 'ccvm', 'value')),
+ (45, 'item_lang', 'bej', oils_i18n_gettext('45', 'Beja', 'ccvm', 'value')),
+ (46, 'item_lang', 'bel', oils_i18n_gettext('46', 'Belarusian', 'ccvm', 'value')),
+ (47, 'item_lang', 'bem', oils_i18n_gettext('47', 'Bemba', 'ccvm', 'value')),
+ (48, 'item_lang', 'ben', oils_i18n_gettext('48', 'Bengali', 'ccvm', 'value')),
+ (49, 'item_lang', 'ber', oils_i18n_gettext('49', 'Berber (Other)', 'ccvm', 'value')),
+ (50, 'item_lang', 'bho', oils_i18n_gettext('50', 'Bhojpuri', 'ccvm', 'value')),
+ (51, 'item_lang', 'bih', oils_i18n_gettext('51', 'Bihari', 'ccvm', 'value')),
+ (52, 'item_lang', 'bik', oils_i18n_gettext('52', 'Bikol', 'ccvm', 'value')),
+ (53, 'item_lang', 'bin', oils_i18n_gettext('53', 'Edo', 'ccvm', 'value')),
+ (54, 'item_lang', 'bis', oils_i18n_gettext('54', 'Bislama', 'ccvm', 'value')),
+ (55, 'item_lang', 'bla', oils_i18n_gettext('55', 'Siksika', 'ccvm', 'value')),
+ (56, 'item_lang', 'bnt', oils_i18n_gettext('56', 'Bantu (Other)', 'ccvm', 'value')),
+ (57, 'item_lang', 'bos', oils_i18n_gettext('57', 'Bosnian', 'ccvm', 'value')),
+ (58, 'item_lang', 'bra', oils_i18n_gettext('58', 'Braj', 'ccvm', 'value')),
+ (59, 'item_lang', 'bre', oils_i18n_gettext('59', 'Breton', 'ccvm', 'value')),
+ (60, 'item_lang', 'btk', oils_i18n_gettext('60', 'Batak', 'ccvm', 'value')),
+ (61, 'item_lang', 'bua', oils_i18n_gettext('61', 'Buriat', 'ccvm', 'value')),
+ (62, 'item_lang', 'bug', oils_i18n_gettext('62', 'Bugis', 'ccvm', 'value')),
+ (63, 'item_lang', 'bul', oils_i18n_gettext('63', 'Bulgarian', 'ccvm', 'value')),
+ (64, 'item_lang', 'bur', oils_i18n_gettext('64', 'Burmese', 'ccvm', 'value')),
+ (65, 'item_lang', 'cad', oils_i18n_gettext('65', 'Caddo', 'ccvm', 'value')),
+ (66, 'item_lang', 'cai', oils_i18n_gettext('66', 'Central American Indian (Other)', 'ccvm', 'value')),
+ (67, 'item_lang', '-cam', oils_i18n_gettext('67', 'Khmer', 'ccvm', 'value')),
+ (68, 'item_lang', 'car', oils_i18n_gettext('68', 'Carib', 'ccvm', 'value')),
+ (69, 'item_lang', 'cat', oils_i18n_gettext('69', 'Catalan', 'ccvm', 'value')),
+ (70, 'item_lang', 'cau', oils_i18n_gettext('70', 'Caucasian (Other)', 'ccvm', 'value')),
+ (71, 'item_lang', 'ceb', oils_i18n_gettext('71', 'Cebuano', 'ccvm', 'value')),
+ (72, 'item_lang', 'cel', oils_i18n_gettext('72', 'Celtic (Other)', 'ccvm', 'value')),
+ (73, 'item_lang', 'cha', oils_i18n_gettext('73', 'Chamorro', 'ccvm', 'value')),
+ (74, 'item_lang', 'chb', oils_i18n_gettext('74', 'Chibcha', 'ccvm', 'value')),
+ (75, 'item_lang', 'che', oils_i18n_gettext('75', 'Chechen', 'ccvm', 'value')),
+ (76, 'item_lang', 'chg', oils_i18n_gettext('76', 'Chagatai', 'ccvm', 'value')),
+ (77, 'item_lang', 'chi', oils_i18n_gettext('77', 'Chinese', 'ccvm', 'value')),
+ (78, 'item_lang', 'chk', oils_i18n_gettext('78', 'Truk', 'ccvm', 'value')),
+ (79, 'item_lang', 'chm', oils_i18n_gettext('79', 'Mari', 'ccvm', 'value')),
+ (80, 'item_lang', 'chn', oils_i18n_gettext('80', 'Chinook jargon', 'ccvm', 'value')),
+ (81, 'item_lang', 'cho', oils_i18n_gettext('81', 'Choctaw', 'ccvm', 'value')),
+ (82, 'item_lang', 'chp', oils_i18n_gettext('82', 'Chipewyan', 'ccvm', 'value')),
+ (83, 'item_lang', 'chr', oils_i18n_gettext('83', 'Cherokee', 'ccvm', 'value')),
+ (84, 'item_lang', 'chu', oils_i18n_gettext('84', 'Church Slavic', 'ccvm', 'value')),
+ (85, 'item_lang', 'chv', oils_i18n_gettext('85', 'Chuvash', 'ccvm', 'value')),
+ (86, 'item_lang', 'chy', oils_i18n_gettext('86', 'Cheyenne', 'ccvm', 'value')),
+ (87, 'item_lang', 'cmc', oils_i18n_gettext('87', 'Chamic languages', 'ccvm', 'value')),
+ (88, 'item_lang', 'cop', oils_i18n_gettext('88', 'Coptic', 'ccvm', 'value')),
+ (89, 'item_lang', 'cor', oils_i18n_gettext('89', 'Cornish', 'ccvm', 'value')),
+ (90, 'item_lang', 'cos', oils_i18n_gettext('90', 'Corsican', 'ccvm', 'value')),
+ (91, 'item_lang', 'cpe', oils_i18n_gettext('91', 'Creoles and Pidgins, English-based (Other)', 'ccvm', 'value')),
+ (92, 'item_lang', 'cpf', oils_i18n_gettext('92', 'Creoles and Pidgins, French-based (Other)', 'ccvm', 'value')),
+ (93, 'item_lang', 'cpp', oils_i18n_gettext('93', 'Creoles and Pidgins, Portuguese-based (Other)', 'ccvm', 'value')),
+ (94, 'item_lang', 'cre', oils_i18n_gettext('94', 'Cree', 'ccvm', 'value')),
+ (95, 'item_lang', 'crh', oils_i18n_gettext('95', 'Crimean Tatar', 'ccvm', 'value')),
+ (96, 'item_lang', 'crp', oils_i18n_gettext('96', 'Creoles and Pidgins (Other)', 'ccvm', 'value')),
+ (97, 'item_lang', 'cus', oils_i18n_gettext('97', 'Cushitic (Other)', 'ccvm', 'value')),
+ (98, 'item_lang', 'cze', oils_i18n_gettext('98', 'Czech', 'ccvm', 'value')),
+ (99, 'item_lang', 'dak', oils_i18n_gettext('99', 'Dakota', 'ccvm', 'value')),
+ (100, 'item_lang', 'dan', oils_i18n_gettext('100', 'Danish', 'ccvm', 'value')),
+ (101, 'item_lang', 'dar', oils_i18n_gettext('101', 'Dargwa', 'ccvm', 'value')),
+ (102, 'item_lang', 'day', oils_i18n_gettext('102', 'Dayak', 'ccvm', 'value')),
+ (103, 'item_lang', 'del', oils_i18n_gettext('103', 'Delaware', 'ccvm', 'value')),
+ (104, 'item_lang', 'den', oils_i18n_gettext('104', 'Slave', 'ccvm', 'value')),
+ (105, 'item_lang', 'dgr', oils_i18n_gettext('105', 'Dogrib', 'ccvm', 'value')),
+ (106, 'item_lang', 'din', oils_i18n_gettext('106', 'Dinka', 'ccvm', 'value')),
+ (107, 'item_lang', 'div', oils_i18n_gettext('107', 'Divehi', 'ccvm', 'value')),
+ (108, 'item_lang', 'doi', oils_i18n_gettext('108', 'Dogri', 'ccvm', 'value')),
+ (109, 'item_lang', 'dra', oils_i18n_gettext('109', 'Dravidian (Other)', 'ccvm', 'value')),
+ (110, 'item_lang', 'dua', oils_i18n_gettext('110', 'Duala', 'ccvm', 'value')),
+ (111, 'item_lang', 'dum', oils_i18n_gettext('111', 'Dutch, Middle (ca. 1050-1350)', 'ccvm', 'value')),
+ (112, 'item_lang', 'dut', oils_i18n_gettext('112', 'Dutch', 'ccvm', 'value')),
+ (113, 'item_lang', 'dyu', oils_i18n_gettext('113', 'Dyula', 'ccvm', 'value')),
+ (114, 'item_lang', 'dzo', oils_i18n_gettext('114', 'Dzongkha', 'ccvm', 'value')),
+ (115, 'item_lang', 'efi', oils_i18n_gettext('115', 'Efik', 'ccvm', 'value')),
+ (116, 'item_lang', 'egy', oils_i18n_gettext('116', 'Egyptian', 'ccvm', 'value')),
+ (117, 'item_lang', 'eka', oils_i18n_gettext('117', 'Ekajuk', 'ccvm', 'value')),
+ (118, 'item_lang', 'elx', oils_i18n_gettext('118', 'Elamite', 'ccvm', 'value')),
+ (119, 'item_lang', 'eng', oils_i18n_gettext('119', 'English', 'ccvm', 'value')),
+ (120, 'item_lang', 'enm', oils_i18n_gettext('120', 'English, Middle (1100-1500)', 'ccvm', 'value')),
+ (121, 'item_lang', 'epo', oils_i18n_gettext('121', 'Esperanto', 'ccvm', 'value')),
+ (122, 'item_lang', '-esk', oils_i18n_gettext('122', 'Eskimo languages', 'ccvm', 'value')),
+ (123, 'item_lang', '-esp', oils_i18n_gettext('123', 'Esperanto', 'ccvm', 'value')),
+ (124, 'item_lang', 'est', oils_i18n_gettext('124', 'Estonian', 'ccvm', 'value')),
+ (125, 'item_lang', '-eth', oils_i18n_gettext('125', 'Ethiopic', 'ccvm', 'value')),
+ (126, 'item_lang', 'ewe', oils_i18n_gettext('126', 'Ewe', 'ccvm', 'value')),
+ (127, 'item_lang', 'ewo', oils_i18n_gettext('127', 'Ewondo', 'ccvm', 'value')),
+ (128, 'item_lang', 'fan', oils_i18n_gettext('128', 'Fang', 'ccvm', 'value')),
+ (129, 'item_lang', 'fao', oils_i18n_gettext('129', 'Faroese', 'ccvm', 'value')),
+ (130, 'item_lang', '-far', oils_i18n_gettext('130', 'Faroese', 'ccvm', 'value')),
+ (131, 'item_lang', 'fat', oils_i18n_gettext('131', 'Fanti', 'ccvm', 'value')),
+ (132, 'item_lang', 'fij', oils_i18n_gettext('132', 'Fijian', 'ccvm', 'value')),
+ (133, 'item_lang', 'fin', oils_i18n_gettext('133', 'Finnish', 'ccvm', 'value')),
+ (134, 'item_lang', 'fiu', oils_i18n_gettext('134', 'Finno-Ugrian (Other)', 'ccvm', 'value')),
+ (135, 'item_lang', 'fon', oils_i18n_gettext('135', 'Fon', 'ccvm', 'value')),
+ (136, 'item_lang', 'fre', oils_i18n_gettext('136', 'French', 'ccvm', 'value')),
+ (137, 'item_lang', '-fri', oils_i18n_gettext('137', 'Frisian', 'ccvm', 'value')),
+ (138, 'item_lang', 'frm', oils_i18n_gettext('138', 'French, Middle (ca. 1400-1600)', 'ccvm', 'value')),
+ (139, 'item_lang', 'fro', oils_i18n_gettext('139', 'French, Old (ca. 842-1400)', 'ccvm', 'value')),
+ (140, 'item_lang', 'fry', oils_i18n_gettext('140', 'Frisian', 'ccvm', 'value')),
+ (141, 'item_lang', 'ful', oils_i18n_gettext('141', 'Fula', 'ccvm', 'value')),
+ (142, 'item_lang', 'fur', oils_i18n_gettext('142', 'Friulian', 'ccvm', 'value')),
+ (143, 'item_lang', 'gaa', oils_i18n_gettext('143', 'Gã', 'ccvm', 'value')),
+ (144, 'item_lang', '-gae', oils_i18n_gettext('144', 'Scottish Gaelic', 'ccvm', 'value')),
+ (145, 'item_lang', '-gag', oils_i18n_gettext('145', 'Galician', 'ccvm', 'value')),
+ (146, 'item_lang', '-gal', oils_i18n_gettext('146', 'Oromo', 'ccvm', 'value')),
+ (147, 'item_lang', 'gay', oils_i18n_gettext('147', 'Gayo', 'ccvm', 'value')),
+ (148, 'item_lang', 'gba', oils_i18n_gettext('148', 'Gbaya', 'ccvm', 'value')),
+ (149, 'item_lang', 'gem', oils_i18n_gettext('149', 'Germanic (Other)', 'ccvm', 'value')),
+ (150, 'item_lang', 'geo', oils_i18n_gettext('150', 'Georgian', 'ccvm', 'value')),
+ (151, 'item_lang', 'ger', oils_i18n_gettext('151', 'German', 'ccvm', 'value')),
+ (152, 'item_lang', 'gez', oils_i18n_gettext('152', 'Ethiopic', 'ccvm', 'value')),
+ (153, 'item_lang', 'gil', oils_i18n_gettext('153', 'Gilbertese', 'ccvm', 'value')),
+ (154, 'item_lang', 'gla', oils_i18n_gettext('154', 'Scottish Gaelic', 'ccvm', 'value')),
+ (155, 'item_lang', 'gle', oils_i18n_gettext('155', 'Irish', 'ccvm', 'value')),
+ (156, 'item_lang', 'glg', oils_i18n_gettext('156', 'Galician', 'ccvm', 'value')),
+ (157, 'item_lang', 'glv', oils_i18n_gettext('157', 'Manx', 'ccvm', 'value')),
+ (158, 'item_lang', 'gmh', oils_i18n_gettext('158', 'German, Middle High (ca. 1050-1500)', 'ccvm', 'value')),
+ (159, 'item_lang', 'goh', oils_i18n_gettext('159', 'German, Old High (ca. 750-1050)', 'ccvm', 'value')),
+ (160, 'item_lang', 'gon', oils_i18n_gettext('160', 'Gondi', 'ccvm', 'value')),
+ (161, 'item_lang', 'gor', oils_i18n_gettext('161', 'Gorontalo', 'ccvm', 'value')),
+ (162, 'item_lang', 'got', oils_i18n_gettext('162', 'Gothic', 'ccvm', 'value')),
+ (163, 'item_lang', 'grb', oils_i18n_gettext('163', 'Grebo', 'ccvm', 'value')),
+ (164, 'item_lang', 'grc', oils_i18n_gettext('164', 'Greek, Ancient (to 1453)', 'ccvm', 'value')),
+ (165, 'item_lang', 'gre', oils_i18n_gettext('165', 'Greek, Modern (1453- )', 'ccvm', 'value')),
+ (166, 'item_lang', 'grn', oils_i18n_gettext('166', 'Guarani', 'ccvm', 'value')),
+ (167, 'item_lang', '-gua', oils_i18n_gettext('167', 'Guarani', 'ccvm', 'value')),
+ (168, 'item_lang', 'guj', oils_i18n_gettext('168', 'Gujarati', 'ccvm', 'value')),
+ (169, 'item_lang', 'gwi', oils_i18n_gettext('169', 'Gwich', 'ccvm', 'value''in')),
+ (170, 'item_lang', 'hai', oils_i18n_gettext('170', 'Haida', 'ccvm', 'value')),
+ (171, 'item_lang', 'hat', oils_i18n_gettext('171', 'Haitian French Creole', 'ccvm', 'value')),
+ (172, 'item_lang', 'hau', oils_i18n_gettext('172', 'Hausa', 'ccvm', 'value')),
+ (173, 'item_lang', 'haw', oils_i18n_gettext('173', 'Hawaiian', 'ccvm', 'value')),
+ (174, 'item_lang', 'heb', oils_i18n_gettext('174', 'Hebrew', 'ccvm', 'value')),
+ (175, 'item_lang', 'her', oils_i18n_gettext('175', 'Herero', 'ccvm', 'value')),
+ (176, 'item_lang', 'hil', oils_i18n_gettext('176', 'Hiligaynon', 'ccvm', 'value')),
+ (177, 'item_lang', 'him', oils_i18n_gettext('177', 'Himachali', 'ccvm', 'value')),
+ (178, 'item_lang', 'hin', oils_i18n_gettext('178', 'Hindi', 'ccvm', 'value')),
+ (179, 'item_lang', 'hit', oils_i18n_gettext('179', 'Hittite', 'ccvm', 'value')),
+ (180, 'item_lang', 'hmn', oils_i18n_gettext('180', 'Hmong', 'ccvm', 'value')),
+ (181, 'item_lang', 'hmo', oils_i18n_gettext('181', 'Hiri Motu', 'ccvm', 'value')),
+ (182, 'item_lang', 'hun', oils_i18n_gettext('182', 'Hungarian', 'ccvm', 'value')),
+ (183, 'item_lang', 'hup', oils_i18n_gettext('183', 'Hupa', 'ccvm', 'value')),
+ (184, 'item_lang', 'iba', oils_i18n_gettext('184', 'Iban', 'ccvm', 'value')),
+ (185, 'item_lang', 'ibo', oils_i18n_gettext('185', 'Igbo', 'ccvm', 'value')),
+ (186, 'item_lang', 'ice', oils_i18n_gettext('186', 'Icelandic', 'ccvm', 'value')),
+ (187, 'item_lang', 'ido', oils_i18n_gettext('187', 'Ido', 'ccvm', 'value')),
+ (188, 'item_lang', 'iii', oils_i18n_gettext('188', 'Sichuan Yi', 'ccvm', 'value')),
+ (189, 'item_lang', 'ijo', oils_i18n_gettext('189', 'Ijo', 'ccvm', 'value')),
+ (190, 'item_lang', 'iku', oils_i18n_gettext('190', 'Inuktitut', 'ccvm', 'value')),
+ (191, 'item_lang', 'ile', oils_i18n_gettext('191', 'Interlingue', 'ccvm', 'value')),
+ (192, 'item_lang', 'ilo', oils_i18n_gettext('192', 'Iloko', 'ccvm', 'value')),
+ (193, 'item_lang', 'ina', oils_i18n_gettext('193', 'Interlingua (International Auxiliary Language Association)', 'ccvm', 'value')),
+ (194, 'item_lang', 'inc', oils_i18n_gettext('194', 'Indic (Other)', 'ccvm', 'value')),
+ (195, 'item_lang', 'ind', oils_i18n_gettext('195', 'Indonesian', 'ccvm', 'value')),
+ (196, 'item_lang', 'ine', oils_i18n_gettext('196', 'Indo-European (Other)', 'ccvm', 'value')),
+ (197, 'item_lang', 'inh', oils_i18n_gettext('197', 'Ingush', 'ccvm', 'value')),
+ (198, 'item_lang', '-int', oils_i18n_gettext('198', 'Interlingua (International Auxiliary Language Association)', 'ccvm', 'value')),
+ (199, 'item_lang', 'ipk', oils_i18n_gettext('199', 'Inupiaq', 'ccvm', 'value')),
+ (200, 'item_lang', 'ira', oils_i18n_gettext('200', 'Iranian (Other)', 'ccvm', 'value')),
+ (201, 'item_lang', '-iri', oils_i18n_gettext('201', 'Irish', 'ccvm', 'value')),
+ (202, 'item_lang', 'iro', oils_i18n_gettext('202', 'Iroquoian (Other)', 'ccvm', 'value')),
+ (203, 'item_lang', 'ita', oils_i18n_gettext('203', 'Italian', 'ccvm', 'value')),
+ (204, 'item_lang', 'jav', oils_i18n_gettext('204', 'Javanese', 'ccvm', 'value')),
+ (205, 'item_lang', 'jpn', oils_i18n_gettext('205', 'Japanese', 'ccvm', 'value')),
+ (206, 'item_lang', 'jpr', oils_i18n_gettext('206', 'Judeo-Persian', 'ccvm', 'value')),
+ (207, 'item_lang', 'jrb', oils_i18n_gettext('207', 'Judeo-Arabic', 'ccvm', 'value')),
+ (208, 'item_lang', 'kaa', oils_i18n_gettext('208', 'Kara-Kalpak', 'ccvm', 'value')),
+ (209, 'item_lang', 'kab', oils_i18n_gettext('209', 'Kabyle', 'ccvm', 'value')),
+ (210, 'item_lang', 'kac', oils_i18n_gettext('210', 'Kachin', 'ccvm', 'value')),
+ (211, 'item_lang', 'kal', oils_i18n_gettext('211', 'Kalâtdlisut', 'ccvm', 'value')),
+ (212, 'item_lang', 'kam', oils_i18n_gettext('212', 'Kamba', 'ccvm', 'value')),
+ (213, 'item_lang', 'kan', oils_i18n_gettext('213', 'Kannada', 'ccvm', 'value')),
+ (214, 'item_lang', 'kar', oils_i18n_gettext('214', 'Karen', 'ccvm', 'value')),
+ (215, 'item_lang', 'kas', oils_i18n_gettext('215', 'Kashmiri', 'ccvm', 'value')),
+ (216, 'item_lang', 'kau', oils_i18n_gettext('216', 'Kanuri', 'ccvm', 'value')),
+ (217, 'item_lang', 'kaw', oils_i18n_gettext('217', 'Kawi', 'ccvm', 'value')),
+ (218, 'item_lang', 'kaz', oils_i18n_gettext('218', 'Kazakh', 'ccvm', 'value')),
+ (219, 'item_lang', 'kbd', oils_i18n_gettext('219', 'Kabardian', 'ccvm', 'value')),
+ (220, 'item_lang', 'kha', oils_i18n_gettext('220', 'Khasi', 'ccvm', 'value')),
+ (221, 'item_lang', 'khi', oils_i18n_gettext('221', 'Khoisan (Other)', 'ccvm', 'value')),
+ (222, 'item_lang', 'khm', oils_i18n_gettext('222', 'Khmer', 'ccvm', 'value')),
+ (223, 'item_lang', 'kho', oils_i18n_gettext('223', 'Khotanese', 'ccvm', 'value')),
+ (224, 'item_lang', 'kik', oils_i18n_gettext('224', 'Kikuyu', 'ccvm', 'value')),
+ (225, 'item_lang', 'kin', oils_i18n_gettext('225', 'Kinyarwanda', 'ccvm', 'value')),
+ (226, 'item_lang', 'kir', oils_i18n_gettext('226', 'Kyrgyz', 'ccvm', 'value')),
+ (227, 'item_lang', 'kmb', oils_i18n_gettext('227', 'Kimbundu', 'ccvm', 'value')),
+ (228, 'item_lang', 'kok', oils_i18n_gettext('228', 'Konkani', 'ccvm', 'value')),
+ (229, 'item_lang', 'kom', oils_i18n_gettext('229', 'Komi', 'ccvm', 'value')),
+ (230, 'item_lang', 'kon', oils_i18n_gettext('230', 'Kongo', 'ccvm', 'value')),
+ (231, 'item_lang', 'kor', oils_i18n_gettext('231', 'Korean', 'ccvm', 'value')),
+ (232, 'item_lang', 'kos', oils_i18n_gettext('232', 'Kusaie', 'ccvm', 'value')),
+ (233, 'item_lang', 'kpe', oils_i18n_gettext('233', 'Kpelle', 'ccvm', 'value')),
+ (234, 'item_lang', 'kro', oils_i18n_gettext('234', 'Kru', 'ccvm', 'value')),
+ (235, 'item_lang', 'kru', oils_i18n_gettext('235', 'Kurukh', 'ccvm', 'value')),
+ (236, 'item_lang', 'kua', oils_i18n_gettext('236', 'Kuanyama', 'ccvm', 'value')),
+ (237, 'item_lang', 'kum', oils_i18n_gettext('237', 'Kumyk', 'ccvm', 'value')),
+ (238, 'item_lang', 'kur', oils_i18n_gettext('238', 'Kurdish', 'ccvm', 'value')),
+ (239, 'item_lang', '-kus', oils_i18n_gettext('239', 'Kusaie', 'ccvm', 'value')),
+ (240, 'item_lang', 'kut', oils_i18n_gettext('240', 'Kutenai', 'ccvm', 'value')),
+ (241, 'item_lang', 'lad', oils_i18n_gettext('241', 'Ladino', 'ccvm', 'value')),
+ (242, 'item_lang', 'lah', oils_i18n_gettext('242', 'Lahnda', 'ccvm', 'value')),
+ (243, 'item_lang', 'lam', oils_i18n_gettext('243', 'Lamba', 'ccvm', 'value')),
+ (244, 'item_lang', '-lan', oils_i18n_gettext('244', 'Occitan (post-1500)', 'ccvm', 'value')),
+ (245, 'item_lang', 'lao', oils_i18n_gettext('245', 'Lao', 'ccvm', 'value')),
+ (246, 'item_lang', '-lap', oils_i18n_gettext('246', 'Sami', 'ccvm', 'value')),
+ (247, 'item_lang', 'lat', oils_i18n_gettext('247', 'Latin', 'ccvm', 'value')),
+ (248, 'item_lang', 'lav', oils_i18n_gettext('248', 'Latvian', 'ccvm', 'value')),
+ (249, 'item_lang', 'lez', oils_i18n_gettext('249', 'Lezgian', 'ccvm', 'value')),
+ (250, 'item_lang', 'lim', oils_i18n_gettext('250', 'Limburgish', 'ccvm', 'value')),
+ (251, 'item_lang', 'lin', oils_i18n_gettext('251', 'Lingala', 'ccvm', 'value')),
+ (252, 'item_lang', 'lit', oils_i18n_gettext('252', 'Lithuanian', 'ccvm', 'value')),
+ (253, 'item_lang', 'lol', oils_i18n_gettext('253', 'Mongo-Nkundu', 'ccvm', 'value')),
+ (254, 'item_lang', 'loz', oils_i18n_gettext('254', 'Lozi', 'ccvm', 'value')),
+ (255, 'item_lang', 'ltz', oils_i18n_gettext('255', 'Letzeburgesch', 'ccvm', 'value')),
+ (256, 'item_lang', 'lua', oils_i18n_gettext('256', 'Luba-Lulua', 'ccvm', 'value')),
+ (257, 'item_lang', 'lub', oils_i18n_gettext('257', 'Luba-Katanga', 'ccvm', 'value')),
+ (258, 'item_lang', 'lug', oils_i18n_gettext('258', 'Ganda', 'ccvm', 'value')),
+ (259, 'item_lang', 'lui', oils_i18n_gettext('259', 'Luiseño', 'ccvm', 'value')),
+ (260, 'item_lang', 'lun', oils_i18n_gettext('260', 'Lunda', 'ccvm', 'value')),
+ (261, 'item_lang', 'luo', oils_i18n_gettext('261', 'Luo (Kenya and Tanzania)', 'ccvm', 'value')),
+ (262, 'item_lang', 'lus', oils_i18n_gettext('262', 'Lushai', 'ccvm', 'value')),
+ (263, 'item_lang', 'mac', oils_i18n_gettext('263', 'Macedonian', 'ccvm', 'value')),
+ (264, 'item_lang', 'mad', oils_i18n_gettext('264', 'Madurese', 'ccvm', 'value')),
+ (265, 'item_lang', 'mag', oils_i18n_gettext('265', 'Magahi', 'ccvm', 'value')),
+ (266, 'item_lang', 'mah', oils_i18n_gettext('266', 'Marshallese', 'ccvm', 'value')),
+ (267, 'item_lang', 'mai', oils_i18n_gettext('267', 'Maithili', 'ccvm', 'value')),
+ (268, 'item_lang', 'mak', oils_i18n_gettext('268', 'Makasar', 'ccvm', 'value')),
+ (269, 'item_lang', 'mal', oils_i18n_gettext('269', 'Malayalam', 'ccvm', 'value')),
+ (270, 'item_lang', 'man', oils_i18n_gettext('270', 'Mandingo', 'ccvm', 'value')),
+ (271, 'item_lang', 'mao', oils_i18n_gettext('271', 'Maori', 'ccvm', 'value')),
+ (272, 'item_lang', 'map', oils_i18n_gettext('272', 'Austronesian (Other)', 'ccvm', 'value')),
+ (273, 'item_lang', 'mar', oils_i18n_gettext('273', 'Marathi', 'ccvm', 'value')),
+ (274, 'item_lang', 'mas', oils_i18n_gettext('274', 'Masai', 'ccvm', 'value')),
+ (275, 'item_lang', '-max', oils_i18n_gettext('275', 'Manx', 'ccvm', 'value')),
+ (276, 'item_lang', 'may', oils_i18n_gettext('276', 'Malay', 'ccvm', 'value')),
+ (277, 'item_lang', 'mdr', oils_i18n_gettext('277', 'Mandar', 'ccvm', 'value')),
+ (278, 'item_lang', 'men', oils_i18n_gettext('278', 'Mende', 'ccvm', 'value')),
+ (279, 'item_lang', 'mga', oils_i18n_gettext('279', 'Irish, Middle (ca. 1100-1550)', 'ccvm', 'value')),
+ (280, 'item_lang', 'mic', oils_i18n_gettext('280', 'Micmac', 'ccvm', 'value')),
+ (281, 'item_lang', 'min', oils_i18n_gettext('281', 'Minangkabau', 'ccvm', 'value')),
+ (282, 'item_lang', 'mis', oils_i18n_gettext('282', 'Miscellaneous languages', 'ccvm', 'value')),
+ (283, 'item_lang', 'mkh', oils_i18n_gettext('283', 'Mon-Khmer (Other)', 'ccvm', 'value')),
+ (284, 'item_lang', '-mla', oils_i18n_gettext('284', 'Malagasy', 'ccvm', 'value')),
+ (285, 'item_lang', 'mlg', oils_i18n_gettext('285', 'Malagasy', 'ccvm', 'value')),
+ (286, 'item_lang', 'mlt', oils_i18n_gettext('286', 'Maltese', 'ccvm', 'value')),
+ (287, 'item_lang', 'mnc', oils_i18n_gettext('287', 'Manchu', 'ccvm', 'value')),
+ (288, 'item_lang', 'mni', oils_i18n_gettext('288', 'Manipuri', 'ccvm', 'value')),
+ (289, 'item_lang', 'mno', oils_i18n_gettext('289', 'Manobo languages', 'ccvm', 'value')),
+ (290, 'item_lang', 'moh', oils_i18n_gettext('290', 'Mohawk', 'ccvm', 'value')),
+ (291, 'item_lang', 'mol', oils_i18n_gettext('291', 'Moldavian', 'ccvm', 'value')),
+ (292, 'item_lang', 'mon', oils_i18n_gettext('292', 'Mongolian', 'ccvm', 'value')),
+ (293, 'item_lang', 'mos', oils_i18n_gettext('293', 'Mooré', 'ccvm', 'value')),
+ (294, 'item_lang', 'mul', oils_i18n_gettext('294', 'Multiple languages', 'ccvm', 'value')),
+ (295, 'item_lang', 'mun', oils_i18n_gettext('295', 'Munda (Other)', 'ccvm', 'value')),
+ (296, 'item_lang', 'mus', oils_i18n_gettext('296', 'Creek', 'ccvm', 'value')),
+ (297, 'item_lang', 'mwr', oils_i18n_gettext('297', 'Marwari', 'ccvm', 'value')),
+ (298, 'item_lang', 'myn', oils_i18n_gettext('298', 'Mayan languages', 'ccvm', 'value')),
+ (299, 'item_lang', 'nah', oils_i18n_gettext('299', 'Nahuatl', 'ccvm', 'value')),
+ (300, 'item_lang', 'nai', oils_i18n_gettext('300', 'North American Indian (Other)', 'ccvm', 'value')),
+ (301, 'item_lang', 'nap', oils_i18n_gettext('301', 'Neapolitan Italian', 'ccvm', 'value')),
+ (302, 'item_lang', 'nau', oils_i18n_gettext('302', 'Nauru', 'ccvm', 'value')),
+ (303, 'item_lang', 'nav', oils_i18n_gettext('303', 'Navajo', 'ccvm', 'value')),
+ (304, 'item_lang', 'nbl', oils_i18n_gettext('304', 'Ndebele (South Africa)', 'ccvm', 'value')),
+ (305, 'item_lang', 'nde', oils_i18n_gettext('305', 'Ndebele (Zimbabwe) ', 'ccvm', 'value')),
+ (306, 'item_lang', 'ndo', oils_i18n_gettext('306', 'Ndonga', 'ccvm', 'value')),
+ (307, 'item_lang', 'nds', oils_i18n_gettext('307', 'Low German', 'ccvm', 'value')),
+ (308, 'item_lang', 'nep', oils_i18n_gettext('308', 'Nepali', 'ccvm', 'value')),
+ (309, 'item_lang', 'new', oils_i18n_gettext('309', 'Newari', 'ccvm', 'value')),
+ (310, 'item_lang', 'nia', oils_i18n_gettext('310', 'Nias', 'ccvm', 'value')),
+ (311, 'item_lang', 'nic', oils_i18n_gettext('311', 'Niger-Kordofanian (Other)', 'ccvm', 'value')),
+ (312, 'item_lang', 'niu', oils_i18n_gettext('312', 'Niuean', 'ccvm', 'value')),
+ (313, 'item_lang', 'nno', oils_i18n_gettext('313', 'Norwegian (Nynorsk)', 'ccvm', 'value')),
+ (314, 'item_lang', 'nob', oils_i18n_gettext('314', 'Norwegian (Bokmål)', 'ccvm', 'value')),
+ (315, 'item_lang', 'nog', oils_i18n_gettext('315', 'Nogai', 'ccvm', 'value')),
+ (316, 'item_lang', 'non', oils_i18n_gettext('316', 'Old Norse', 'ccvm', 'value')),
+ (317, 'item_lang', 'nor', oils_i18n_gettext('317', 'Norwegian', 'ccvm', 'value')),
+ (318, 'item_lang', 'nso', oils_i18n_gettext('318', 'Northern Sotho', 'ccvm', 'value')),
+ (319, 'item_lang', 'nub', oils_i18n_gettext('319', 'Nubian languages', 'ccvm', 'value')),
+ (320, 'item_lang', 'nya', oils_i18n_gettext('320', 'Nyanja', 'ccvm', 'value')),
+ (321, 'item_lang', 'nym', oils_i18n_gettext('321', 'Nyamwezi', 'ccvm', 'value')),
+ (322, 'item_lang', 'nyn', oils_i18n_gettext('322', 'Nyankole', 'ccvm', 'value')),
+ (323, 'item_lang', 'nyo', oils_i18n_gettext('323', 'Nyoro', 'ccvm', 'value')),
+ (324, 'item_lang', 'nzi', oils_i18n_gettext('324', 'Nzima', 'ccvm', 'value')),
+ (325, 'item_lang', 'oci', oils_i18n_gettext('325', 'Occitan (post-1500)', 'ccvm', 'value')),
+ (326, 'item_lang', 'oji', oils_i18n_gettext('326', 'Ojibwa', 'ccvm', 'value')),
+ (327, 'item_lang', 'ori', oils_i18n_gettext('327', 'Oriya', 'ccvm', 'value')),
+ (328, 'item_lang', 'orm', oils_i18n_gettext('328', 'Oromo', 'ccvm', 'value')),
+ (329, 'item_lang', 'osa', oils_i18n_gettext('329', 'Osage', 'ccvm', 'value')),
+ (330, 'item_lang', 'oss', oils_i18n_gettext('330', 'Ossetic', 'ccvm', 'value')),
+ (331, 'item_lang', 'ota', oils_i18n_gettext('331', 'Turkish, Ottoman', 'ccvm', 'value')),
+ (332, 'item_lang', 'oto', oils_i18n_gettext('332', 'Otomian languages', 'ccvm', 'value')),
+ (333, 'item_lang', 'paa', oils_i18n_gettext('333', 'Papuan (Other)', 'ccvm', 'value')),
+ (334, 'item_lang', 'pag', oils_i18n_gettext('334', 'Pangasinan', 'ccvm', 'value')),
+ (335, 'item_lang', 'pal', oils_i18n_gettext('335', 'Pahlavi', 'ccvm', 'value')),
+ (336, 'item_lang', 'pam', oils_i18n_gettext('336', 'Pampanga', 'ccvm', 'value')),
+ (337, 'item_lang', 'pan', oils_i18n_gettext('337', 'Panjabi', 'ccvm', 'value')),
+ (338, 'item_lang', 'pap', oils_i18n_gettext('338', 'Papiamento', 'ccvm', 'value')),
+ (339, 'item_lang', 'pau', oils_i18n_gettext('339', 'Palauan', 'ccvm', 'value')),
+ (340, 'item_lang', 'peo', oils_i18n_gettext('340', 'Old Persian (ca. 600-400 B.C.)', 'ccvm', 'value')),
+ (341, 'item_lang', 'per', oils_i18n_gettext('341', 'Persian', 'ccvm', 'value')),
+ (342, 'item_lang', 'phi', oils_i18n_gettext('342', 'Philippine (Other)', 'ccvm', 'value')),
+ (343, 'item_lang', 'phn', oils_i18n_gettext('343', 'Phoenician', 'ccvm', 'value')),
+ (344, 'item_lang', 'pli', oils_i18n_gettext('344', 'Pali', 'ccvm', 'value')),
+ (345, 'item_lang', 'pol', oils_i18n_gettext('345', 'Polish', 'ccvm', 'value')),
+ (346, 'item_lang', 'pon', oils_i18n_gettext('346', 'Ponape', 'ccvm', 'value')),
+ (347, 'item_lang', 'por', oils_i18n_gettext('347', 'Portuguese', 'ccvm', 'value')),
+ (348, 'item_lang', 'pra', oils_i18n_gettext('348', 'Prakrit languages', 'ccvm', 'value')),
+ (349, 'item_lang', 'pro', oils_i18n_gettext('349', 'Provençal (to 1500)', 'ccvm', 'value')),
+ (350, 'item_lang', 'pus', oils_i18n_gettext('350', 'Pushto', 'ccvm', 'value')),
+ (351, 'item_lang', 'que', oils_i18n_gettext('351', 'Quechua', 'ccvm', 'value')),
+ (352, 'item_lang', 'raj', oils_i18n_gettext('352', 'Rajasthani', 'ccvm', 'value')),
+ (353, 'item_lang', 'rap', oils_i18n_gettext('353', 'Rapanui', 'ccvm', 'value')),
+ (354, 'item_lang', 'rar', oils_i18n_gettext('354', 'Rarotongan', 'ccvm', 'value')),
+ (355, 'item_lang', 'roa', oils_i18n_gettext('355', 'Romance (Other)', 'ccvm', 'value')),
+ (356, 'item_lang', 'roh', oils_i18n_gettext('356', 'Raeto-Romance', 'ccvm', 'value')),
+ (357, 'item_lang', 'rom', oils_i18n_gettext('357', 'Romani', 'ccvm', 'value')),
+ (358, 'item_lang', 'rum', oils_i18n_gettext('358', 'Romanian', 'ccvm', 'value')),
+ (359, 'item_lang', 'run', oils_i18n_gettext('359', 'Rundi', 'ccvm', 'value')),
+ (360, 'item_lang', 'rus', oils_i18n_gettext('360', 'Russian', 'ccvm', 'value')),
+ (361, 'item_lang', 'sad', oils_i18n_gettext('361', 'Sandawe', 'ccvm', 'value')),
+ (362, 'item_lang', 'sag', oils_i18n_gettext('362', 'Sango (Ubangi Creole)', 'ccvm', 'value')),
+ (363, 'item_lang', 'sah', oils_i18n_gettext('363', 'Yakut', 'ccvm', 'value')),
+ (364, 'item_lang', 'sai', oils_i18n_gettext('364', 'South American Indian (Other)', 'ccvm', 'value')),
+ (365, 'item_lang', 'sal', oils_i18n_gettext('365', 'Salishan languages', 'ccvm', 'value')),
+ (366, 'item_lang', 'sam', oils_i18n_gettext('366', 'Samaritan Aramaic', 'ccvm', 'value')),
+ (367, 'item_lang', 'san', oils_i18n_gettext('367', 'Sanskrit', 'ccvm', 'value')),
+ (368, 'item_lang', '-sao', oils_i18n_gettext('368', 'Samoan', 'ccvm', 'value')),
+ (369, 'item_lang', 'sas', oils_i18n_gettext('369', 'Sasak', 'ccvm', 'value')),
+ (370, 'item_lang', 'sat', oils_i18n_gettext('370', 'Santali', 'ccvm', 'value')),
+ (371, 'item_lang', 'scc', oils_i18n_gettext('371', 'Serbian', 'ccvm', 'value')),
+ (372, 'item_lang', 'sco', oils_i18n_gettext('372', 'Scots', 'ccvm', 'value')),
+ (373, 'item_lang', 'scr', oils_i18n_gettext('373', 'Croatian', 'ccvm', 'value')),
+ (374, 'item_lang', 'sel', oils_i18n_gettext('374', 'Selkup', 'ccvm', 'value')),
+ (375, 'item_lang', 'sem', oils_i18n_gettext('375', 'Semitic (Other)', 'ccvm', 'value')),
+ (376, 'item_lang', 'sga', oils_i18n_gettext('376', 'Irish, Old (to 1100)', 'ccvm', 'value')),
+ (377, 'item_lang', 'sgn', oils_i18n_gettext('377', 'Sign languages', 'ccvm', 'value')),
+ (378, 'item_lang', 'shn', oils_i18n_gettext('378', 'Shan', 'ccvm', 'value')),
+ (379, 'item_lang', '-sho', oils_i18n_gettext('379', 'Shona', 'ccvm', 'value')),
+ (380, 'item_lang', 'sid', oils_i18n_gettext('380', 'Sidamo', 'ccvm', 'value')),
+ (381, 'item_lang', 'sin', oils_i18n_gettext('381', 'Sinhalese', 'ccvm', 'value')),
+ (382, 'item_lang', 'sio', oils_i18n_gettext('382', 'Siouan (Other)', 'ccvm', 'value')),
+ (383, 'item_lang', 'sit', oils_i18n_gettext('383', 'Sino-Tibetan (Other)', 'ccvm', 'value')),
+ (384, 'item_lang', 'sla', oils_i18n_gettext('384', 'Slavic (Other)', 'ccvm', 'value')),
+ (385, 'item_lang', 'slo', oils_i18n_gettext('385', 'Slovak', 'ccvm', 'value')),
+ (386, 'item_lang', 'slv', oils_i18n_gettext('386', 'Slovenian', 'ccvm', 'value')),
+ (387, 'item_lang', 'sma', oils_i18n_gettext('387', 'Southern Sami', 'ccvm', 'value')),
+ (388, 'item_lang', 'sme', oils_i18n_gettext('388', 'Northern Sami', 'ccvm', 'value')),
+ (389, 'item_lang', 'smi', oils_i18n_gettext('389', 'Sami', 'ccvm', 'value')),
+ (390, 'item_lang', 'smj', oils_i18n_gettext('390', 'Lule Sami', 'ccvm', 'value')),
+ (391, 'item_lang', 'smn', oils_i18n_gettext('391', 'Inari Sami', 'ccvm', 'value')),
+ (392, 'item_lang', 'smo', oils_i18n_gettext('392', 'Samoan', 'ccvm', 'value')),
+ (393, 'item_lang', 'sms', oils_i18n_gettext('393', 'Skolt Sami', 'ccvm', 'value')),
+ (394, 'item_lang', 'sna', oils_i18n_gettext('394', 'Shona', 'ccvm', 'value')),
+ (395, 'item_lang', 'snd', oils_i18n_gettext('395', 'Sindhi', 'ccvm', 'value')),
+ (396, 'item_lang', '-snh', oils_i18n_gettext('396', 'Sinhalese', 'ccvm', 'value')),
+ (397, 'item_lang', 'snk', oils_i18n_gettext('397', 'Soninke', 'ccvm', 'value')),
+ (398, 'item_lang', 'sog', oils_i18n_gettext('398', 'Sogdian', 'ccvm', 'value')),
+ (399, 'item_lang', 'som', oils_i18n_gettext('399', 'Somali', 'ccvm', 'value')),
+ (400, 'item_lang', 'son', oils_i18n_gettext('400', 'Songhai', 'ccvm', 'value')),
+ (401, 'item_lang', 'sot', oils_i18n_gettext('401', 'Sotho', 'ccvm', 'value')),
+ (402, 'item_lang', 'spa', oils_i18n_gettext('402', 'Spanish', 'ccvm', 'value')),
+ (403, 'item_lang', 'srd', oils_i18n_gettext('403', 'Sardinian', 'ccvm', 'value')),
+ (404, 'item_lang', 'srr', oils_i18n_gettext('404', 'Serer', 'ccvm', 'value')),
+ (405, 'item_lang', 'ssa', oils_i18n_gettext('405', 'Nilo-Saharan (Other)', 'ccvm', 'value')),
+ (406, 'item_lang', '-sso', oils_i18n_gettext('406', 'Sotho', 'ccvm', 'value')),
+ (407, 'item_lang', 'ssw', oils_i18n_gettext('407', 'Swazi', 'ccvm', 'value')),
+ (408, 'item_lang', 'suk', oils_i18n_gettext('408', 'Sukuma', 'ccvm', 'value')),
+ (409, 'item_lang', 'sun', oils_i18n_gettext('409', 'Sundanese', 'ccvm', 'value')),
+ (410, 'item_lang', 'sus', oils_i18n_gettext('410', 'Susu', 'ccvm', 'value')),
+ (411, 'item_lang', 'sux', oils_i18n_gettext('411', 'Sumerian', 'ccvm', 'value')),
+ (412, 'item_lang', 'swa', oils_i18n_gettext('412', 'Swahili', 'ccvm', 'value')),
+ (413, 'item_lang', 'swe', oils_i18n_gettext('413', 'Swedish', 'ccvm', 'value')),
+ (414, 'item_lang', '-swz', oils_i18n_gettext('414', 'Swazi', 'ccvm', 'value')),
+ (415, 'item_lang', 'syr', oils_i18n_gettext('415', 'Syriac', 'ccvm', 'value')),
+ (416, 'item_lang', '-tag', oils_i18n_gettext('416', 'Tagalog', 'ccvm', 'value')),
+ (417, 'item_lang', 'tah', oils_i18n_gettext('417', 'Tahitian', 'ccvm', 'value')),
+ (418, 'item_lang', 'tai', oils_i18n_gettext('418', 'Tai (Other)', 'ccvm', 'value')),
+ (419, 'item_lang', '-taj', oils_i18n_gettext('419', 'Tajik', 'ccvm', 'value')),
+ (420, 'item_lang', 'tam', oils_i18n_gettext('420', 'Tamil', 'ccvm', 'value')),
+ (421, 'item_lang', '-tar', oils_i18n_gettext('421', 'Tatar', 'ccvm', 'value')),
+ (422, 'item_lang', 'tat', oils_i18n_gettext('422', 'Tatar', 'ccvm', 'value')),
+ (423, 'item_lang', 'tel', oils_i18n_gettext('423', 'Telugu', 'ccvm', 'value')),
+ (424, 'item_lang', 'tem', oils_i18n_gettext('424', 'Temne', 'ccvm', 'value')),
+ (425, 'item_lang', 'ter', oils_i18n_gettext('425', 'Terena', 'ccvm', 'value')),
+ (426, 'item_lang', 'tet', oils_i18n_gettext('426', 'Tetum', 'ccvm', 'value')),
+ (427, 'item_lang', 'tgk', oils_i18n_gettext('427', 'Tajik', 'ccvm', 'value')),
+ (428, 'item_lang', 'tgl', oils_i18n_gettext('428', 'Tagalog', 'ccvm', 'value')),
+ (429, 'item_lang', 'tha', oils_i18n_gettext('429', 'Thai', 'ccvm', 'value')),
+ (430, 'item_lang', 'tib', oils_i18n_gettext('430', 'Tibetan', 'ccvm', 'value')),
+ (431, 'item_lang', 'tig', oils_i18n_gettext('431', 'Tigré', 'ccvm', 'value')),
+ (432, 'item_lang', 'tir', oils_i18n_gettext('432', 'Tigrinya', 'ccvm', 'value')),
+ (433, 'item_lang', 'tiv', oils_i18n_gettext('433', 'Tiv', 'ccvm', 'value')),
+ (434, 'item_lang', 'tkl', oils_i18n_gettext('434', 'Tokelauan', 'ccvm', 'value')),
+ (435, 'item_lang', 'tli', oils_i18n_gettext('435', 'Tlingit', 'ccvm', 'value')),
+ (436, 'item_lang', 'tmh', oils_i18n_gettext('436', 'Tamashek', 'ccvm', 'value')),
+ (437, 'item_lang', 'tog', oils_i18n_gettext('437', 'Tonga (Nyasa)', 'ccvm', 'value')),
+ (438, 'item_lang', 'ton', oils_i18n_gettext('438', 'Tongan', 'ccvm', 'value')),
+ (439, 'item_lang', 'tpi', oils_i18n_gettext('439', 'Tok Pisin', 'ccvm', 'value')),
+ (440, 'item_lang', '-tru', oils_i18n_gettext('440', 'Truk', 'ccvm', 'value')),
+ (441, 'item_lang', 'tsi', oils_i18n_gettext('441', 'Tsimshian', 'ccvm', 'value')),
+ (442, 'item_lang', 'tsn', oils_i18n_gettext('442', 'Tswana', 'ccvm', 'value')),
+ (443, 'item_lang', 'tso', oils_i18n_gettext('443', 'Tsonga', 'ccvm', 'value')),
+ (444, 'item_lang', '-tsw', oils_i18n_gettext('444', 'Tswana', 'ccvm', 'value')),
+ (445, 'item_lang', 'tuk', oils_i18n_gettext('445', 'Turkmen', 'ccvm', 'value')),
+ (446, 'item_lang', 'tum', oils_i18n_gettext('446', 'Tumbuka', 'ccvm', 'value')),
+ (447, 'item_lang', 'tup', oils_i18n_gettext('447', 'Tupi languages', 'ccvm', 'value')),
+ (448, 'item_lang', 'tur', oils_i18n_gettext('448', 'Turkish', 'ccvm', 'value')),
+ (449, 'item_lang', 'tut', oils_i18n_gettext('449', 'Altaic (Other)', 'ccvm', 'value')),
+ (450, 'item_lang', 'tvl', oils_i18n_gettext('450', 'Tuvaluan', 'ccvm', 'value')),
+ (451, 'item_lang', 'twi', oils_i18n_gettext('451', 'Twi', 'ccvm', 'value')),
+ (452, 'item_lang', 'tyv', oils_i18n_gettext('452', 'Tuvinian', 'ccvm', 'value')),
+ (453, 'item_lang', 'udm', oils_i18n_gettext('453', 'Udmurt', 'ccvm', 'value')),
+ (454, 'item_lang', 'uga', oils_i18n_gettext('454', 'Ugaritic', 'ccvm', 'value')),
+ (455, 'item_lang', 'uig', oils_i18n_gettext('455', 'Uighur', 'ccvm', 'value')),
+ (456, 'item_lang', 'ukr', oils_i18n_gettext('456', 'Ukrainian', 'ccvm', 'value')),
+ (457, 'item_lang', 'umb', oils_i18n_gettext('457', 'Umbundu', 'ccvm', 'value')),
+ (458, 'item_lang', 'und', oils_i18n_gettext('458', 'Undetermined', 'ccvm', 'value')),
+ (459, 'item_lang', 'urd', oils_i18n_gettext('459', 'Urdu', 'ccvm', 'value')),
+ (460, 'item_lang', 'uzb', oils_i18n_gettext('460', 'Uzbek', 'ccvm', 'value')),
+ (461, 'item_lang', 'vai', oils_i18n_gettext('461', 'Vai', 'ccvm', 'value')),
+ (462, 'item_lang', 'ven', oils_i18n_gettext('462', 'Venda', 'ccvm', 'value')),
+ (463, 'item_lang', 'vie', oils_i18n_gettext('463', 'Vietnamese', 'ccvm', 'value')),
+ (464, 'item_lang', 'vol', oils_i18n_gettext('464', 'Volapük', 'ccvm', 'value')),
+ (465, 'item_lang', 'vot', oils_i18n_gettext('465', 'Votic', 'ccvm', 'value')),
+ (466, 'item_lang', 'wak', oils_i18n_gettext('466', 'Wakashan languages', 'ccvm', 'value')),
+ (467, 'item_lang', 'wal', oils_i18n_gettext('467', 'Walamo', 'ccvm', 'value')),
+ (468, 'item_lang', 'war', oils_i18n_gettext('468', 'Waray', 'ccvm', 'value')),
+ (469, 'item_lang', 'was', oils_i18n_gettext('469', 'Washo', 'ccvm', 'value')),
+ (470, 'item_lang', 'wel', oils_i18n_gettext('470', 'Welsh', 'ccvm', 'value')),
+ (471, 'item_lang', 'wen', oils_i18n_gettext('471', 'Sorbian languages', 'ccvm', 'value')),
+ (472, 'item_lang', 'wln', oils_i18n_gettext('472', 'Walloon', 'ccvm', 'value')),
+ (473, 'item_lang', 'wol', oils_i18n_gettext('473', 'Wolof', 'ccvm', 'value')),
+ (474, 'item_lang', 'xal', oils_i18n_gettext('474', 'Kalmyk', 'ccvm', 'value')),
+ (475, 'item_lang', 'xho', oils_i18n_gettext('475', 'Xhosa', 'ccvm', 'value')),
+ (476, 'item_lang', 'yao', oils_i18n_gettext('476', 'Yao (Africa)', 'ccvm', 'value')),
+ (477, 'item_lang', 'yap', oils_i18n_gettext('477', 'Yapese', 'ccvm', 'value')),
+ (478, 'item_lang', 'yid', oils_i18n_gettext('478', 'Yiddish', 'ccvm', 'value')),
+ (479, 'item_lang', 'yor', oils_i18n_gettext('479', 'Yoruba', 'ccvm', 'value')),
+ (480, 'item_lang', 'ypk', oils_i18n_gettext('480', 'Yupik languages', 'ccvm', 'value')),
+ (481, 'item_lang', 'zap', oils_i18n_gettext('481', 'Zapotec', 'ccvm', 'value')),
+ (482, 'item_lang', 'zen', oils_i18n_gettext('482', 'Zenaga', 'ccvm', 'value')),
+ (483, 'item_lang', 'zha', oils_i18n_gettext('483', 'Zhuang', 'ccvm', 'value')),
+ (484, 'item_lang', 'znd', oils_i18n_gettext('484', 'Zande', 'ccvm', 'value')),
+ (485, 'item_lang', 'zul', oils_i18n_gettext('485', 'Zulu', 'ccvm', 'value')),
+ (486, 'item_lang', 'zun', oils_i18n_gettext('486', 'Zuni', 'ccvm', 'value'));
+
+INSERT INTO config.coded_value_map (id, ctype, code, value, description) VALUES
+ (487,'audience', ' ', oils_i18n_gettext('487', 'Unknown or unspecified', 'ccvm', 'value'), oils_i18n_gettext('487', 'The target audience for the item not known or not specified.', 'ccvm', 'description')),
+ (488,'audience', 'a', oils_i18n_gettext('488', 'Preschool', 'ccvm', 'value'), oils_i18n_gettext('488', 'The item is intended for children, approximate ages 0-5 years.', 'ccvm', 'description')),
+ (489,'audience', 'b', oils_i18n_gettext('489', 'Primary', 'ccvm', 'value'), oils_i18n_gettext('489', 'The item is intended for children, approximate ages 6-8 years.', 'ccvm', 'description')),
+ (490,'audience', 'c', oils_i18n_gettext('490', 'Pre-adolescent', 'ccvm', 'value'), oils_i18n_gettext('490', 'The item is intended for young people, approximate ages 9-13 years.', 'ccvm', 'description')),
+ (491,'audience', 'd', oils_i18n_gettext('491', 'Adolescent', 'ccvm', 'value'), oils_i18n_gettext('491', 'The item is intended for young people, approximate ages 14-17 years.', 'ccvm', 'description')),
+ (492,'audience', 'e', oils_i18n_gettext('492', 'Adult', 'ccvm', 'value'), oils_i18n_gettext('492', 'The item is intended for adults.', 'ccvm', 'description')),
+ (493,'audience', 'f', oils_i18n_gettext('493', 'Specialized', 'ccvm', 'value'), oils_i18n_gettext('493', 'The item is aimed at a particular audience and the nature of the presentation makes the item of little interest to another audience.', 'ccvm', 'description')),
+ (494,'audience', 'g', oils_i18n_gettext('494', 'General', 'ccvm', 'value'), oils_i18n_gettext('494', 'The item is of general interest and not aimed at an audience of a particular intellectual level.', 'ccvm', 'description')),
+ (495,'audience', 'j', oils_i18n_gettext('495', 'Juvenile', 'ccvm', 'value'), oils_i18n_gettext('495', 'The item is intended for children and young people, approximate ages 0-15 years.', 'ccvm', 'description'));
+
+INSERT INTO config.coded_value_map (id, ctype, code, value) VALUES
+ (496, 'item_type', 'a', oils_i18n_gettext('496', 'Language material', 'ccvm', 'value')),
+ (497, 'item_type', 't', oils_i18n_gettext('497', 'Manuscript language material', 'ccvm', 'value')),
+ (498, 'item_type', 'g', oils_i18n_gettext('498', 'Projected medium', 'ccvm', 'value')),
+ (499, 'item_type', 'k', oils_i18n_gettext('499', 'Two-dimensional nonprojectable graphic', 'ccvm', 'value')),
+ (500, 'item_type', 'r', oils_i18n_gettext('500', 'Three-dimensional artifact or naturally occurring object', 'ccvm', 'value')),
+ (501, 'item_type', 'o', oils_i18n_gettext('501', 'Kit', 'ccvm', 'value')),
+ (502, 'item_type', 'p', oils_i18n_gettext('502', 'Mixed materials', 'ccvm', 'value')),
+ (503, 'item_type', 'e', oils_i18n_gettext('503', 'Cartographic material', 'ccvm', 'value')),
+ (504, 'item_type', 'f', oils_i18n_gettext('504', 'Manuscript cartographic material', 'ccvm', 'value')),
+ (505, 'item_type', 'c', oils_i18n_gettext('505', 'Notated music', 'ccvm', 'value')),
+ (506, 'item_type', 'd', oils_i18n_gettext('506', 'Manuscript notated music', 'ccvm', 'value')),
+ (507, 'item_type', 'i', oils_i18n_gettext('507', 'Nonmusical sound recording', 'ccvm', 'value')),
+ (508, 'item_type', 'j', oils_i18n_gettext('508', 'Musical sound recording', 'ccvm', 'value')),
+ (509, 'item_type', 'm', oils_i18n_gettext('509', 'Computer file', 'ccvm', 'value'));
+
+INSERT INTO config.coded_value_map (id, ctype, code, value, description) VALUES
+ (510, 'lit_form', '0', oils_i18n_gettext('510', 'Not fiction (not further specified)', 'ccvm', 'value'), oils_i18n_gettext('510', 'The item is not a work of fiction and no further identification of the literary form is desired', 'ccvm', 'description')),
+ (511, 'lit_form', '1', oils_i18n_gettext('511', 'Fiction (not further specified)', 'ccvm', 'value'), oils_i18n_gettext('511', 'The item is a work of fiction and no further identification of the literary form is desired', 'ccvm', 'description')),
+ (512, 'lit_form', 'c', oils_i18n_gettext('512', 'Comic strips', 'ccvm', 'value'), NULL),
+ (513, 'lit_form', 'd', oils_i18n_gettext('513', 'Dramas', 'ccvm', 'value'), NULL),
+ (514, 'lit_form', 'e', oils_i18n_gettext('514', 'Essays', 'ccvm', 'value'), NULL),
+ (515, 'lit_form', 'f', oils_i18n_gettext('515', 'Novels', 'ccvm', 'value'), NULL),
+ (516, 'lit_form', 'h', oils_i18n_gettext('516', 'Humor, satires, etc.', 'ccvm', 'value'), oils_i18n_gettext('516', 'The item is a humorous work, satire or of similar literary form.', 'ccvm', 'description')),
+ (517, 'lit_form', 'i', oils_i18n_gettext('517', 'Letters', 'ccvm', 'value'), oils_i18n_gettext('517', 'The item is a single letter or collection of correspondence.', 'ccvm', 'description')),
+ (518, 'lit_form', 'j', oils_i18n_gettext('518', 'Short stories', 'ccvm', 'value'), oils_i18n_gettext('518', 'The item is a short story or collection of short stories.', 'ccvm', 'description')),
+ (519, 'lit_form', 'm', oils_i18n_gettext('519', 'Mixed forms', 'ccvm', 'value'), oils_i18n_gettext('519', 'The item is a variety of literary forms (e.g., poetry and short stories).', 'ccvm', 'description')),
+ (520, 'lit_form', 'p', oils_i18n_gettext('520', 'Poetry', 'ccvm', 'value'), oils_i18n_gettext('520', 'The item is a poem or collection of poems.', 'ccvm', 'description')),
+ (521, 'lit_form', 's', oils_i18n_gettext('521', 'Speeches', 'ccvm', 'value'), oils_i18n_gettext('521', 'The item is a speech or collection of speeches.', 'ccvm', 'description')),
+ (522, 'lit_form', 'u', oils_i18n_gettext('522', 'Unknown', 'ccvm', 'value'), oils_i18n_gettext('522', 'The literary form of the item is unknown.', 'ccvm', 'description'));
+
+
+INSERT INTO config.coded_value_map (id, ctype, code, value) VALUES
+ (523, 'item_form', 'a', oils_i18n_gettext('523', 'Microfilm', 'ccvm', 'value')),
+ (524, 'item_form', 'b', oils_i18n_gettext('524', 'Microfiche', 'ccvm', 'value')),
+ (525, 'item_form', 'c', oils_i18n_gettext('525', 'Microopaque', 'ccvm', 'value')),
+ (526, 'item_form', 'd', oils_i18n_gettext('526', 'Large print', 'ccvm', 'value')),
+ (527, 'item_form', 'f', oils_i18n_gettext('527', 'Braille', 'ccvm', 'value')),
+ (528, 'item_form', 'r', oils_i18n_gettext('528', 'Regular print reproduction', 'ccvm', 'value')),
+ (529, 'item_form', 's', oils_i18n_gettext('529', 'Electronic', 'ccvm', 'value'));
+
+INSERT INTO config.coded_value_map (id, ctype, code, value) VALUES
+ (530, 'bib_level', 'a', oils_i18n_gettext('530', 'Monographic component part', 'ccvm', 'value')),
+ (531, 'bib_level', 'b', oils_i18n_gettext('531', 'Serial component part', 'ccvm', 'value')),
+ (532, 'bib_level', 'c', oils_i18n_gettext('532', 'Collection', 'ccvm', 'value')),
+ (533, 'bib_level', 'd', oils_i18n_gettext('533', 'Subunit', 'ccvm', 'value')),
+ (534, 'bib_level', 'i', oils_i18n_gettext('534', 'Integrating resource', 'ccvm', 'value')),
+ (535, 'bib_level', 'm', oils_i18n_gettext('535', 'Monograph/Item', 'ccvm', 'value')),
+ (536, 'bib_level', 's', oils_i18n_gettext('536', 'Serial', 'ccvm', 'value'));
+
+
-- Trigger Event Definitions -------------------------------------------------
-- Sample Overdue Notice --
WHERE i.func IN ('replace')
AND m.id IN (19);
+INSERT INTO config.record_attr_index_norm_map (attr,norm,pos)
+ SELECT m.name, i.id, 0
+ FROM config.record_attr_definition m,
+ config.index_normalizer i
+ WHERE i.func IN ('content_or_null')
+ AND m.name IN ('titlesort', 'authorsort');
+
+INSERT INTO config.record_attr_index_norm_map (attr,norm,pos)
+ SELECT m.name, i.id, 0
+ FROM config.record_attr_definition m,
+ config.index_normalizer i
+ WHERE i.func IN ('integer_or_null')
+ AND m.name IN ('date1', 'date2', 'pubdate');
+
+INSERT INTO config.record_attr_index_norm_map (attr,norm,pos)
+ SELECT m.name, i.id, 0
+ FROM config.record_attr_definition m,
+ config.index_normalizer i
+ WHERE i.func IN ('approximate_low_date')
+ AND m.name IN ('date1', 'pubdate');
+
+INSERT INTO config.record_attr_index_norm_map (attr,norm,pos)
+ SELECT m.name, i.id, 0
+ FROM config.record_attr_definition m,
+ config.index_normalizer i
+ WHERE i.func IN ('approximate_high_date')
+ AND m.name IN ('date2');
+
-- claims never checked out mark item missing
INSERT INTO
config.org_unit_setting_type ( name, label, description, datatype )