This repository was archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default 'validate' option to CONTENT as in help text (#111)
- Loading branch information
Showing
3 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,12 +23,16 @@ | |
|
||
import com.google.common.collect.ImmutableList; | ||
import org.kohsuke.args4j.Option; | ||
import org.zanata.adapter.xliff.XliffCommon; | ||
import org.zanata.client.commands.AbstractPushPullOptionsImpl; | ||
import org.zanata.client.commands.BooleanValueHandler; | ||
import org.zanata.client.commands.PushPullType; | ||
import org.zanata.client.commands.ZanataCommand; | ||
import org.zanata.util.StringUtil; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* @author Sean Flanigan <a | ||
* href="mailto:[email protected]">[email protected]</a> | ||
|
@@ -58,6 +62,7 @@ public class PushOptionsImpl extends AbstractPushPullOptionsImpl<PushOptions> | |
private String pushType = DEF_PUSH_TYPE; | ||
private String sourceLang = "en-US"; | ||
|
||
@Nullable | ||
private String validate; | ||
private boolean myTrans = DEF_MY_TRANS; | ||
|
||
|
@@ -250,7 +255,11 @@ void setExcludeLocaleFilenames(boolean excludeLocaleFilenames) { | |
} | ||
|
||
@Override | ||
@Nonnull | ||
public String getValidate() { | ||
if (validate == null) { | ||
return XliffCommon.ValidationType.CONTENT.name(); | ||
} | ||
return validate; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ | |
import org.zanata.client.commands.push.PushOptions; | ||
import org.zanata.client.commands.push.RawPushCommand; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
/** | ||
* @author Sean Flanigan <a | ||
* href="mailto:[email protected]">[email protected]</a> | ||
|
@@ -211,6 +213,7 @@ public boolean getExcludeLocaleFilenames() { | |
} | ||
|
||
@Override | ||
@Nonnull | ||
public String getValidate() { | ||
return validate; | ||
} | ||
|