use of org.madlonkay.supertmxmerge.StmProperties in project omegat by omegat-org.
the class RealProject method mergeTMX.
/**
* Do 3-way merge of:
*
* Base: baseTMX
*
* File 1: projectTMX (mine)
*
* File 2: headTMX (theirs)
*/
protected void mergeTMX(ProjectTMX baseTMX, ProjectTMX headTMX, StringBuilder commitDetails) {
StmProperties props = new StmProperties().setLanguageResource(OStrings.getResourceBundle()).setParentWindow(Core.getMainWindow().getApplicationFrame()).setListViewThreshold(5);
String srcLang = config.getSourceLanguage().getLanguage();
String trgLang = config.getTargetLanguage().getLanguage();
ProjectTMX mergedTMX = SuperTmxMerge.merge(new SyncTMX(baseTMX, OStrings.getString("TMX_MERGE_BASE"), srcLang, trgLang), new SyncTMX(projectTMX, OStrings.getString("TMX_MERGE_MINE"), srcLang, trgLang), new SyncTMX(headTMX, OStrings.getString("TMX_MERGE_THEIRS"), srcLang, trgLang), props);
projectTMX.replaceContent(mergedTMX);
Log.logDebug(LOGGER, "Merge report: {0}", props.getReport());
commitDetails.append('\n');
commitDetails.append(props.getReport().toString());
}
Aggregations