public class PropertiesStrategy extends AbstractPullStrategy
Modifier | Constructor and Description |
---|---|
protected |
PropertiesStrategy(PullOptions opts) |
Modifier and Type | Method and Description |
---|---|
org.zanata.rest.StringSet |
getExtensions()
Which extensions (eg gettext, comment) does this strategy need to fetch from the server?
|
File |
getTransFileToWrite(String docName,
LocaleMapping localeMapping)
Provides the file reference that will be used to write a Translation file
for a given Resource.
|
boolean |
needsDocToWriteTrans()
Does this strategy need the source document (Resource) when writing translations?
|
void |
writeSrcFile(org.zanata.rest.dto.resource.Resource doc) |
org.zanata.common.io.FileDetails |
writeTransFile(org.zanata.rest.dto.resource.Resource doc,
String docName,
LocaleMapping localeMapping,
org.zanata.rest.dto.resource.TranslationsResource targetDoc)
pre: docWithLocalName.getName() must match docName if docWithLocalName is not null
|
getOpts, isTransOnly
protected PropertiesStrategy(PullOptions opts)
public org.zanata.rest.StringSet getExtensions()
PullStrategy
public boolean needsDocToWriteTrans()
PullStrategy
public void writeSrcFile(org.zanata.rest.dto.resource.Resource doc) throws IOException
IOException
public File getTransFileToWrite(String docName, LocaleMapping localeMapping)
PullStrategy
docName
- may be null if needsDocToWriteTrans() returns falselocaleMapping
- Locale mapping to use.public org.zanata.common.io.FileDetails writeTransFile(org.zanata.rest.dto.resource.Resource doc, String docName, LocaleMapping localeMapping, org.zanata.rest.dto.resource.TranslationsResource targetDoc) throws IOException
PullStrategy
doc
- may be null if needsDocToWriteTrans() returns falsedocName
- may be null if needsDocToWriteTrans() returns falseIOException
Copyright © 2013 Zanata Project. All rights reserved.