Bug 696515

Summary: python client usability: add --dir option to push/pull commands
Product: [Retired] Zanata Reporter: Sean Flanigan <sflaniga>
Component: Component-PythonClientAssignee: James Ni <jni>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jni, zanata-bugs
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-29 06:24:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.