]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Fix localization for license notice in page footer (for ticket #2274: i18n cleanup)
[quix0rs-gnu-social.git] / lib / action.php
index b26ec8f01f92d03b43b1f953488541e48363287d..0fc3a0dc435cd537bd647e2468ee3fcda13335a5 100644 (file)
@@ -198,8 +198,7 @@ class Action extends HTMLOutputter // lawsuit
 
             if (Event::handle('StartShowStatusNetStyles', array($this)) &&
                 Event::handle('StartShowLaconicaStyles', array($this))) {
-                $this->cssLink('css/display.css',null,'screen, projection, tv');
-                $this->cssLink('css/print.css','base','print');
+                $this->cssLink('css/display.css',null, 'screen, projection, tv, print');
                 Event::handle('EndShowStatusNetStyles', array($this));
                 Event::handle('EndShowLaconicaStyles', array($this));
             }
@@ -420,15 +419,6 @@ class Action extends HTMLOutputter // lawsuit
     function showPrimaryNav()
     {
         $user = common_current_user();
-        $connect = '';
-        if (common_config('xmpp', 'enabled')) {
-            $connect = 'imsettings';
-        } else if (common_config('sms', 'enabled')) {
-            $connect = 'smssettings';
-        } else if (common_config('twitter', 'enabled')) {
-            $connect = 'twittersettings';
-        }
-
         $this->elementStart('dl', array('id' => 'site_nav_global_primary'));
         $this->element('dt', null, _('Primary site navigation'));
         $this->elementStart('dd');
@@ -444,14 +434,12 @@ class Action extends HTMLOutputter // lawsuit
                 $tooltip = _m('TOOLTIP', 'Change your email, avatar, password, profile');
                 // TRANS: Main menu option when logged in for access to user settings
                 $this->menuItem(common_local_url('profilesettings'),
-                                _m('MENU', 'Account'), $tooltip, false, 'nav_account');
-                if ($connect) {
-                    // TRANS: Tooltip for main menu option "Services"
-                    $tooltip = _m('TOOLTIP', 'Connect to services');
-                    // TRANS: Main menu option when logged in and connection are possible for access to options to connect to other services
-                    $this->menuItem(common_local_url($connect),
-                                    _m('MENU', 'Connect'), $tooltip, false, 'nav_connect');
-                }
+                                _('Account'), $tooltip, false, 'nav_account');
+                // TRANS: Tooltip for main menu option "Services"
+                $tooltip = _m('TOOLTIP', 'Connect to services');
+                // TRANS: Main menu option when logged in and connection are possible for access to options to connect to other services
+                $this->menuItem(common_local_url('oauthconnectionssettings'),
+                                _('Connect'), $tooltip, false, 'nav_connect');
                 if ($user->hasRight(Right::CONFIGURESITE)) {
                     // TRANS: Tooltip for menu option "Admin"
                     $tooltip = _m('TOOLTIP', 'Change site configuration');
@@ -809,11 +797,14 @@ class Action extends HTMLOutputter // lawsuit
     {
         $this->element('dt', array('id' => 'site_statusnet_license'), _('StatusNet software license'));
         $this->elementStart('dd', null);
+        // @fixme drop the final spaces in the messages when at good spot
+        // to let translations get updated.
         if (common_config('site', 'broughtby')) {
             $instr = _('**%%site.name%%** is a microblogging service brought to you by [%%site.broughtby%%](%%site.broughtbyurl%%). ');
         } else {
             $instr = _('**%%site.name%%** is a microblogging service. ');
         }
+        $instr .= ' ';
         $instr .= sprintf(_('It runs the [StatusNet](http://status.net/) microblogging software, version %s, available under the [GNU Affero General Public License](http://www.fsf.org/licensing/licenses/agpl-3.0.html).'), STATUSNET_VERSION);
         $output = common_markup_to_html($instr);
         $this->raw($output);
@@ -854,14 +845,16 @@ class Action extends HTMLOutputter // lawsuit
                                             'width' => '80',
                                             'height' => '15'));
                 $this->text(' ');
-                //TODO: This is dirty: i18n
-                $this->text(_('All '.common_config('site', 'name').' content and data are available under the '));
-                $this->element('a', array('class' => 'license',
-                                          'rel' => 'external license',
-                                          'href' => common_config('license', 'url')),
-                               common_config('license', 'title'));
-                $this->text(' ');
-                $this->text(_('license.'));
+                // TRANS: license message in footer. %1$s is the site name, %2$s is a link to the license URL, with a licence name set in configuration.
+                $notice = _('All %1$s content and data are available under the %2$s license.');
+                $link = "<a class=\"license\" rel=\"external license\" href=\"" .
+                        htmlspecialchars(common_config('license', 'url')) .
+                        "\">" .
+                        htmlspecialchars(common_config('license', 'title')) .
+                        "</a>";
+                $this->raw(sprintf(htmlspecialchars($notice),
+                                   htmlspecialchars(common_config('site', 'name')),
+                                   $link));
                 $this->elementEnd('p');
                 break;
             }