diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-01-08 17:13:06 +0000 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-01-08 17:13:06 +0000 |
commit | a631fe29f3950f8db1f7fb4ce1f47261a9b0feff (patch) | |
tree | b5af3ad39362dea97ce01be63d5ec09b7846bb9c /modules/info | |
parent | fd081159f1783918d81e355e25e262ccc5249913 (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 'modules/info')
-rw-r--r-- | modules/info/helpers/info_block.php | 6 | ||||
-rw-r--r-- | modules/info/views/info_block.html.php | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index 422e62da..358dd3b8 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -22,7 +22,7 @@ class info_block_Core { if ($theme->item()) { $block = new Block(); $block->id = "gMetadata"; - $block->title = _("Item Info"); + $block->title = t("Item Info"); $block->content = new View("info_block.html"); return $block; } @@ -32,12 +32,12 @@ class info_block_Core { $results = ""; if ($item->view_count) { $results .= "<li>"; - $results .= sprintf(_("Views: %d"), $item->view_count); + $results .= t("Views: {{view_count}}", array("view_count" => $item->view_count)); $results .= "</li>"; } if ($item->owner) { $results .= "<li>"; - $results .= sprintf(_("By: %s"), "<a href=\"#\">{$item->owner->name}</a>"); + $results .= t("By: {{owner_name}}", array("owner_name" => "<a href=\"#\">{$item->owner->name}</a>")); $results .= "</li>"; } return $results; diff --git a/modules/info/views/info_block.html.php b/modules/info/views/info_block.html.php index f2c30395..491d9d10 100644 --- a/modules/info/views/info_block.html.php +++ b/modules/info/views/info_block.html.php @@ -2,22 +2,22 @@ <table class="gMetadata"> <tbody> <tr> - <th><?= _("Title:") ?></th> + <th><?= t("Title:") ?></th> <td><?= $item->title; ?></td> </tr> <tr> - <th><?= _("Description:") ?></th> + <th><?= t("Description:") ?></th> <td><?= $item->description; ?></td> </tr> <? if ($item->id != 1): ?> <tr> - <th><?= _("Name:") ?></th> + <th><?= t("Name:") ?></th> <td><?= $item->name; ?></td> </tr> <? endif ?> <? if ($item->owner): ?> <tr> - <th><?= _("Owner:") ?></th> + <th><?= t("Owner:") ?></th> <td><a href="#"><?= $item->owner->name ?></a></td> </tr> <? endif ?> |