View | Details | Raw Unified | Return to bug 10896
Collapse All | Expand All

(-)a/debian/docs/koha-translate.xml (-1 / +9 lines)
Lines 23-29 Link Here
23
23
24
  <refsynopsisdiv>
24
  <refsynopsisdiv>
25
    <cmdsynopsis>
25
    <cmdsynopsis>
26
      <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>
26
      <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>
27
    </cmdsynopsis>
28
    <cmdsynopsis>
27
      <command>koha-translate</command> <arg><option>-l</option>|<option>--list</option></arg> <arg><option>-a</option>|<option>--available</option></arg>
29
      <command>koha-translate</command> <arg><option>-l</option>|<option>--list</option></arg> <arg><option>-a</option>|<option>--available</option></arg>
28
    </cmdsynopsis>
30
    </cmdsynopsis>
29
  </refsynopsisdiv>
31
  </refsynopsisdiv>
Lines 66-71 Link Here
66
        <para>Update the specified lang_code language translation.</para>
68
        <para>Update the specified lang_code language translation.</para>
67
      </listitem>
69
      </listitem>
68
    </varlistentry>
70
    </varlistentry>
71
    <varlistentry>
72
      <term><option>-v, --verbose</option></term>
73
      <listitem>
74
        <para>Be more verbose on the translation process.</para>
75
      </listitem>
76
    </varlistentry>
69
77
70
 </variablelist>
78
 </variablelist>
71
  </refsect1>
79
  </refsect1>
(-)a/debian/scripts/koha-translate (-4 / +13 lines)
Lines 44-49 $scriptname -h Link Here
44
    -i | --install        Install the specified language translations
44
    -i | --install        Install the specified language translations
45
    -u | --update         Update the specified language translations
45
    -u | --update         Update the specified language translations
46
    -r | --remove         Remove the specified language translations
46
    -r | --remove         Remove the specified language translations
47
    -v | --verbose        Be more verbose on the translation process
47
    -h | --help           Display this help message
48
    -h | --help           Display this help message
48
49
49
EOF
50
EOF
Lines 82-88 print_installed() Link Here
82
83
83
install_lang()
84
install_lang()
84
{
85
{
85
    lang=$1
86
    local lang=$1
87
    local translate_opts=""
88
89
    if [ "$verbose" = "yes" ]; then
90
        translate_opts="--verbose"
91
    fi
86
92
87
    if [ "$lang" != "" ]; then
93
    if [ "$lang" != "" ]; then
88
94
Lines 97-103 install_lang() Link Here
97
                # Check po files are present
103
                # Check po files are present
98
                check_lang_po_files $lang
104
                check_lang_po_files $lang
99
                env PERL5LIB="$KOHA_LIB_DIR:$TRANSLATE_DIR" KOHA_CONF="$KOHA_CONF_FILE"\
105
                env PERL5LIB="$KOHA_LIB_DIR:$TRANSLATE_DIR" KOHA_CONF="$KOHA_CONF_FILE"\
100
                    $PERL_CMD $TRANSLATE_DIR/translate install $lang
106
                    $PERL_CMD $TRANSLATE_DIR/translate install $translate_opts $lang
101
            fi
107
            fi
102
        else
108
        else
103
            die "Error: the selected language is not currently available."
109
            die "Error: the selected language is not currently available."
Lines 195-203 PERL_CMD=`which perl` Link Here
195
list_all=""
201
list_all=""
196
op=""
202
op=""
197
language=""
203
language=""
204
verbose="no"
198
205
199
# We accept at most 2 parameters
206
# We accept at most 2 parameters
200
[ $# -ge 1 ] && [ $# -le 3 ] || ( usage ; die "Error: wrong parameters" )
207
[ $# -ge 1 ] && [ $# -le 4 ] || ( usage ; die "Error: wrong parameters" )
201
208
202
# Read parameters
209
# Read parameters
203
while [ $# -gt 0 ]; do
210
while [ $# -gt 0 ]; do
Lines 224-229 while [ $# -gt 0 ]; do Link Here
224
        -a|--available)
231
        -a|--available)
225
            list_all=1
232
            list_all=1
226
            shift ;;
233
            shift ;;
234
        -v|--verbose)
235
            verbose="yes"
236
            shift ;;
227
        -*)
237
        -*)
228
            usage
238
            usage
229
            die "Error: unknown parameter $1." ;;
239
            die "Error: unknown parameter $1." ;;
230
- 

Return to bug 10896