From nengard at bywatersolutions.com Tue Apr 2 14:32:14 2013
From: nengard at bywatersolutions.com (Nicole C. Engard)
Date: Tue, 2 Apr 2013 08:32:14 -0400
Subject: [Koha-patches] [PATCH 1/2] Bug 9850: Add Plugin Help File for 3.12
Message-ID: <1364905935-1865-1-git-send-email-nengard@bywatersolutions.com>
This adds a help file to the new plugins module.
To test:
Activate the plugin module and check the text and links in the help file
---
.../prog/en/modules/help/plugins/plugins-home.tt | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-home.tt
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-home.tt
new file mode 100644
index 0000000..ac8eb6a
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-home.tt
@@ -0,0 +1,11 @@
+[% INCLUDE 'help-top.inc' %]
+
+
Plugins
+
+
Koha's Plugin System allows for you to add additional tools and reports to Koha that are specific to your library. Plugins are installed by uploading KPZ ( Koha Plugin Zip ) packages. A KPZ file is just a zip file containing the perl files, template files, and any other files neccessary to make the plugin work.
+
+
The plugin system needs to be turned on by a system administrator and should only managed by those who understand Perl and the way data connects within Koha.
+
+
See the full documentation for the Plugin System in the manual (online).
+
+[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
--
1.7.2.3
From nengard at bywatersolutions.com Tue Apr 2 14:32:15 2013
From: nengard at bywatersolutions.com (Nicole C. Engard)
Date: Tue, 2 Apr 2013 08:32:15 -0400
Subject: [Koha-patches] [PATCH 2/2] Bug 9850: FOLLOW UP: Add Missing Plugin
Help for 3.12
In-Reply-To: <1364905935-1865-1-git-send-email-nengard@bywatersolutions.com>
References: <1364905935-1865-1-git-send-email-nengard@bywatersolutions.com>
Message-ID: <1364905935-1865-2-git-send-email-nengard@bywatersolutions.com>
This patch is a follow up to the one that adds the plugin help.
To test:
Visit the upload a plugin page and review the help and links.
---
.../prog/en/modules/help/plugins/plugins-upload.tt | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-upload.tt
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-upload.tt
new file mode 100644
index 0000000..c99568c
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/plugins/plugins-upload.tt
@@ -0,0 +1,11 @@
+[% INCLUDE 'help-top.inc' %]
+
+
Upload koha plugin
+
+
Koha's Plugin System allows for you to add additional tools and reports to Koha that are specific to your library. Plugins are installed by uploading KPZ ( Koha Plugin Zip ) packages. A KPZ file is just a zip file containing the perl files, template files, and any other files neccessary to make the plugin work.
+
+
Important: Only install plugins from trusted sources.
+
+
See the full documentation for the Plugin System in the manual (online).
+
+[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
--
1.7.2.3
From oleonard at myacpl.org Tue Apr 2 15:16:43 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Tue, 2 Apr 2013 09:16:43 -0400
Subject: [Koha-patches] [PATCH] Bug 9970 - Add datepicker default
configuration to OPAC patron entry form
Message-ID: <1364908603-13836-1-git-send-email-oleonard@myacpl.org>
The datepicker on the OPAC patron entry/update form
(opac-memberentry.pl) doesn't show a calendar icon. This is because
although there is in-page JS to trigger the widget, the page doesn't
include the file which sets some widget defaults, including the path to
the calendar icon and the translatable strings for calendar labels.
This patch simply adds calendar.inc to the template.
To test, load the patron entry/update form (click "personal details" for
an existing patron or a start new patron registration). The date of
birth entry field should show a calendar icon.
---
.../opac-tmpl/prog/en/modules/opac-memberentry.tt | 1 +
1 file changed, 1 insertion(+)
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt
index d41917c..95149b3 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt
@@ -4,6 +4,7 @@
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]
[% INCLUDE 'doc-head-close.inc' %]
+ [% INCLUDE 'calendar.inc' %]
@@ -71,7 +49,6 @@ $(document).ready(function() {
-
[% END %]
--
1.7.9.5
From oleonard at myacpl.org Tue Apr 9 21:18:43 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Tue, 9 Apr 2013 15:18:43 -0400
Subject: [Koha-patches] [PATCH] Bug 10015 - UniqueItemFields could have link
to database documentation
Message-ID: <1365535124-19413-1-git-send-email-oleonard@myacpl.org>
Other system preferences which require entry of database column names
include a link to the scheme for reference. The UniqueItemFields should
do the same. This patch rewords the preference description to
incorporate a link.
To test, open the acquisitions tab in system preferences and confirm
that the UniqueItemFields description looks correct and links to the
right page in the schema.
---
.../en/modules/admin/preferences/acquisitions.pref | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref
index 1ec49ff..ea02dd8 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref
@@ -9,8 +9,9 @@ Acquisitions:
receiving: receiving an order.
cataloguing: cataloging the record.
-
+ - "The following database columns should be unique in an item:"
- pref: UniqueItemFields
- - (space-separated list of fields that should be unique for items, must be valid SQL fields of items table)
+ - (separated by a space)
-
- When closing or reopening a basket,
- pref: BasketConfirmations
--
1.7.9.5
From oleonard at myacpl.org Tue Apr 9 21:33:30 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Tue, 9 Apr 2013 15:33:30 -0400
Subject: [Koha-patches] [PATCH] Bug 10008 - Serials search results 'Opened'
tab should be 'Open'
Message-ID: <1365536010-19793-1-git-send-email-oleonard@myacpl.org>
The searials search results "Opened" tab should be labeled "Open." This
patch makes this correction and changes the wording in another place
which used "opened." Markup has also been added to maintain consistency
in display of messages.
To test, perform a search for a subscription. If your search returns
results you should see an "Open" and a "Closed" tab. To test other
affected changes perform searches which return no results, only open
subscriptions, or only closed subscriptions. "No results" messages
should display correctly and consistently.
---
.../prog/en/modules/serials/serials-search.tt | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
index 0c937bf..459a80a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
@@ -105,7 +105,7 @@
[% IF ( total ) %]
@@ -188,7 +188,9 @@
[% ELSE %]
- There is no opened subscription for your search.
+
+
Your search returned no open subscriptions.
+
[% END %]
@@ -252,10 +254,16 @@
[% ELSE %]
- There is no closed subscription for your search.
+
+
Your search returned no closed subscriptions.
+
[% END %]
+ [% ELSE %]
+
+
Your search returned no results.
+
[% END %]
[% END %]
--
1.7.9.5
From oleonard at myacpl.org Tue Apr 9 21:54:15 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Tue, 9 Apr 2013 15:54:15 -0400
Subject: [Koha-patches] [PATCH] Bug 10002 - Don't include line breaks in
strings that are translated
Message-ID: <1365537255-20352-1-git-send-email-oleonard@myacpl.org>
Several JS alert messages contain "\n" which is problematic for
translation. This patch removes those instances (a line break is not
strictly necessary anyway). Also corrected: two instances of "holds(s)"
To test, place a hold on a title with items. From the biblio detail page
choose Edit -> Delete all items and Edit -> Delete record. In each case
you should see error messages with no line breaks and no misspellings.
Delete all items attached to the record with holds from the item edit
page. Go back to the detail page and choose Edit -> Delete record. You
should see an error message about existing hold(s) with no line breaks
or misspellings.
---
.../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
index 2dde5ad..f669d2c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
@@ -34,9 +34,9 @@
var is_confirmed;
if (count > 0){
- is_confirmed = alert( count + " " +_("item(s) are attached to this record.\nYou must delete all items before deleting this record.") );
+ is_confirmed = alert( count + " " +_("item(s) are attached to this record. You must delete all items before deleting this record.") );
} else if ( holdcount > 0 ) {
- is_confirmed = confirm( holdcount + " " + _("holds(s) for this record \n Are you sure you want to delete this record?."));
+ is_confirmed = confirm( holdcount + " " + _("hold(s) on this record. Are you sure you want to delete this record?."));
} else {
is_confirmed = confirm(_("Are you sure you want to delete this record?"));
}
@@ -59,7 +59,7 @@
var holdcount = [% holdcount %];
if ( holdcount > 0 ) {
- alert( holdcount + " " + _("holds(s) for this record \n You must delete all holds before deleting all items.") );
+ alert( holdcount + " " + _("hold(s) on this record. You must delete all holds before deleting all items.") );
} else if ( count > 0 ) {
if( confirm( _("Are you sure you want to delete the") + " " + count + " " + _("attached items?") ) ) {
window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]";
--
1.7.9.5
From oleonard at myacpl.org Wed Apr 10 20:34:20 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Wed, 10 Apr 2013 14:34:20 -0400
Subject: [Koha-patches] [PATCH] Bug 10026 - OPAC cart not showing location
anymore
Message-ID: <1365618861-23494-1-git-send-email-oleonard@myacpl.org>
When Bug 7570 added availability information to the cart it switched
which subroutine was used to get item information, and thus changed how
the information was being returned.
This patch makes accommodations for this change by adding processing of
item location information to the script in a way that will match the
existing template variables.
To test, add items to the cart in the OPAC some of which include
shelving location information. When you view the cart you should see the
shelving location displayed.
---
opac/opac-basket.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl
index cf75eb7..7b3a90a 100755
--- a/opac/opac-basket.pl
+++ b/opac/opac-basket.pl
@@ -78,6 +78,7 @@ foreach my $biblionumber ( @bibs ) {
$hasauthors = 1;
}
my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
+ my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
# COinS format FIXME: for books Only
my $coins_format;
@@ -92,6 +93,9 @@ foreach my $biblionumber ( @bibs ) {
my $branches = GetBranches();
for my $itm (@items) {
+ if ($itm->{'location'}){
+ $itm->{'location_opac'} = $shelflocations->{$itm->{'location'} };
+ }
my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber});
if ( defined( $transfertwhen ) && $transfertwhen ne '' ) {
$itm->{transfertwhen} = $transfertwhen;
--
1.7.9.5
From tomascohen at gmail.com Sun Apr 14 02:22:45 2013
From: tomascohen at gmail.com (Tomas Cohen Arazi)
Date: Sat, 13 Apr 2013 21:22:45 -0300
Subject: [Koha-patches] [PATCH] Bug 10041 - Provide a koha-translate script
to aid package users on installing translations
Message-ID: <1365898965-31286-1-git-send-email-tomascohen@gmail.com>
Until we have solved the packaging of koha template translations, provide a command that manages the installed translations in a proper way.
To test, build a Debian package of current master+the patches from this bug :-D and try the many options running koha-translate --help provide.
The command itself can be grabbed from a git checkout with this patch applied to test the script's funcionality. If it (and its docs) fits the package building stuff, I'll test on monday when I can be back on my workstation.
Sponsored-by: Universidad Nacional de C?rdoba
---
debian/docs/koha-translate.xml | 73 ++++++++++++++
debian/koha-common.install | 1 +
debian/scripts/koha-translate | 205 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 279 insertions(+)
create mode 100644 debian/docs/koha-translate.xml
create mode 100755 debian/scripts/koha-translate
diff --git a/debian/docs/koha-translate.xml b/debian/docs/koha-translate.xml
new file mode 100644
index 0000000..e14ab72
--- /dev/null
+++ b/debian/docs/koha-translate.xml
@@ -0,0 +1,73 @@
+
+koha-translate
+
+Koha is the first free software library automation package.
+
+ The Koha Community
+ http://koha-community.org/
+
+
+
+
+
+
+ koha-translate
+ 8
+
+
+
+ koha-translate
+ Manage Koha templates translations
+ UNIX/Linux
+
+
+
+
+ koha-translate|||lang_code
+ koha-translate||
+
+
+
+ Options
+
+
+
+
+ (For use with --list) List the available language translations.
+
+
+
+
+
+ Install the specified lang_code language translation.
+
+
+
+
+
+ List the installed or available (combined with -a) language translations.
+
+
+
+
+
+ Remove the specified lang_code language translation.
+
+
+
+
+
+ Update the specified lang_code language translation.
+
+
+
+
+
+
+ Description
+ Manage Koha templates translations.
+
+
+
+
+
diff --git a/debian/koha-common.install b/debian/koha-common.install
index 8288c39..0e542bb 100644
--- a/debian/koha-common.install
+++ b/debian/koha-common.install
@@ -28,6 +28,7 @@ debian/scripts/koha-run-backups usr/sbin
debian/scripts/koha-shell usr/sbin
debian/scripts/koha-start-zebra usr/sbin
debian/scripts/koha-stop-zebra usr/sbin
+debian/scripts/koha-translate usr/sbin
debian/scripts/koha-upgrade-schema usr/sbin
debian/scripts/koha-upgrade-to-3.4 usr/sbin
debian/tmp_docbook/*.8 usr/share/man/man8
diff --git a/debian/scripts/koha-translate b/debian/scripts/koha-translate
new file mode 100755
index 0000000..9d81e1a
--- /dev/null
+++ b/debian/scripts/koha-translate
@@ -0,0 +1,205 @@
+#!/bin/sh
+#
+# koha-translate -- Manage Koha translations.
+# Copyright 2013 Tom?s Cohen Arazi
+# Universidad Nacional de C?rdoba
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+
+set -e
+
+usage()
+{
+ local scriptname=$(basename $0)
+ cat <&2
+ exit 1
+}
+
+list() {
+ all=$1
+ if [ "$all" != "" ]; then
+ print_available
+ else
+ print_installed
+ fi
+}
+
+print_available()
+{
+ for i in $(ls $PO_DIR | grep opac)
+ do
+ echo `basename $i -i-opac-t-prog-v-3006000.po`
+ done
+}
+
+print_installed()
+{
+ for i in $(ls $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/prog/ | grep -v -e images -e itemtypeimg)
+ do
+ echo $i
+ done
+}
+
+install_lang()
+{
+ lang=$1
+
+ if [ "$lang" != "" ]; then
+
+ if [ "$lang" = "en" ]; then
+ die "Error: the default language (en) is already installed."
+ fi
+
+ if print_available | grep -q $lang; then
+ if print_installed | grep -q $lang; then
+ die "Error: the selected language is already installed. Try --update if you want to re-install it."
+ else
+ env PERL5LIB="$KOHA_LIB_DIR:$TRANSLATE_DIR" KOHA_CONF="$KOHA_CONF_FILE"\
+ $PERL_CMD $TRANSLATE_DIR/translate install $lang
+ fi
+ else
+ die "Error: the selected language is not currently available."
+ fi
+
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+update_lang()
+{
+ lang=$1
+
+ if [ "$lang" != "" ]; then
+
+ if [ "$lang" = "en" ]; then
+ die "Error: the default language (en) cannot be updated."
+ fi
+
+ if print_installed | grep -q $lang; then
+ env PERL5LIB="$KOHA_LIB_DIR:$TRANSLATE_DIR" KOHA_CONF="$KOHA_CONF_FILE"\
+ $PERL_CMD $TRANSLATE_DIR/translate update $lang
+ else
+ die "Error: the selected language is not currently installed. Try --install."
+ fi
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+remove_lang()
+{
+ lang=$1
+
+ if [ "$lang" != "" ]; then
+
+ if [ "$lang" = "en" ]; then
+ die "Error: the default language (en) cannot be removed."
+ fi
+
+ if print_installed | grep -q $lang; then
+ rm -rf $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/prog/$lang
+ rm -rf $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/ccsr/$lang
+ rm -rf $KOHA_INSTALL_DIR/intranet/htdocs/intranet-tmpl/prog/$lang
+ else
+ die "Error: the selected language is not already installed."
+ fi
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+# Global PATH variables
+KOHA_INSTALL_DIR="/usr/share/koha"
+KOHA_LIB_DIR="/usr/share/koha/lib"
+KOHA_CONF_FILE="/etc/koha/koha-conf-site.xml.in"
+TRANSLATE_DIR="$KOHA_INSTALL_DIR/misc/translator"
+PO_DIR="$TRANSLATE_DIR/po"
+PERL_CMD=`which perl`
+# Control variables
+list_all=""
+
+# Read parameters
+while true ; do
+ case "$1" in
+ -h|--help)
+ op="help"
+ break ;;
+ -i|--install)
+ op="install"
+ language="$2"
+ shift 2 ;;
+ -u|--update)
+ op="update"
+ language="$2"
+ shift 2 ;;
+ -r|--remove)
+ op="remove"
+ language="$2"
+ shift 2 ;;
+ -l|--list)
+ op="list"
+ shift ;;
+ -a|--available)
+ list_all=1
+ shift ;;
+ *)
+ break ;;
+ esac
+done
+
+# Process the requested actions
+case $op in
+ "help")
+ usage ;;
+ "list")
+ list $list_all ;;
+ "install")
+ install_lang $language ;;
+ "update")
+ update_lang $language ;;
+ "remove")
+ remove_lang $language ;;
+ *)
+ usage
+ die "Error: wrong parameters..." ;;
+esac
+
+exit 0
+
--
1.7.10.4
From oleonard at myacpl.org Mon Apr 15 15:47:46 2013
From: oleonard at myacpl.org (Owen Leonard)
Date: Mon, 15 Apr 2013 09:47:46 -0400
Subject: [Koha-patches] [PATCH] Bug 10049 [Alternate] Comments tab shows ( )
instead of ( 0 ) on translated templates
Message-ID: <1366033666-25876-1-git-send-email-oleonard@myacpl.org>
This patch is an alternate solution to the problem of "0" not appearing
on the comment tab in translated templates. It uses the Template Toolkit
option of specifying a default value for a variable:
[% reviews.size || 0 %]
This syntax is already in use elsewhere in the template.
Same test plan:
1) Make sure comments/reviews are activated
2) Find a record with 0 comments/reviews in the opac
3) The tab shows: Comments ( 0 )
4) Switch to any other languages.
5) Tab now shows: ( )
6) Apply patch
7) Check English templates stil work correctly
8) Rerun 'perl translate install
9) Check display is now correct.
10) Also check that number shows correctly for records
with comments.
---
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
index 3c37bd1..a8dabf3 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
@@ -946,7 +946,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% END %]
[% IF ( reviewson ) %]
-
[% END %]
[% IF ( NovelistSelectProfile ) %]
--
1.7.9.5
From tomascohen at gmail.com Mon Apr 15 17:01:02 2013
From: tomascohen at gmail.com (Tomas Cohen Arazi)
Date: Mon, 15 Apr 2013 12:01:02 -0300
Subject: [Koha-patches] [PATCH] Bug 10041 - Provide a koha-translate script
to aid package users on installing translations
Message-ID: <1366038062-11677-1-git-send-email-tomascohen@gmail.com>
Until we have solved the packaging of koha template translations, provide a command that manages the installed translations in a proper way.
To test, build a Debian package of current master+the patches from this bug :-D and try the many options running koha-translate --help provide.
The command itself can be grabbed from a git checkout with this patch applied to test the script's funcionality. If it (and its docs) fits the package building stuff, I'll test on monday when I can be back on my workstation.
Sponsored-by: Universidad Nacional de C?rdoba
---
debian/docs/koha-translate.xml | 79 ++++++++++++
debian/koha-common.install | 1 +
debian/scripts/koha-translate | 257 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 337 insertions(+)
create mode 100644 debian/docs/koha-translate.xml
create mode 100755 debian/scripts/koha-translate
diff --git a/debian/docs/koha-translate.xml b/debian/docs/koha-translate.xml
new file mode 100644
index 0000000..b2bae3b
--- /dev/null
+++ b/debian/docs/koha-translate.xml
@@ -0,0 +1,79 @@
+
+koha-translate
+
+Koha is the first free software library automation package.
+
+ The Koha Community
+ http://koha-community.org/
+
+
+
+
+
+
+ koha-translate
+ 8
+
+
+
+ koha-translate
+ Manage Koha templates translations
+ UNIX/Linux
+
+
+
+
+ koha-translate||||lang_code
+ koha-translate||
+
+
+
+ Options
+
+
+
+
+ (For use with --list) List the available language translations.
+
+
+
+
+
+ Check if all the .PO files are present for the specified language.
+
+
+
+
+
+ Install the specified lang_code language translation.
+
+
+
+
+
+ List the installed or available (combined with -a) language translations.
+
+
+
+
+
+ Remove the specified lang_code language translation.
+
+
+
+
+
+ Update the specified lang_code language translation.
+
+
+
+
+
+
+ Description
+ Manage Koha templates translations.
+
+
+
+
+
diff --git a/debian/koha-common.install b/debian/koha-common.install
index 8288c39..0e542bb 100644
--- a/debian/koha-common.install
+++ b/debian/koha-common.install
@@ -28,6 +28,7 @@ debian/scripts/koha-run-backups usr/sbin
debian/scripts/koha-shell usr/sbin
debian/scripts/koha-start-zebra usr/sbin
debian/scripts/koha-stop-zebra usr/sbin
+debian/scripts/koha-translate usr/sbin
debian/scripts/koha-upgrade-schema usr/sbin
debian/scripts/koha-upgrade-to-3.4 usr/sbin
debian/tmp_docbook/*.8 usr/share/man/man8
diff --git a/debian/scripts/koha-translate b/debian/scripts/koha-translate
new file mode 100755
index 0000000..805b9c3
--- /dev/null
+++ b/debian/scripts/koha-translate
@@ -0,0 +1,257 @@
+#!/bin/sh
+#
+# koha-translate -- Manage Koha translations.
+# Copyright 2013 Tom?s Cohen Arazi
+# Universidad Nacional de C?rdoba
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+
+set -e
+
+usage()
+{
+ local scriptname=$(basename $0)
+ cat <&2
+ exit 1
+}
+
+list() {
+ all=$1
+ if [ "$all" != "" ]; then
+ print_available
+ else
+ print_installed
+ fi
+}
+
+print_available()
+{
+ # Loop over only one opac theme
+ for i in $( ls $PO_DIR | grep opac-t-prog )
+ do
+ echo `basename $i -i-opac-t-prog-v-3006000.po`
+ done
+}
+
+print_installed()
+{
+ ls $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/prog/ | \
+ grep -v -e images -e itemtypeimg
+}
+
+install_lang()
+{
+ lang=$1
+
+ if [ "$lang" != "" ]; then
+
+ if [ "$lang" = "en" ]; then
+ die "Error: the default language (en) is already installed."
+ fi
+
+ if print_available | grep -q $lang; then
+ if print_installed | grep -q $lang; then
+ die "Error: the selected language is already installed. Try --update if you want to re-install it."
+ else
+ # Check po files are present
+ check_lang_po_files $lang
+ env PERL5LIB="$KOHA_LIB_DIR:$TRANSLATE_DIR" KOHA_CONF="$KOHA_CONF_FILE"\
+ $PERL_CMD $TRANSLATE_DIR/translate install $lang
+ fi
+ else
+ die "Error: the selected language is not currently available."
+ fi
+
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+update_lang()
+{
+ lang=$1
+
+ if [ "$lang" != "" ]; then
+
+ if [ "$lang" = "en" ]; then
+ die "Error: the default language (en) cannot be updated."
+ fi
+
+ if print_installed | grep -q $lang; then
+ # Check po files are present
+ check_lang_po_files $lang
+ remove_lang $lang
+ install_lang $lang
+ else
+ die "Error: the selected language is not currently installed. Try --install."
+ fi
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+remove_lang()
+{
+ lang=$1
+
+ if [ "$lang" != "" ]; then
+
+ if [ "$lang" = "en" ]; then
+ die "Error: the default language (en) cannot be removed."
+ fi
+
+ if print_installed | grep -q $lang; then
+ rm -rf $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/prog/$lang
+ rm -rf $KOHA_INSTALL_DIR/opac/htdocs/opac-tmpl/ccsr/$lang
+ rm -rf $KOHA_INSTALL_DIR/intranet/htdocs/intranet-tmpl/prog/$lang
+ else
+ die "Error: the selected language is not already installed."
+ fi
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+check_lang_po_files()
+{
+ lang=$1
+ po_files="$PO_DIR/$lang-i-opac-t-prog-v-3006000.po
+ $PO_DIR/$lang-i-opac-t-ccsr-v-3006000.po
+ $PO_DIR/$lang-i-staff-t-prog-v-3006000.po
+ $PO_DIR/$lang-pref.po"
+
+ if [ "$lang" != "" ]; then
+
+ for po_file in $po_files
+ do
+ if [ ! -f $po_file ]; then
+ die "Error: $po_file not found."
+ fi
+ done
+ else
+ die "Error: no language code supplied."
+ fi
+}
+
+set_action()
+{
+ if [ "$op" = "" ]; then
+ op=$1
+ else
+ die "Error: only one action can be specified."
+ fi
+}
+
+# Global PATH variables
+KOHA_INSTALL_DIR="/usr/share/koha"
+KOHA_LIB_DIR="/usr/share/koha/lib"
+KOHA_CONF_FILE="/etc/koha/koha-conf-site.xml.in"
+TRANSLATE_DIR="$KOHA_INSTALL_DIR/misc/translator"
+PO_DIR="$TRANSLATE_DIR/po"
+PERL_CMD=`which perl`
+
+# Control variables
+list_all=""
+op=""
+language=""
+
+# We accept at most 2 parameters
+[ $# -ge 1 ] && [ $# -le 3 ] || (usage ; die "Error: wrong parameters")
+
+#set -- $(getopt -o hli:u:r: -l help,list,install:,update:,remove: \
+# -n "$0" -- "$@")
+
+
+# Read parameters
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -h|--help)
+ op="help"
+ break ;;
+ -c|--check)
+ set_action "check"
+ shift ;;
+ -i|--install)
+ set_action "install"
+ shift ;;
+ -u|--update)
+ set_action "update"
+ shift ;;
+ -r|--remove)
+ set_action "remove"
+ shift ;;
+ -l|--list)
+ set_action "list"
+ shift ;;
+ -a|--available)
+ list_all=1
+ shift ;;
+ -*)
+ usage
+ die "Error: unknown parameter $1." ;;
+ *)
+ language=$1
+ shift ;;
+ esac
+done
+
+# Process the requested actions
+case $op in
+ "help")
+ usage ;;
+ "list")
+ list $list_all ;;
+ "install")
+ install_lang $language ;;
+ "update")
+ update_lang $language ;;
+ "remove")
+ remove_lang $language ;;
+ "check")
+ check_lang_po_files $language ;;
+ *)
+ usage
+ die "Error: wrong parameters..." ;;
+esac
+
+exit 0
+
--
1.7.10.4
From oleonard at myacpl.org Mon Apr 15 21:11:59 2013
From: oleonard at myacpl.org (oleonard at myacpl.org)
Date: Mon, 15 Apr 2013 15:11:59 -0400
Subject: [Koha-patches] [PATCH] Bug 8278 [Follow-up] Replace YUI
autocomplete in UNIMARC 210c plugin
Message-ID: <516c511e.c4c0320a.4c87.0fa7@mx.google.com>
From: Owen Leonard
This follow-up corrects the heading of the plugin pop-up window to match
the UNIMARC field it targets.
To test, trigger the plugin and confirm that the pop-up window refers to
210c.
---
.../value_builder/unimarc_field_210c_bis.tt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt
index af5cdf6..796898d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c_bis.tt
@@ -1,5 +1,5 @@
[% INCLUDE 'doc-head-open.inc' %]
-Koha › UNIMARC field 225a builder
+Koha › UNIMARC field 210c builder
[% INCLUDE 'doc-head-close.inc' %]