Bug 10896 - Add a --verbose option to koha-translate
Summary: Add a --verbose option to koha-translate
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-16 17:41 UTC by Magnus Enger
Modified: 2015-06-04 23:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10896: Add a --verbose option to koha-translate (3.95 KB, patch)
2014-01-06 14:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 10896: Add a --verbose option to koha-translate (3.99 KB, patch)
2014-01-09 19:02 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10896: Add a --verbose option to koha-translate (4.11 KB, patch)
2014-01-13 18:27 UTC, Magnus Enger
Details | Diff | Splinter Review
[PASSED QA] Bug 10896: Add a --verbose option to koha-translate (4.17 KB, patch)
2014-01-13 20:38 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2013-09-16 17:41:06 UTC
koha-translate is a really good addition to the scripts provided by the packages, but currently there is no --verbose option that makes it possible to see the verbose output from the "translate" script. I find that sometimes it is useful to see that output.
Comment 1 Tomás Cohen Arazi 2014-01-06 14:08:10 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2014-01-06 20:13:51 UTC
The options seem to do their job nicely, but I see one small problem in the man page:

  <arg>[<option>-v</option>|<option>--verbose</option>]</arg>

The literal brackets [] result in double brackets in the man page:

  koha-translate [-i|--install] [-u|--update] [-r|--remove] [-c|--check] [[-v|--verbose]] {lang_code}

Just remove the literal brackets and it should be OK. 

But while yu are in there, could you also put the two synopsis'es (?) into separate <cmdsynopsis>? From this:

  <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>[<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>

To this:

  <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>[<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>
    </cmdsynopsis>
  </refsynopsisdiv>

As it is now, the two lines are run into one, this will put them on separate lines.
Comment 3 Tomás Cohen Arazi 2014-01-09 19:02:48 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2014-01-13 18:27:43 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-01-13 20:38:50 UTC
Created attachment 24241 [details] [review]
[PASSED QA] 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
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as expected with and without -v. Man page looks good.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 6 Galen Charlton 2014-01-13 22:01:43 UTC
Pushed to master.  Thanks, Tomás!
Comment 7 Fridolin Somers 2014-02-08 09:13:59 UTC
Patch pushed to 3.14.x, will be in 3.14.4.
Comment 8 Tomás Cohen Arazi 2014-02-10 15:26:36 UTC
This patch has been pushed to 3.12.x, will be in 3.12.11.