]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix localization for license notice in page footer (for ticket #2274: i18n cleanup)
authorBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 15:56:43 +0000 (08:56 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 15:56:43 +0000 (08:56 -0700)
lib/action.php

index 09113a598eba6e4780e3b6f79a4eee8745e05377..0fc3a0dc435cd537bd647e2468ee3fcda13335a5 100644 (file)
@@ -845,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;
             }