static void writeComment(QTextStream *t, const TranslatorMessage &msg, int indent) { if (!msg.comment().isEmpty()) { writeIndent(t, indent); (*t) << "<note>" << evilBytes(msg.comment(), msg.utf8()) << "</note>\n"; } }
static void writeComment(QTextStream &ts, const TranslatorMessage &msg, const QRegExp &drops, int indent) { if (!msg.comment().isEmpty()) { writeIndent(ts, indent); ts << "<context-group><context context-type=\"" << contextMsgctxt << "\">" << protect(msg.comment(), false) << "</context></context-group>\n"; } if (!msg.oldComment().isEmpty()) { writeIndent(ts, indent); ts << "<context-group><context context-type=\"" << contextOldMsgctxt << "\">" << protect(msg.oldComment(), false) << "</context></context-group>\n"; } writeExtras(ts, indent, msg.extras(), drops); if (!msg.extraComment().isEmpty()) { writeIndent(ts, indent); ts << "<note annotates=\"source\" from=\"developer\">" << protect(msg.extraComment()) << "</note>\n"; } if (!msg.translatorComment().isEmpty()) { writeIndent(ts, indent); ts << "<note from=\"translator\">" << protect(msg.translatorComment()) << "</note>\n"; } }
static QString makeMsgId(const TranslatorMessage &msg) { QString id = msg.context() + QLatin1String("//") + elidedId(msg.sourceText(), 100); if (!msg.comment().isEmpty()) id += QLatin1String("//") + elidedId(msg.comment(), 30); return id; }