Indefero

Indefero Commit Details


Date:2011-12-01 18:13:54 (13 years 20 days ago)
Author:Jean-Philippe Fleury
Branch:develop, release-1.2, release-1.3
Commit:7342566c6ee3834c93a86aad01b64d06d02d9bba
Parents: bfc568967b265a01a256197d6e33c82710f9d21f
Message:Use positional arguments everywhere where we put more than one string into a translatable sentence to ease the work on more exotic translations.

Changes:

File differences

NEWS.mdtext
22
33
44
5
5
6
67
78
89
## Language and Translations
- Multiple fixes to English source strings (thanks to JP Fleury!)
- Multiple fixes to English source strings (fixes issues 763, 766, and 772,
thanks to JP Fleury!)
# InDefero 1.2 - Sun Nov 6 23:04:00 UTC 2011
src/IDF/Commit.php
235235
236236
237237
238
238
239239
240240
241241
......
326326
327327
328328
329
329
330330
331331
332332
</tr>
<tr class="extra">
<td colspan="2">
<div class="helptext right">'.sprintf(__('Commit %s, by %s'), '<a href="'.$url.'" class="mono">'.$this->scm_id.'</a>', $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Commit %1$s, by %2$s'), '<a href="'.$url.'" class="mono">'.$this->scm_id.'</a>', $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
foreach ($addresses as $address) {
$email = new Pluf_Mail(Pluf::f('from_email'),
$address,
sprintf(__('New Commit %s - %s (%s)'),
sprintf(__('New Commit %1$s - %2$s (%3$s)'),
$this->scm_id, $this->summary,
$this->get_project()->shortname));
$email->addTextMessage($text_email);
src/IDF/Issue.php
211211
212212
213213
214
214
215215
216216
217217
......
221221
222222
223223
224
224
225225
226226
227227
......
287287
288288
289289
290
290
291291
292292
293293
......
333333
334334
335335
336
336
337337
338338
339339
$ic = (in_array($this->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$out .= sprintf(__('<a href="%1$s" class="%2$s" title="View issue">Issue %3$d</a>, %4$s'), $url, $ic, $this->id, Pluf_esc($this->summary)).'</td>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Creation of <a href="%s" class="%s">issue %d</a>, by %s'), $url, $ic, $this->id, $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Creation of <a href="%1$s" class="%2$s">issue %3$d</a>, by %4$s'), $url, $ic, $this->id, $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
.Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($request->project->shortname,
$this->id));
$title = sprintf(__('%s: Issue %d created - %s'),
$title = sprintf(__('%1$s: Issue %2$d created - %3$s'),
$request->project->name,
$this->id, $this->summary);
$cts = $this->get_comments_list(array('order' => 'id ASC',
foreach ($to_email as $email_lang) {
Pluf_Translation::loadSetLocale($email_lang[1]);
$email = new Pluf_Mail(Pluf::f('from_email'), $email_lang[0],
sprintf(__('Issue %s - %s (%s)'),
sprintf(__('Issue %1$s - %2$s (%3$s)'),
$this->id, $this->summary, $prj->shortname));
$tmpl = new Pluf_Template('idf/issues/issue-created-email.txt');
$email->addTextMessage($tmpl->render($context));
}
Pluf_Translation::loadSetLocale($email_lang[1]);
$email = new Pluf_Mail(Pluf::f('from_email'), $email_lang[0],
sprintf(__('Updated Issue %s - %s (%s)'),
sprintf(__('Updated Issue %1$s - %2$s (%3$s)'),
$this->id, $this->summary, $prj->shortname));
$tmpl = new Pluf_Template('idf/issues/issue-updated-email.txt');
$email->addTextMessage($tmpl->render($context));
src/IDF/IssueComment.php
177177
178178
179179
180
180
181181
182182
183183
......
188188
189189
190190
191
191
192192
193193
194194
}
$out .= '</td></tr>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Comment on <a href="%s" class="%s">issue %d</a>, by %s'), $url, $ic, $issue->id, $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Comment on <a href="%1$s" class="%2$s">issue %3$d</a>, by %4$s'), $url, $ic, $issue->id, $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
.Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($request->project->shortname,
$issue->id));
$title = sprintf(__('%s: Comment on issue %d - %s'),
$title = sprintf(__('%1$s: Comment on issue %2$d - %3$s'),
Pluf_esc($request->project->name),
$issue->id, Pluf_esc($issue->summary));
$url .= '#ic'.$this->id;
src/IDF/Plugin/SyncMonotone.php
306306
307307
308308
309
309
310310
311311
312312
......
522522
523523
524524
525
525
526526
527527
528528
......
596596
597597
598598
599
599
600600
601601
602602
......
715715
716716
717717
718
718
719719
720720
721721
}
catch (Exception $e) {
$this->_diagnoseProblem(sprintf(
__('Could not parse usher configuration in "%s": %s'),
__('Could not parse usher configuration in "%1$s": %2$s'),
$usher_config, $e->getMessage()
));
}
}
catch (Exception $e) {
$this->_diagnoseProblem(sprintf(
__('Could not parse usher configuration in "%s": %s'),
__('Could not parse usher configuration in "%1$s": %2$s'),
$usher_config, $e->getMessage()
));
}
}
catch (Exception $e) {
$this->_diagnoseProblem(sprintf(
__('Could not parse read-permissions for project "%s": %s'),
__('Could not parse read-permissions for project "%1$s": %2$s'),
$shortname, $e->getMessage()
));
}
}
catch (Exception $e) {
$this->_diagnoseProblem(sprintf(
__('Could not parse read-permissions for project "%s": %s'),
__('Could not parse read-permissions for project "%1$s": %2$s'),
$shortname, $e->getMessage()
));
}
src/IDF/Review/Comment.php
138138
139139
140140
141
141
142142
143143
144144
......
148148
149149
150150
151
151
152152
153153
154154
......
213213
214214
215215
216
216
217217
218218
219219
$ic = (in_array($review->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$out .= sprintf(__('<a href="%1$s" class="%2$s" title="View review">Review %3$d</a>, %4$s'), $url, $ic, $review->id, Pluf_esc($review->summary)).'</td>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Update of <a href="%s" class="%s">review %d</a>, by %s'), $url, $ic, $review->id, $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Update of <a href="%1$s" class="%2$s">review %3$d</a>, by %4$s'), $url, $ic, $review->id, $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Review::view',
array($request->project->shortname,
$review->id));
$title = sprintf(__('%s: Updated review %d - %s'),
$title = sprintf(__('%1$s: Updated review %2$d - %3$s'),
Pluf_esc($request->project->name),
$review->id, Pluf_esc($review->summary));
$url .= '#ic'.$this->id;
foreach ($to_email as $email_lang) {
Pluf_Translation::loadSetLocale($email_lang[1]);
$email = new Pluf_Mail(Pluf::f('from_email'), $email_lang[0],
sprintf(__('Updated Code Review %s - %s (%s)'),
sprintf(__('Updated Code Review %1$s - %2$s (%3$s)'),
$review->id, $review->summary, $prj->shortname));
$email->addTextMessage($tmpl->render($context));
src/IDF/Review/Patch.php
150150
151151
152152
153
153
154154
155155
156156
......
160160
161161
162162
163
163
164164
165165
166166
......
201201
202202
203203
204
204
205205
206206
207207
$ic = (in_array($review->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$out .= sprintf(__('<a href="%1$s" class="%2$s" title="View review">Review %3$d</a>, %4$s'), $url, $ic, $review->id, Pluf_esc($review->summary)).'</td>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Creation of <a href="%s" class="%s">review %d</a>, by %s'), $url, $ic, $review->id, $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Creation of <a href="%1$s" class="%2$s">review %3$d</a>, by %4$s'), $url, $ic, $review->id, $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Review::view',
array($request->project->shortname,
$review->id));
$title = sprintf(__('%s: Creation of Review %d - %s'),
$title = sprintf(__('%1$s: Creation of Review %2$d - %3$s'),
Pluf_esc($request->project->name),
$review->id, Pluf_esc($review->summary));
$date = Pluf_Date::gmDateToGmString($this->creation_dtime);
foreach ($addresses as $address) {
$email = new Pluf_Mail(Pluf::f('from_email'),
$address,
sprintf(__('New Code Review %s - %s (%s)'),
sprintf(__('New Code Review %1$s - %2$s (%3$s)'),
$this->get_review()->id,
$this->get_review()->summary,
$this->get_review()->get_project()->shortname));
src/IDF/Upload.php
201201
202202
203203
204
204
205205
206206
207207
......
211211
212212
213213
214
214
215215
216216
217217
......
253253
254254
255255
256
256
257257
258258
259259
$out .= sprintf(__('<a href="%1$s" title="View download">Download %2$d</a>, %3$s'), $url, $this->id, Pluf_esc($this->summary)).'</td>';
$out .= '</tr>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Addition of <a href="%s">download %d</a>, by %s'), $url, $this->id, $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Addition of <a href="%1$s">download %2$d</a>, by %3$s'), $url, $this->id, $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
.Pluf_HTTP_URL_urlForView('IDF_Views_Download::view',
array($request->project->shortname,
$this->id));
$title = sprintf(__('%s: Download %d added - %s'),
$title = sprintf(__('%1$s: Download %2$d added - %3$s'),
$request->project->name,
$this->id, $this->summary);
$date = Pluf_Date::gmDateToGmString($this->creation_dtime);
foreach ($addresses as $address) {
$email = new Pluf_Mail(Pluf::f('from_email'),
$address,
sprintf(__('New download - %s (%s)'),
sprintf(__('New download - %1$s (%2$s)'),
$this->summary,
$this->get_project()->shortname));
$email->addTextMessage($text_email);
src/IDF/Views/Issue.php
338338
339339
340340
341
341
342342
343343
344344
345
345
346346
347347
348348
349
349
350350
351351
352352
353
353
354354
355355
356356
......
427427
428428
429429
430
430
431431
432432
433433
......
598598
599599
600600
601
601
602602
603603
604604
......
622622
623623
624624
625
625
626626
627627
628628
if (count($ctags) == 0) $ctags[] = 0;
switch ($match[3]) {
case 'submit':
$titleFormat = __('%s %s Submitted %s Issues');
$titleFormat = __('%1$s %2$s Submitted %3$s Issues');
$f_sql = new Pluf_SQL('project=%s AND submitter=%s AND status IN ('.implode(', ', $otags).')', array($prj->id, $user->id));
break;
case 'submitclosed':
$titleFormat = __('%s %s Closed Submitted %s Issues');
$titleFormat = __('%1$s %2$s Closed Submitted %3$s Issues');
$f_sql = new Pluf_SQL('project=%s AND submitter=%s AND status IN ('.implode(', ', $ctags).')', array($prj->id, $user->id));
break;
case 'ownerclosed':
$titleFormat = __('%s %s Closed Working %s Issues');
$titleFormat = __('%1$s %2$s Closed Working %3$s Issues');
$f_sql = new Pluf_SQL('project=%s AND owner=%s AND status IN ('.implode(', ', $ctags).')', array($prj->id, $user->id));
break;
default:
$titleFormat = __('%s %s Working %s Issues');
$titleFormat = __('%1$s %2$s Working %3$s Issues');
$f_sql = new Pluf_SQL('project=%s AND owner=%s AND status IN ('.implode(', ', $otags).')', array($prj->id, $user->id));
break;
}
array($prj->shortname, $issue->id));
$issue->notify($request->conf);
if ($api) return $issue;
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been created.'), $url, $issue->id));
$request->user->setMessage(sprintf(__('<a href="%1$s">Issue %2$d</a> has been created.'), $url, $issue->id));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($prj->shortname, $issue->id));
$title = Pluf_Template::markSafe(sprintf(__('Issue <a href="%s">%d</a>: %s'), $url, $issue->id, $issue->summary));
$title = Pluf_Template::markSafe(sprintf(__('Issue <a href="%1$s">%2$d</a>: %3$s'), $url, $issue->id, $issue->summary));
$form = false; // The form is available only if logged in.
$starred = false;
$closed = in_array($issue->status, $prj->getTagIdsByStatus('closed'));
$issue->notify($request->conf, false);
$comments = $issue->get_comments_list(array('order' => 'id DESC'));
$url .= '#ic' . $comments[0]->id;
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been updated.'), $url, $issue->id));
$request->user->setMessage(sprintf(__('<a href="%1$s">Issue %2$d</a> has been updated.'), $url, $issue->id));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {
src/IDF/Views/Review.php
9191
9292
9393
94
94
9595
9696
9797
......
137137
138138
139139
140
140
141141
142142
143143
......
157157
158158
159159
160
160
161161
162162
163163
$review = $form->save();
$urlr = Pluf_HTTP_URL_urlForView('IDF_Views_Review::view',
array($prj->shortname, $review->id));
$request->user->setMessage(sprintf(__('The <a href="%s">code review %d</a> has been created.'), $urlr, $review->id));
$request->user->setMessage(sprintf(__('The <a href="%1$s">code review %2$d</a> has been created.'), $urlr, $review->id));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Review::index',
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url);
$prj->inOr404($review);
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Review::view',
array($prj->shortname, $review->id));
$title = Pluf_Template::markSafe(sprintf(__('Review <a href="%s">%d</a>: %s'), $url, $review->id, $review->summary));
$title = Pluf_Template::markSafe(sprintf(__('Review <a href="%1$s">%2$d</a>: %3$s'), $url, $review->id, $review->summary));
$patches = $review->get_patches_list();
$patch = $patches[0];
$review = $patch->get_review();
$urlr = Pluf_HTTP_URL_urlForView('IDF_Views_Review::view',
array($prj->shortname, $review->id));
$request->user->setMessage(sprintf(__('Your <a href="%s">code review %d</a> has been published.'), $urlr, $review->id));
$request->user->setMessage(sprintf(__('Your <a href="%1$s">code review %2$d</a> has been published.'), $urlr, $review->id));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Review::index',
array($prj->shortname));
$review_comment->notify($request->conf);
src/IDF/Views/Source.php
302302
303303
304304
305
305
306306
307307
308308
throw new Exception('could not retrieve commit object for '. $commit);
}
$title = sprintf(__('%s Commit Details'), (string) $request->project);
$page_title = sprintf(__('%s Commit Details - %s'), (string) $request->project, $commit);
$page_title = sprintf(__('%1$s Commit Details - %2$s'), (string) $request->project, $commit);
$rcommit = IDF_Commit::getOrAdd($cobject, $request->project);
$diff = new IDF_Diff($cobject->diff, $scm->getDiffPathStripLevel());
$cobject->diff = null;
src/IDF/Views/Wiki.php
181181
182182
183183
184
184
185185
186186
187187
......
319319
320320
321321
322
322
323323
324324
325325
$page = $form->save();
$urlpage = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view',
array($prj->shortname, $page->title));
$request->user->setMessage(sprintf(__('The page <a href="%s">%s</a> has been created.'), $urlpage, Pluf_esc($page->title)));
$request->user->setMessage(sprintf(__('The page <a href="%1$s">%2$s</a> has been created.'), $urlpage, Pluf_esc($page->title)));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::index',
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url);
$page = $form->save();
$urlpage = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view',
array($prj->shortname, $page->title));
$request->user->setMessage(sprintf(__('The page <a href="%s">%s</a> has been updated.'), $urlpage, Pluf_esc($page->title)));
$request->user->setMessage(sprintf(__('The page <a href="%1$s">%2$s</a> has been updated.'), $urlpage, Pluf_esc($page->title)));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::index',
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url);
src/IDF/WikiPage.php
195195
196196
197197
198
198
199199
200200
201201
......
205205
206206
207207
208
208
209209
210210
211211
$user = $stag->start($this->get_submitter(), $request, '', false);
$out .= sprintf(__('<a href="%1$s" title="View page">%2$s</a>, %3$s'), $url, Pluf_esc($this->title), Pluf_esc($this->summary)).'</td>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Creation of <a href="%s">page %s</a>, by %s'), $url, Pluf_esc($this->title), $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Creation of <a href="%1$s">page %2$s</a>, by %3$s'), $url, Pluf_esc($this->title), $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
.Pluf_HTTP_URL_urlForView('IDF_Views_Wiki::view',
array($request->project->shortname,
$this->title));
$title = sprintf(__('%s: Documentation page %s added - %s'),
$title = sprintf(__('%1$s: Documentation page %2$s added - %3$s'),
$request->project->name,
$this->title, $this->summary);
$date = Pluf_Date::gmDateToGmString($this->creation_dtime);
src/IDF/WikiRevision.php
186186
187187
188188
189
189
190190
191191
192192
......
205205
206206
207207
208
208
209209
210210
211211
......
259259
260260
261261
262
262
263263
264264
265265
266266
267267
268
268
269269
270270
271271
}
$out .= '</td></tr>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Change of <a href="%s">%s</a>, by %s'), $url, Pluf_esc($page->title), $user).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Change of <a href="%1$s">%2$s</a>, by %3$s'), $url, Pluf_esc($page->title), $user).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
array($request->project->shortname,
$page->title));
}
$title = sprintf(__('%s: Documentation page %s updated - %s'),
$title = sprintf(__('%1$s: Documentation page %2$s updated - %3$s'),
$request->project->name,
$page->title, $page->summary);
$date = Pluf_Date::gmDateToGmString($this->creation_dtime);
);
if ($create) {
$template = 'idf/wiki/wiki-created-email.txt';
$title = sprintf(__('New Documentation Page %s - %s (%s)'),
$title = sprintf(__('New Documentation Page %1$s - %2$s (%3$s)'),
$this->get_wikipage()->title,
$this->get_wikipage()->summary,
$this->get_wikipage()->get_project()->shortname);
} else {
$template = 'idf/wiki/wiki-updated-email.txt';
$title = sprintf(__('Documentation Page Changed %s - %s (%s)'),
$title = sprintf(__('Documentation Page Changed %1$s - %2$s (%3$s)'),
$this->get_wikipage()->title,
$this->get_wikipage()->summary,
$this->get_wikipage()->get_project()->shortname);

Archive Download the corresponding diff file

Page rendered in 0.12197s using 13 queries.