]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use profile->getBestName() instead of more complex i18n unfriendly construction.
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Apr 2011 17:12:26 +0000 (19:12 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Apr 2011 20:44:21 +0000 (22:44 +0200)
Update translator documentation.
Number parameters where more than one is used.
L10n updates.
Update README file to break lines at or just before 80 characters.
Remove PHP4-ism "?>"
Update indentation.
Update whitespace.

14 files changed:
plugins/Mapstraction/MapstractionPlugin.php
plugins/Mapstraction/usermap.php
plugins/Memcache/MemcachePlugin.php
plugins/Memcached/MemcachedPlugin.php
plugins/Meteor/MeteorPlugin.php
plugins/Meteor/README
plugins/Minify/MinifyPlugin.php
plugins/Minify/README
plugins/Minify/minify.php
plugins/Mobile/WAP20Plugin.php
plugins/MobileProfile/MobileProfilePlugin.php
plugins/ModHelper/ModHelperPlugin.php
plugins/ModPlus/ModPlusPlugin.php
plugins/ModPlus/remoteprofileaction.php

index 54eff205401c47572845db50dfcb3335c073f459..f51b6073097b0a4c57d494717bfef175270a3b60 100644 (file)
@@ -164,7 +164,7 @@ class MapstractionPlugin extends Plugin
                                   ' var user = null; '.
                                   (($actionName == 'showstream') ? ' user = scrapeUser(); ' : '') .
                                   ' var notices = scrapeNotices(user); ' .
-                                 ' var canvas = $("#map_canvas")[0]; ' .
+                                  ' var canvas = $("#map_canvas")[0]; ' .
                                   ' if (typeof(canvas) != "undefined") { showMapstraction(canvas, notices); } '.
                                   '});');
         }
@@ -184,6 +184,7 @@ class MapstractionPlugin extends Plugin
         $action->elementStart('div', array('id' => 'entity_map',
                                          'class' => 'section'));
 
+        // TRANS: Header for Map widget that displays a map with geodata for notices.
         $action->element('h2', null, _m('Map'));
 
         $action->element('div', array('id' => 'map_canvas',
@@ -196,7 +197,7 @@ class MapstractionPlugin extends Plugin
 
         $action->element('a', array('href' => $mapUrl),
                          // TRANS: Clickable item to allow opening the map in full size.
-                         _m("Full size"));
+                         _m('Full size'));
 
         $action->elementEnd('div');
     }
@@ -208,6 +209,7 @@ class MapstractionPlugin extends Plugin
                             'author' => 'Evan Prodromou',
                             'homepage' => 'http://status.net/wiki/Plugin:Mapstraction',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('Show maps of users\' and friends\' notices '.
                                'with <a href="http://www.mapstraction.com/">Mapstraction</a>.'));
         return true;
index 54412146ee49cb001e14a4c8695c5835e640fc27..99a43e538a5c81fb09ac551fec98b101450ba936 100644 (file)
@@ -61,11 +61,14 @@ class UsermapAction extends MapAction
         $base = $this->profile->getFancyName();
 
         if ($this->page == 1) {
-            // @todo CHECKME: inconsisten with paged variant below. " map" missing.
-            return $base;
+            // TRANS: Title for map widget.
+            // TRANS: %s is a user name.
+            return sprintf(_m('%s map'),$base);
         } else {
             // @todo CHECKME: Is the part ", page %2$d" relevant here?
-            return sprintf(_m("%s map, page %d"),
+            // TRANS: Title for map widget.
+            // TRANS: %1$s is a user name, %2$d is a page nember.
+            return sprintf(_m("%1$s map, page %2$d"),
                            $base,
                            $this->page);
         }
index f0c473c3131e709bca929f682fa3571d8976a92e..8462dfc2c6085af96f448868af23a6dc4d45157e 100644 (file)
@@ -243,6 +243,7 @@ class MemcachePlugin extends Plugin
                             'author' => 'Evan Prodromou, Craig Andrews',
                             'homepage' => 'http://status.net/wiki/Plugin:Memcache',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
         return true;
     }
