Bugzilla – Attachment 23954 Details for
Bug 10896
Add a --verbose option to koha-translate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10896: Add a --verbose option to koha-translate
Bug-10896-Add-a---verbose-option-to-koha-translate.patch (text/plain), 3.95 KB, created by
Tomás Cohen Arazi
on 2014-01-06 14:08:10 UTC
(
hide
)
Description:
Bug 10896: Add a --verbose option to koha-translate
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2014-01-06 14:08:10 UTC
Size:
3.95 KB
patch
obsolete
>From e1eaeeaab8ed4ac702b8fd533c47e0257d10b716 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 6 Jan 2014 10:52:38 -0300 >Subject: [PATCH] Bug 10896: Add a --verbose option to koha-translate > >The -v and --verbose option switches add the --verbose switch to the >misc/translator/translate script call in the packages' 'koha-translate' >command. > >The docs are updated accordingly. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba >--- > debian/docs/koha-translate.xml | 8 +++++++- > debian/scripts/koha-translate | 16 +++++++++++++--- > 2 files changed, 20 insertions(+), 4 deletions(-) > >diff --git a/debian/docs/koha-translate.xml b/debian/docs/koha-translate.xml >index e06dede..67abbe6 100644 >--- a/debian/docs/koha-translate.xml >+++ b/debian/docs/koha-translate.xml >@@ -23,7 +23,7 @@ > > <refsynopsisdiv> > <cmdsynopsis> >- <command>koha-translate</command> <arg><option>-i</option>|<option>--install</option></arg> <arg><option>-u</option>|<option>--update</option></arg> <arg><option>-r</option>|<option>--remove</option></arg> <arg><option>-c</option>|<option>--check</option></arg> <arg choice="req" rep="norepeat"><replaceable>lang_code</replaceable></arg> >+ <command>koha-translate</command> <arg><option>-i</option>|<option>--install</option></arg> <arg><option>-u</option>|<option>--update</option></arg> <arg><option>-r</option>|<option>--remove</option></arg> <arg><option>-c</option>|<option>--check</option></arg> <arg>[<option>-v</option>|<option>--verbose</option>]</arg> <arg choice="req" rep="norepeat"><replaceable>lang_code</replaceable></arg> > <command>koha-translate</command> <arg><option>-l</option>|<option>--list</option></arg> <arg><option>-a</option>|<option>--available</option></arg> > </cmdsynopsis> > </refsynopsisdiv> >@@ -66,6 +66,12 @@ > <para>Update the specified lang_code language translation.</para> > </listitem> > </varlistentry> >+ <varlistentry> >+ <term><option>-v, --verbose</option></term> >+ <listitem> >+ <para>Be more verbose on the translation process.</para> >+ </listitem> >+ </varlistentry> > > </variablelist> > </refsect1> >diff --git a/debian/scripts/koha-translate b/debian/scripts/koha-translate >index 0c731cf..c579a7b 100755 >--- a/debian/scripts/koha-translate >+++ b/debian/scripts/koha-translate >@@ -44,6 +44,7 @@ $scriptname -h > -i | --install Install the specified language translations > -u | --update Update the specified language translations > -r | --remove Remove the specified language translations >+ -v | --verbose Be more verbose on the translation process > -h | --help Display this help message > > EOF >@@ -82,7 +83,12 @@ print_installed() > > install_lang() > { >- lang=$1 >+ local lang=$1 >+ local translate_opts="" >+ >+ if [ "$verbose" = "yes" ]; then >+ translate_opts="--verbose" >+ fi > > if [ "$lang" != "" ]; then > >@@ -97,7 +103,7 @@ install_lang() > # 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 >+ $PERL_CMD $TRANSLATE_DIR/translate install $translate_opts $lang > fi > else > die "Error: the selected language is not currently available." >@@ -195,9 +201,10 @@ PERL_CMD=`which perl` > list_all="" > op="" > language="" >+verbose="no" > > # We accept at most 2 parameters >-[ $# -ge 1 ] && [ $# -le 3 ] || ( usage ; die "Error: wrong parameters" ) >+[ $# -ge 1 ] && [ $# -le 4 ] || ( usage ; die "Error: wrong parameters" ) > > # Read parameters > while [ $# -gt 0 ]; do >@@ -224,6 +231,9 @@ while [ $# -gt 0 ]; do > -a|--available) > list_all=1 > shift ;; >+ -v|--verbose) >+ verbose="yes" >+ shift ;; > -*) > usage > die "Error: unknown parameter $1." ;; >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10896
:
23954
|
24105
|
24231
|
24241