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 /themes/admin_default | |
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 'themes/admin_default')
-rw-r--r-- | themes/admin_default/views/admin.html.php | 2 | ||||
-rw-r--r-- | themes/admin_default/views/pager.html.php | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index a8650068..9385a346 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -30,7 +30,7 @@ <div id="gHeader"> <?= $theme->site_status() ?> <?= $theme->admin_header_top() ?> - <a href="http://gallery.menalto.com/"><img src="<?= $theme->url("images/logo-sm.png") ?>" id="gLogo" alt="<?= _("Gallery 3: Your Photos on Your Web Site") ?>" /></a> + <a href="http://gallery.menalto.com/"><img src="<?= $theme->url("images/logo-sm.png") ?>" id="gLogo" alt="<?= t("Gallery 3: Your Photos on Your Web Site") ?>" /></a> <div id="gSiteAdminMenu"> <?= $theme->admin_menu() ?> </div> diff --git a/themes/admin_default/views/pager.html.php b/themes/admin_default/views/pager.html.php index a07800c2..5c7c5396 100644 --- a/themes/admin_default/views/pager.html.php +++ b/themes/admin_default/views/pager.html.php @@ -1,25 +1,30 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? // See http://docs.kohanaphp.com/libraries/pagination ?> <ul id="gPager"> - <li><?= sprintf(_("%d - %d of %d"), $current_first_item, $current_last_item, $total_items) ?></li> + <? /* XXX: This message isn't easily localizable */ + $from_to_msg = t("{{from_number}} - {{to_number}} of {{total}}", + array("from_number" => $current_first_item, + "to_number" => $current_last_item, + "total" => $total_items)) ?> + <li><?= $from_to_msg?></li> <? if ($first_page): ?> - <li class="first"><a href="<?= str_replace('{page}', 1, $url) ?>"><?= _("first") ?></a></li> + <li class="first"><a href="<?= str_replace('{page}', 1, $url) ?>"><?= t("first") ?></a></li> <? else: ?> - <li class="first_inactive"><?= _("first") ?></li> + <li class="first_inactive"><?= t("first") ?></li> <? endif ?> <? if ($previous_page): ?> - <li class="previous"><a href="<?= str_replace('{page}', $previous_page, $url) ?>"><?= _("previous") ?></a></li> + <li class="previous"><a href="<?= str_replace('{page}', $previous_page, $url) ?>"><?= t("previous") ?></a></li> <? else: ?> - <li class="previous_inactive"><?= _("previous") ?></li> + <li class="previous_inactive"><?= t("previous") ?></li> <? endif ?> <? if ($next_page): ?> - <li class="next"><a href="<?= str_replace('{page}', $next_page, $url) ?>"><?= _("next") ?></a></li> + <li class="next"><a href="<?= str_replace('{page}', $next_page, $url) ?>"><?= t("next") ?></a></li> <? else: ?> - <li class="next_inactive"><?= _("next") ?></li> + <li class="next_inactive"><?= t("next") ?></li> <? endif ?> <? if ($last_page): ?> - <li class="last"><a href="<?= str_replace('{page}', $last_page, $url) ?>"><?= _("last") ?></a></li> + <li class="last"><a href="<?= str_replace('{page}', $last_page, $url) ?>"><?= t("last") ?></a></li> <? else: ?> - <li class="last_inactive"><?= _("last") ?></li> + <li class="last_inactive"><?= t("last") ?></li> <? endif ?> </ul> |