result.appendSource(entry.srcText).append(" = ");

def translations  = entry.getLocTerms(true)

if (translations.size() == 1) { 	// keep OmegaT's original presentation in this case
	translations.each { 
		result.appendTarget(it, entry.hasPriorities(it));
		entry.getEntriesFor(it).eachWithIndex { en0, idx ->
			if ((en0.commentText != null) && (en0.commentText.trim().length() > 0))
				result.append("\n" + (idx+1) + ". ").appendComment(en0.commentText).append("\n")
		}
	}
} else {
	translations.eachWithIndex { tra,i ->
		result.append("\n" + (i+1) + ". ").appendTarget(tra, entry.hasPriorities(tra));
        entry.getEntriesFor(tra).eachWithIndex { en0, j ->
			if ((en0.commentText != null) && (en0.commentText.trim().length() > 0))
				result.append("\n" + (i+1) + ". " + (j+1) + ". ").appendComment(en0.commentText).append("\n")
		}
	}
}

result.append("\n");
