<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>
+ </cmdsynopsis>
+ <cmdsynopsis>
<command>koha-translate</command> <arg><option>-l</option>|<option>--list</option></arg> <arg><option>-a</option>|<option>--available</option></arg>
<command>koha-translate</command> <arg><option>-h</option>|<option>--help</option></arg>
</cmdsynopsis>
<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>
-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
install_lang()
{
- lang=$1
+ local lang=$1
+ local translate_opts=""
+
+ if [ "$verbose" = "yes" ]; then
+ translate_opts="--verbose"
+ fi
if [ "$lang" != "" ]; then
# 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."
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
-a|--available)
list_all=1
shift ;;
+ -v|--verbose)
+ verbose="yes"
+ shift ;;
-*)
usage
die "Error: unknown parameter $1." ;;