summaryrefslogtreecommitdiff
path: root/core/helpers/graphics.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-01-08 17:13:06 +0000
committerAndy Staudacher <andy.st@gmail.com>2009-01-08 17:13:06 +0000
commita631fe29f3950f8db1f7fb4ce1f47261a9b0feff (patch)
treeb5af3ad39362dea97ce01be63d5ec09b7846bb9c /core/helpers/graphics.php
parentfd081159f1783918d81e355e25e262ccc5249913 (diff)
i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax - Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
Diffstat (limited to 'core/helpers/graphics.php')
-rw-r--r--core/helpers/graphics.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php
index 83a08004..847de665 100644
--- a/core/helpers/graphics.php
+++ b/core/helpers/graphics.php
@@ -217,10 +217,13 @@ class graphics_Core {
$count = self::find_dirty_images_query()->count();
if ($count) {
site_status::warning(
- sprintf(_("%d of your photos are out of date. %sClick here to fix them%s"),
- $count, "<a href=\"" .
- url::site("admin/maintenance/start/graphics::rebuild_dirty_images?csrf=__CSRF__") .
- "\" class=\"gDialogLink\">", "</a>"),
+ t(array("one" => "One of your photos is out of date. {{link_start}}Click here to fix it{{link_end}}",
+ "other" => "{{count}} of your photos are out of date. {{link_start}}Click here to fix them{{link_end}}"),
+ array("count" => $count,
+ "link_start" => "<a href=\"" .
+ url::site("admin/maintenance/start/graphics::rebuild_dirty_images?csrf=__CSRF__") .
+ "\" class=\"gDialogLink\">",
+ "link_end" => "</a>")),
"graphics_dirty");
}
}
@@ -251,8 +254,10 @@ class graphics_Core {
}
}
- $task->status = sprintf(
- _("Updated %d out of %d images"), $completed, $remaining + $completed);
+ $task->status = t(array("one" => "Updated: 1 image. Total: {{total_count}}.",
+ "other" => "Updated: {{count}} images. Total: {{total_count}}."),
+ array("count" => $completed,
+ "total_count" => ($remaining + $completed)));
if ($completed + $remaining > 0) {
$task->percent_complete = (int)(100 * $completed / ($completed + $remaining));