comparison confirmcommentdialog.cpp @ 155:edab92f3ea0b

* Add translation support -- useful for proper plural handling even in English
author Chris Cannam
date Thu, 02 Dec 2010 21:13:53 +0000
parents 1721c580c10e
children ef5feb0d648f
comparison
equal deleted inserted replaced
154:6bcb4a4d6521 155:edab92f3ea0b
85 { 85 {
86 QString text; 86 QString text;
87 if (files.size() <= 10) { 87 if (files.size() <= 10) {
88 text = buildFilesText(introText, files); 88 text = buildFilesText(introText, files);
89 } else { 89 } else {
90 text = "<qt>" + introTextWithCount.arg(files.size()) + "</qt>"; 90 text = "<qt>" + introTextWithCount + "</qt>";
91 } 91 }
92 return (QMessageBox::information(parent, 92 return (QMessageBox::information(parent,
93 title, 93 title,
94 text, 94 text,
95 QMessageBox::Ok | QMessageBox::Cancel, 95 QMessageBox::Ok | QMessageBox::Cancel,
105 { 105 {
106 QString text; 106 QString text;
107 if (files.size() <= 10) { 107 if (files.size() <= 10) {
108 text = buildFilesText(introText, files); 108 text = buildFilesText(introText, files);
109 } else { 109 } else {
110 text = "<qt>" + introTextWithCount.arg(files.size()) + "</qt>"; 110 text = "<qt>" + introTextWithCount + "</qt>";
111 } 111 }
112 return (QMessageBox::warning(parent, 112 return (QMessageBox::warning(parent,
113 title, 113 title,
114 text, 114 text,
115 QMessageBox::Ok | QMessageBox::Cancel, 115 QMessageBox::Ok | QMessageBox::Cancel,
149 { 149 {
150 QString text; 150 QString text;
151 if (files.size() <= 10) { 151 if (files.size() <= 10) {
152 text = buildFilesText(introText, files); 152 text = buildFilesText(introText, files);
153 } else { 153 } else {
154 text = "<qt>" + introTextWithCount.arg(files.size()); 154 text = "<qt>" + introTextWithCount;
155 } 155 }
156 text += tr("<p>Please enter your comment:</qt>"); 156 text += tr("<p>Please enter your comment:</qt>");
157 return confirmAndComment(parent, title, text, comment, longComment); 157 return confirmAndComment(parent, title, text, comment, longComment);
158 } 158 }
159 159