Bug 696515 - python client usability: add --dir option to push/pull commands
python client usability: add --dir option to push/pull commands
Product: Zanata
Classification: Community
Component: Component-PythonClient (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: James Ni
Ding-Yi Chen
: Improvement
Depends On:
  Show dependency treegraph
Reported: 2011-04-14 04:02 EDT by Sean Flanigan
Modified: 2011-11-29 01:24 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-11-29 01:24:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sean Flanigan 2011-04-14 04:02:31 EDT
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 02:06:34 EDT
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.