aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/snippets/snippetscollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/texteditor/snippets/snippetscollection.cpp')
-rw-r--r--src/plugins/texteditor/snippets/snippetscollection.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/texteditor/snippets/snippetscollection.cpp b/src/plugins/texteditor/snippets/snippetscollection.cpp
index 5756a01f66..660ac0746c 100644
--- a/src/plugins/texteditor/snippets/snippetscollection.cpp
+++ b/src/plugins/texteditor/snippets/snippetscollection.cpp
@@ -44,6 +44,13 @@
using namespace TextEditor;
using namespace Internal;
+/* TRANSLATOR TextEditor::Internal::Snippets
+
+ Snippets are text fragments that can be inserted into an editor via the usual completion
+ mechanics using a trigger text. The translated text (trigger variant) is used to
+ disambiguate between snippets with the same trigger.
+*/
+
namespace {
static bool snippetComp(const Snippet &a, const Snippet &b)
@@ -359,7 +366,10 @@ QList<Snippet> SnippetsCollection::readXML(const QString &fileName, const QStrin
if (isGroupKnown(groupId) && (snippetId.isEmpty() || snippetId == id)) {
Snippet snippet(groupId, id);
snippet.setTrigger(atts.value(kTrigger).toString());
- snippet.setComplement(atts.value(kComplement).toString());
+ snippet.setComplement(QCoreApplication::translate(
+ "TextEditor::Internal::Snippets",
+ atts.value(kComplement).toString().toLatin1(),
+ atts.value(kId).toString().toLatin1()));
snippet.setIsRemoved(toBool(atts.value(kRemoved).toString()));
snippet.setIsModified(toBool(atts.value(kModified).toString()));