From 3b7084c6ddc9277ec9ed47a0fbd403407f27a7e8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 24 Feb 2010 16:34:45 -0800 Subject: Fix update_po_templates.php to support the plural and context variants of _m() in plugins --- plugins/Sample/hello.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/Sample/hello.php') diff --git a/plugins/Sample/hello.php b/plugins/Sample/hello.php index 0cfd8a1c3..dfbd0ad4f 100644 --- a/plugins/Sample/hello.php +++ b/plugins/Sample/hello.php @@ -119,13 +119,15 @@ class HelloAction extends Action } /** - * show content in the content area + * Show content in the content area * * The default StatusNet page has a lot of decorations: menus, * logos, tabs, all that jazz. This method is used to show * content in the content area of the page; it's the main * thing you want to overload. * + * This method also demonstrates use of a plural localized string. + * * @return void */ @@ -138,7 +140,9 @@ class HelloAction extends Action $this->element('p', array('class' => 'greeting'), sprintf(_m('Hello, %s'), $this->user->nickname)); $this->element('p', array('class' => 'greeting_count'), - sprintf(_m('I have greeted you %d time(s).'), + sprintf(_m('I have greeted you %d time.', + 'I have greeted you %d times.', + $this->gc->greeting_count), $this->gc->greeting_count)); } } -- cgit v1.2.3-54-g00ecf