rhbz1110627 zanata init

https://bugzilla.redhat.com/show_bug.cgi?id=1110627
and https://bugzilla.redhat.com/show_bug.cgi?id=1038852

Depends on https://github.com/zanata/zanata-api/pull/15 and https://github.com/zanata/zanata-server/pull/520
They will receive an error from the server once they fill in all fields. There is a hint for allowed value in this field. But if user neglect it, not much we can do. This is not web UI can't offer everything in turns of UX. 

----- Original Message -----

> From: "David Mason" <notifications@github.com>
> To: "zanata/zanata-client" <zanata-client@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Friday, July 18, 2014 1:31:57 PM
> Subject: Re: [zanata-client] rhbz1110627 zanata init (#27)

> In
> zanata-client-commands/src/main/java/org/zanata/client/commands/init/ProjectPrompt.java:
> > +            filteredProjects = ImmutableList.copyOf(allProjects);
> > +        }
> > +    }
> > +
> > +    @VisibleForTesting
> > +    protected void setAllAndFilteredProjects(List<Project> allProjects,
> > +            List<Project> filteredProjects) {
> > +        this.allProjects = allProjects;
> > +        this.filteredProjects = filteredProjects;
> > +    }
> > +
> > +    @VisibleForTesting
> > +    protected void createNewProject() {
> > +        interactiveable.printfln(Hint, _("create.project.help"));
> > +        interactiveable.printfln(Question, _("project.id.prompt"));
> > +        String projectId = interactiveable.expectAnyAnswer();

> There are some fairly strict constraints on what is allowed in a project
> type. What happens here if the user types something with spaces in it, for
> example?

> —
> Reply to this email directly or view it on GitHub .