From 1bf836526332626825c21e7e62305d2019c65701 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 6 Nov 2009 14:23:19 +0100 Subject: improve ordered message insertion in a ts file, the top level categorization are the contexts, so it makes no sense to make messages adjoint by file when the context is different. a more clever algorithm which tries to order the entire contexts is conceivable. that would be advantageous for files which use multiple contexts subsequentially if each context appears in only one file. --- tools/linguist/shared/translator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp index a35666d420..8ff6719db6 100644 --- a/tools/linguist/shared/translator.cpp +++ b/tools/linguist/shared/translator.cpp @@ -136,7 +136,7 @@ void Translator::appendSorted(const TranslatorMessage &msg) int prevLine = 0; int curIdx = 0; foreach (const TranslatorMessage &mit, m_messages) { - bool sameFile = mit.fileName() == msg.fileName(); + bool sameFile = mit.fileName() == msg.fileName() && mit.context() == msg.context(); int curLine; if (sameFile && (curLine = mit.lineNumber()) >= prevLine) { if (msgLine >= prevLine && msgLine < curLine) { -- cgit v1.2.3