Bug 696515 - python client usability: add --dir option to push/pull commands
Summary: python client usability: add --dir option to push/pull commands
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-PythonClient
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: James Ni
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-14 08:02 UTC by Sean Flanigan
Modified: 2011-11-29 06:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-29 06:24:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Sean Flanigan 2011-04-14 08:02:31 UTC
The publican-push/po-push commands have separate options to specify the directories which contain POT and PO files.

But in most cases, especially for publican, the POT directory and the locale directories have the same parent directory, and it should be possible to find the POT and PO dirs from this parent directory.

The defaults are "./pot" and ".", which works well if the pot and locale dirs are directly under the current dir.  But if the pot and locale directories are under a subdirectory, you end up needing a command line like this:
  zanata publican push --srcdir docbook/pot --transdir docbook --import-po

If we were to introduce a --dir option, this would be enough:
  zanata publican push --dir docbook --import-po

This would look for pot files in "docbook/pot", and PO directories in "docbook".

--dir could work in a similar way for publican-pull (basically an alias for --dstdir).

In the case of po-push/po-pull, the rules for finding POT and PO files from a --dir option would be slightly different, but the principle is the same: --dir should point to the parent of the POT and PO dirs, and we should use sensible defaults to find the actual POT/PO dirs.  We should probably discuss the appropriate defaults for software projects.

NB: If present --srcdir, --transdir and --dstdir should override --dir's defaults.

Comment 1 James Ni 2011-04-26 06:06:34 UTC
I have add --dir option for publican push/pull, but not add this option for software project, you can find changes in commit bf9b481 of devel branch of zanataclient on github.


Note You need to log in before you can comment on or make changes to this bug.