index 3b3383d4965b9c80e1ce17b9f128ddfd0103b424..56793d0ff6b4dc5c054f0d806371e3bf191a77de 100644 (file)
@@ -52,7 +52,6 @@ if (!defined('STATUSNET')) {
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
-
 class MemcachedPlugin extends Plugin
 {
     static $cacheInitialized = false;
@@ -215,6 +214,7 @@ class MemcachedPlugin extends Plugin
                             'author' => 'Evan Prodromou, Craig Andrews',
                             'homepage' => 'http://status.net/wiki/Plugin:Memcached',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
         return true;
     }
index 6e93e364f736b900211e567672ef5ab8f781b368..ec44eef17b3829ed26cf684df12db4d2747e06ef 100644 (file)
@@ -112,7 +112,7 @@ class MeteorPlugin extends RealtimePlugin
         $this->_socket = stream_socket_client("tcp://{$controlserver}:{$this->controlport}", $errno, $errstr, $timeout, $flags);
         if (!$this->_socket) {
             // TRANS: Exception. %1$s is the control server, %2$s is the control port.
-            throw new Exception(sprintf(_m('Couldn\'t connect to %1$s on %2$s.'),$controlserver,$this->controlport));
+            throw new Exception(sprintf(_m('Could not connect to %1$s on %2$s.'),$controlserver,$this->controlport));
         }
     }
 
@@ -125,7 +125,7 @@ class MeteorPlugin extends RealtimePlugin
         $result = fgets($this->_socket);
         if (preg_match('/^ERR (.*)$/', $result, $matches)) {
             // TRANS: Exception. %s is the Meteor message that could not be added.
-            throw new Exception(sprintf(_m('Error adding meteor message "%s"'),$matches[1]));
+            throw new Exception(sprintf(_m('Error adding meteor message "%s".'),$matches[1]));
         }
         // TODO: parse and deal with result
     }
@@ -155,6 +155,7 @@ class MeteorPlugin extends RealtimePlugin
                             'author' => 'Evan Prodromou',
                             'homepage' => 'http://status.net/wiki/Plugin:Meteor',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('Plugin to do "real time" updates using Comet/Bayeux.'));
         return true;
     }
index 22f548462f02ce2db89fc8cbff0f70a50ffaf327..f21828cdc5e7f9c07b922d031f7ae1a43c2123e7 100644 (file)
@@ -1,27 +1,24 @@
-This is a plugin to automatically load notices in the browser no
-matter who creates them -- the kind of thing we see with
-search.twitter.com, rejaw.com, or FriendFeed's "real time" news.
+This is a plugin to automatically load notices in the browser no matter who
+creates them -- the kind of thing we see with search.twitter.com, rejaw.com, or
+FriendFeed's "real time" news.
 
 It requires a meteor server.
 
    http://meteorserver.org/
 
-Note that the controller interface needs to be accessible by the Web
-server, and the subscriber interface needs to be accessible by your
-Web users. You MUST firewall the controller interface from users;
-otherwise anyone will be able to push any message to your subscribers.
-Not good!
+Note that the controller interface needs to be accessible by the Web server, and
+the subscriber interface needs to be accessible by your Web users. You MUST
+firewall the controller interface from users; otherwise anyone will be able to
+push any message to your subscribers. Not good!
 
 You can enable the plugin with this line in config.php:
 
 addPlugin('Meteor', array('webserver' => 'meteor server address'));
 
 Available parameters:
-
 * webserver: Web server address. Defaults to site server.
 * webport: port to connect to for Web access. Defaults to 4670.
 * controlserver: Control server address. Defaults to webserver.
 * controlport: port to connect to for control. Defaults to 4671.
 * channelbase: a base string to use for channels. Good if you have
   multiple sites using the same meteor server.
-
index cfed0779baf37f94a1fcb932967e47b2f2e7c333..4041b228aee41f02ed7e71587dc102ce68648cfa 100644 (file)
@@ -176,6 +176,7 @@ class MinifyPlugin extends Plugin
                             'author' => 'Craig Andrews',
                             'homepage' => 'http://status.net/wiki/Plugin:Minify',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('The Minify plugin minifies StatusNet\'s CSS and JavaScript, removing whitespace and comments.'));
         return true;
     }
index f7763735ed7adb91a24ba2ea6c574d24acd437bd..97fa7dadf9e01e639095346ed4aba829197c0e99 100644 (file)
@@ -1,4 +1,5 @@
-The Minify plugin minifies your CSS and Javascript, removing whitespace and comments.
+The Minify plugin minifies your CSS and Javascript, removing whitespace and
+comments.
 
 Note that if enabled this plugin and use a theme server,
     (if any of $config['theme']['server'], $config['theme']['path'],
@@ -31,4 +32,3 @@ Example
 =======
 
 addPlugin('minify', array());
-
index e012a40272c27d5eef0c89209ae7c4e101a06e8e..b7bee7c8815e572b6a4fa301a7b608fe951383df 100644 (file)
@@ -46,16 +46,18 @@ class MinifyAction extends Action
             if(file_exists($this->file)) {
                 return true;
             } else {
+                // TRANS: Client error displayed when not providing a valid path in parameter "f".
                 $this->clientError(_m('The parameter "f" is not a valid path.'),404);
                 return false;
             }
         }else{
+            // TRANS: Client error displayed when not providing parameter "f".
             $this->clientError(_m('The parameter "f" is required but missing.'),500);
             return false;
         }
     }
 
