Hide Forgot
command line: $ zanata init Search for zanata.ini. (If there's none, link them to the help page) Provide a list of servers to choose from If there's a zanata.xml, ask the user if they want to proceed, back it up and continue (tell them where it is) Select or create a project and version - If creating, also ask for Project type The client downloads the zanata.xml config file (new REST endpoint) ## add includes and excludes to zanata.xml A) Prompt for src dir. Prompt for includes and excludes Show a sample of the document names. Prompt for acceptance or back to A) B) Prompt for trans dir, . Show preview of translated content Prompt for acceptance of back to B) Offer a few useful commands plus urls (what next)
Without fixing Bug 1010132 first, the most reliable way for gettext project maintainers is copy from other working (i.e. correct map-from) and change the project and version, which make this RFE pointless.
I don't think it's pointless. There's still a lot of automation going on here which lowers the entry barrier.
With regards to: B) Prompt for trans dir, . Show preview of translated content I will assume this is similar to src dir, which will show a list of translation file names found. Since the total files will likely be large (number of source files multiply number of locales), only ONE locale (with translation) will be listed as preview. Any objection to this assumption please add comment in this bug.
Disregard comment 3 The actual intent is to output the will-be translation file names if user does a pull. No need to talk to server and no need to scan local directory. (In reply to Patrick Huang from comment #3) > With regards to: > B) Prompt for trans dir, . > Show preview of translated content > > I will assume this is similar to src dir, which will show a list of > translation file names found. Since the total files will likely be large > (number of source files multiply number of locales), only ONE locale (with > translation) will be listed as preview. > > Any objection to this assumption please add comment in this bug.
https://github.com/zanata/zanata-client/pull/27
Tested with commit 23647ce9e63a117e1cc569fd22070462220cf50e Test case: wildfly-master 1. When connect to the server that does not support zanata init, it shows following error after the translatable language list: [!] The server returned this error: <html><head><title>JBoss Web/7.3.0.Final-redhat-2 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 404 - Could not find resource for relative : /projects/p/wildfly/iterations/i/master/config of full path: http://zanata-stage.app.eng.bos.redhat.com/seam/resource/restv1/projects/p/wildfly/iterations/i/master/config</h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u>Could not find resource for relative : /projects/p/wildfly/iterations/i/master/config of full path: http://zanata-stage.app.eng.bos.redhat.com/seam/resource/restv1/projects/p/wildfly/iterations/i/master/config</u></p><p><b>JBWEB000069: description</b> <u>JBWEB000124: The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.3.0.Final-redhat-2</h3></body></html> Expected: a. The error message should be simpler, like "Unsupported server version". b. It should be shown right after you choose server, not wait until user type a lot of server. c. Since the server won't update soon most of the time, there is no point to try again now, so don't ask "Do you want to try again (y/n)?" 2. The source dir output is confusing: [WARNING] Source directory in zanata.xml is set to [.] but is now given as [/tmp/Wildfly/master/target/classes] [WARNING] You are overriding your Source directory defined in zanata.xml [WARNING] Translation directory in zanata.xml is set to [.] but is now given as [/tmp/Wildfly/master/src/main/resources] [WARNING] You are overriding your Translation directory defined in zanata.xml [INFO] You can define Includes in zanata.xml now (<includes>**/*.i18n.properties,**/LocalDescriptions.properties</includes>) [INFO] ignoring setDebug: use mvn -X to control debug logging The 1st line implies that zanata-init auto-detect the source dir, (which it does not), so better to remove it. The 3rd line should be removed for same reason. The 5th line should be moved to the "includes" setting. 3. When base directory: y Includes: Local* Excludes: Actual: Program quit with error Zanata mojo exception: basedir y does not exist Expected: Show error message directory "y" does not exist And a new question "What's your basedir?"
See https://github.com/zanata/zanata-client/pull/27#issuecomment-52734771 for checklist.
VERIFIED with Zanata 3.5.0-SNAPSHOT (git-jenkins-zanata-server-verify-integration-master-3850-SUCCESS-1-g3ba1568) and zanata-client commit 7ab5819cefde4b76a6256cc5ecd5e15435b5df73