/** * Gets the flag indicating if the inline code should use the place-holder notation (g and x elements). * @return true if the inline code should use the place-holder notation. */ public boolean getPlaceholderMode () { return getBoolean(PLACEHOLDERMODE); }
@Override public void reset() { super.reset(); setUseSourceForTranslated(false); setEscapeGt(false); setPlaceholderMode(true); setIncludeNoTranslate(true); setSetApprovedAsNoTranslate(false); setCopySource(true); setIncludeAltTrans(true); setIncludeCodeAttrs(false); setIncludeIts(true); setToolId(null); setToolName(null); setToolVersion(null); setToolCompany(null); setToolXmlSnippet(null); }
@Override protected void processStartDocument (Event event) { super.processStartDocument(event); writer = new XLIFFWriter(); writer.setOptions(manifest.getTargetLocale(), "UTF-8"); MergingInfo item = manifest.getItem(docId); rawDocPath = manifest.getTempSourceDirectory() + item.getRelativeInputPath() + ".xlf"; writer.setOutput(rawDocPath); // Not really used, but doesn't hurt just in case XLIFFWriterParameters paramsXliff = (XLIFFWriterParameters)writer.getParameters(); // Set the writer's options if ( forOmegat ) { // Direct setting for the writer (not an XLIFF option) paramsXliff.setUseSourceForTranslated(true); } paramsXliff.setPlaceholderMode(options.getPlaceholderMode()); paramsXliff.setCopySource(options.getCopySource()); paramsXliff.setIncludeAltTrans(options.getIncludeAltTrans()); paramsXliff.setSetApprovedAsNoTranslate(options.getSetApprovedAsNoTranslate()); paramsXliff.setIncludeNoTranslate(options.getIncludeNoTranslate()); paramsXliff.setIncludeCodeAttrs(options.getIncludeCodeAttrs()); paramsXliff.setIncludeIts(options.getIncludeIts()); paramsXliff.setEscapeGt(options.getEscapeGT()); StartDocument sd = event.getStartDocument(); writer.create(rawDocPath, null, manifest.getSourceLocale(), manifest.getTargetLocale(), sd.getMimeType(), item.getRelativeInputPath(), null); }
/** * Gets the flag indicating if ITS markup should be output or not. * @return true if ITS markup should be output, false otherwise. */ public boolean getIncludeIts () { return getBoolean(INCLUDEITS); }
public boolean getIncludeNoTranslate () { return getBoolean(INCLUDENOTRANSLATE); }
public boolean getUseSourceForTranslated () { return getBoolean(USESOURCEFORTRANSLATED); }
public boolean getCopySource () { return getBoolean(COPYSOURCE); }
public boolean getIncludeAltTrans () { return getBoolean(INCLUDEALTTRANS); }
public boolean getEscapeGt () { return getBoolean(ESCAPEGT); }
public boolean getIncludeCodeAttrs () { return getBoolean(INCLUDECODEATTRS); }
public boolean getSetApprovedAsNoTranslate () { return getBoolean(SETAPPROVEDASNOTRANSLATE); }