From a631fe29f3950f8db1f7fb4ce1f47261a9b0feff Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Thu, 8 Jan 2009 17:13:06 +0000 Subject: 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. --- modules/akismet/controllers/admin_akismet.php | 8 ++++---- modules/akismet/helpers/akismet.php | 8 ++++---- modules/akismet/helpers/akismet_menu.php | 4 ++-- modules/akismet/views/admin_akismet.html.php | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/akismet') diff --git a/modules/akismet/controllers/admin_akismet.php b/modules/akismet/controllers/admin_akismet.php index 6d32868f..487c68ce 100644 --- a/modules/akismet/controllers/admin_akismet.php +++ b/modules/akismet/controllers/admin_akismet.php @@ -35,14 +35,14 @@ class Admin_Akismet_Controller extends Admin_Controller { if ($valid) { $old_key = module::get_var("akismet", "api_key"); if ($old_key && !$new_key) { - message::success(_("Your Akismet key has been cleared.")); + message::success(t("Your Akismet key has been cleared.")); } else if ($old_key && $new_key && $old_key != $new_key) { - message::success(_("Your Akismet key has been changed.")); + message::success(t("Your Akismet key has been changed.")); } else if (!$old_key && $new_key) { - message::success(_("Your Akismet key has been saved.")); + message::success(t("Your Akismet key has been saved.")); } - log::success("akismet", _("Akismet key changed to $new_key")); + log::success("akismet", t("Akismet key changed to $new_key")); module::set_var("akismet", "api_key", $new_key); url::redirect("admin/akismet"); } else { diff --git a/modules/akismet/helpers/akismet.php b/modules/akismet/helpers/akismet.php index 12d7a106..df4e7cfe 100644 --- a/modules/akismet/helpers/akismet.php +++ b/modules/akismet/helpers/akismet.php @@ -30,10 +30,10 @@ class akismet_Core { public static function get_configure_form() { $form = new Forge("admin/akismet", "", "post"); - $group = $form->group("configure_akismet")->label(_("Configure Akismet")); - $group->input("api_key")->label(_("API Key"))->value(module::get_var("akismet", "api_key")); - $group->api_key->error_messages("invalid", _("The API key you provided is invalid.")); - $group->submit(_("Save")); + $group = $form->group("configure_akismet")->label(t("Configure Akismet")); + $group->input("api_key")->label(t("API Key"))->value(module::get_var("akismet", "api_key")); + $group->api_key->error_messages("invalid", t("The API key you provided is invalid.")); + $group->submit(t("Save")); return $form; } diff --git a/modules/akismet/helpers/akismet_menu.php b/modules/akismet/helpers/akismet_menu.php index 4a0c9b11..00bea8ad 100644 --- a/modules/akismet/helpers/akismet_menu.php +++ b/modules/akismet/helpers/akismet_menu.php @@ -22,14 +22,14 @@ class akismet_menu_Core { $menu->get("settings_menu") ->append(Menu::factory("link") ->id("akismet") - ->label(_("Akismet")) + ->label(t("Akismet")) ->url(url::site("admin/akismet"))); if (module::get_var("akismet", "api_key")) { $menu->get("statistics_menu") ->append(Menu::factory("link") ->id("akismet") - ->label(_("Akismet")) + ->label(t("Akismet")) ->url(url::site("admin/akismet/stats"))); } } diff --git a/modules/akismet/views/admin_akismet.html.php b/modules/akismet/views/admin_akismet.html.php index 34a5461b..9963f223 100644 --- a/modules/akismet/views/admin_akismet.html.php +++ b/modules/akismet/views/admin_akismet.html.php @@ -1,13 +1,13 @@
-

+

- Wordpress.com API Key, which is also free. Your comments will be automatically relayed to Akismet.com where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.") ?> + Wordpress.com API Key, which is also free. Your comments will be automatically relayed to Akismet.com where they'll be scanned for spam. Spam messages will be flagged accordingly and hidden from your vistors until you approve or delete them.") ?>

- +
-- cgit v1.2.3