-    function etag() 
+    function etag()
     {
         if(isset($this->v)) {
             return "\"" . crc32($this->file . $this->v) . "\"";
@@ -73,7 +75,7 @@ class MinifyAction extends Action
     function handle($args)
     {
         parent::handle($args);
-        
+
         $c = Cache::instance();
         if (!empty($c)) {
             $cacheKey = Cache::key(MinifyPlugin::cacheKey . ':' . $this->file . '?v=' . empty($this->v)?'':$this->v);
@@ -108,6 +110,7 @@ class MinifyAction extends Action
                 header('Content-Type: ' . self::TYPE_CSS);
                 break;
             default:
+                // TRANS: Client error displayed when trying to minify an unsupported file type.
                 $this->clientError(_m('File type not supported.'),500);
                 return false;
         }
index aae48a52001751a8ff9b4792baa13c3dc9d6aec5..fc5008cda6ff91b29990031ef4a4d6a1d245c0e1 100644 (file)
@@ -31,7 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
-
 /**
  * Superclass for plugin to output XHTML Mobile Profile
  *
@@ -44,13 +43,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
 
 class WAP20Plugin extends Plugin
 {
-
     function onStartShowHTML($action)
     {
 
     }
-
 }
-
-
-?>
index fa0c4e7c22a12ada5d8f11d34369a49c0f48d6b1..7e005731b60e800d4c4878bb44d3c5156a73c4a9 100644 (file)
@@ -193,6 +193,7 @@ class MobileProfilePlugin extends WAP20Plugin
             $type = common_negotiate_type($cp, $sp);
 
             if (!$type) {
+                // TRANS: Client exception thrown when requesting a not supported media type.
                 throw new ClientException(_m('This page is not available in a '.
                                             'media type you accept.'), 406);
             }
@@ -310,31 +311,41 @@ class MobileProfilePlugin extends WAP20Plugin
         $action->elementStart('ul', array('id' => 'site_nav_global_primary'));
         if ($user) {
             $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
+                            // TRANS: Menu item in mobile profile to go to start page of site.
                             _m('Home'));
             $action->menuItem(common_local_url('profilesettings'),
+                            // TRANS: Menu item in mobile profile to go to user account settings.
                             _m('Account'));
             $action->menuItem(common_local_url('oauthconnectionssettings'),
-                                _m('Connect'));
+                            // TRANS: Menu item in mobile profile to connect to other services.
+                            _m('Connect'));
             if ($user->hasRight(Right::CONFIGURESITE)) {
                 $action->menuItem(common_local_url('siteadminpanel'),
-                                _m('Admin'), _m('Change site configuration'), false, 'nav_admin');
+                                // TRANS: Menu item in mobile profile to manage site settings.
+                                _m('Admin'),
+                                _m('Change site configuration'), false, 'nav_admin');
             }
             if (common_config('invite', 'enabled')) {
                 $action->menuItem(common_local_url('invite'),
+                                // TRANS: Menu item in mobile profile to invite other people.
                                 _m('Invite'));
             }
             $action->menuItem(common_local_url('logout'),
+                            // TRANS: Menu item in mobile profile log the current user off.
                             _m('Logout'));
         } else {
             if (!common_config('site', 'closed')) {
                 $action->menuItem(common_local_url('register'),
+                                // TRANS: Menu item in mobile profile to register with the site.
                                 _m('Register'));
             }
             $action->menuItem(common_local_url('login'),
+                            // TRANS: Menu item in mobile profile to log in.
                             _m('Login'));
         }
         if ($user || !common_config('site', 'private')) {
             $action->menuItem(common_local_url('peoplesearch'),
+                            // TRANS: Menu item in mobile profile to search the site.
                             _m('Search'));
         }
         $action->elementEnd('ul');
@@ -362,11 +373,13 @@ class MobileProfilePlugin extends WAP20Plugin
         if (common_config('attachments', 'uploads')) {
             if ($this->mobileFeatures['inputfiletype']) {
                 $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
+                // TRANS: Field label in mobile profile to attach a file to a status.
                 $form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach'));
                 $form->out->element('input', array('id' => 'notice_data-attach',
                                                    'type' => 'file',
                                                    'name' => 'attach',
-                                                   'title' => _m('Attach a file')));
+                                                   // TRANS: Field title in mobile profile to attach a file to a status.
+                                                   'title' => _m('Attach a file.')));
             }
         }
         if ($form->action) {
@@ -448,6 +461,7 @@ class MobileProfilePlugin extends WAP20Plugin
                             'author' => 'Sarven Capadisli',
                             'homepage' => 'http://status.net/wiki/Plugin:MobileProfile',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('XHTML MobileProfile output for supporting user agents.'));
         return true;
     }
index d003827d13e63078219fcf9d704c48dccfc09588..c2757bbeae5cb4c0a974866e140cca788e7bd773 100644 (file)
@@ -34,6 +34,7 @@ class ModHelperPlugin extends Plugin
                             'author' => 'Brion Vibber',
                             'homepage' => 'http://status.net/wiki/Plugin:ModHelper',
                             'rawdescription' =>
+                            // TRANS: Plugin description.
                             _m('Lets users who have been manually marked as "modhelper"s silence accounts.'));
 
         return true;
index ed478c27b83a7c2f97db1689edc75709f2a14bc3..95265c52ca3459ada012a567cf42e5c94327de93 100644 (file)
@@ -36,7 +36,8 @@ class ModPlusPlugin extends Plugin
                             'author' => 'Brion Vibber',
                             'homepage' => 'http://status.net/wiki/Plugin:ModPlus',
                             'rawdescription' =>
-                            _m('UI extensions for profile moderation actions.'));
+                            // TRANS: Plugin description.
+                            _m('UI extension for profile moderation actions.'));
 
         return true;
     }
@@ -136,6 +137,7 @@ class ModPlusPlugin extends Plugin
         $isRemote = !(User::staticGet('id', $profile->id));
         if ($isRemote) {
             $target = common_local_url('remoteprofile', array('id' => $profile->id));
+            // TRANS: Label for access to remote profile options.
             $label = _m('Remote profile options...');
             $out->elementStart('div', 'remote-profile-options');
             $out->element('a', array('href' => $target), $label);
index 4399c4813c61f5181c054172adad8c6b4f3ce502..8e2fcad284518ebb8c9b051f6391dade8426ef5e 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/* 
+/*
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
@@ -42,14 +42,11 @@ class RemoteProfileAction extends ShowstreamAction
 
     function title()
     {
-        // maybe fixed in 0.9.x
-        if (!empty($this->profile->fullname)) {
-            $base = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
-        } else {
-            $base = $this->profile->nickname;
-        }
+        $base = $this->profile->getBestName();
         $host = parse_url($this->profile->profileurl, PHP_URL_HOST);
-        return sprintf(_m('%s on %s'), $base, $host);
+        // TRANS: Remote profile action page title.
+        // TRANS: %1$s is a username, %2$s is a hostname.
+        return sprintf(_m('%1$s on %2$s'), $base, $host);
     }
 
     /**
@@ -60,7 +57,10 @@ class RemoteProfileAction extends ShowstreamAction
         $url = $this->profile->profileurl;
         $host = parse_url($url, PHP_URL_HOST);
         $markdown = sprintf(
-                _m('This remote profile is registered on another site; see [%s\'s original profile page on %s](%s).'),
+                // TRANS: Message on remote profile page.
+                // TRANS: This message contains Markdown links in the form [description](link).
+                // TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
+                _m('This remote profile is registered on another site; see [%1$s\'s original profile page on %2$s](%3$s).'),
                 $this->profile->nickname,
                 $host,
                 $url);
@@ -68,6 +68,7 @@ class RemoteProfileAction extends ShowstreamAction
         $this->raw($html);
 
         if ($this->profile->hasRole(Profile_role::SILENCED)) {
+            // TRANS: Message on blocked remote profile page.
             $markdown = _m('Site moderators have silenced this profile, which prevents delivery of new messages to any users on this site.');
             $this->raw(common_markup_to_html($markdown));
         }
@@ -103,5 +104,4 @@ class RemoteProfileAction extends ShowstreamAction
     {
         // skip
     }
-
-}
\ No newline at end of file
+}