diff options
author | Andy Staudacher <andy.st@gmail.com> | 2010-02-14 18:33:38 -0800 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2010-02-14 18:33:38 -0800 |
commit | 667d65aea460ea601858c54976495d294d93f017 (patch) | |
tree | 17a8c17743634bfb4f9628e5af6cce8acd4e60bd /modules | |
parent | 30dcaaa2365ab88c0516a10bfa287fd2208dcf57 (diff) |
Fix for ticket 901: Wrap Gallery version string into bdo tag to override the BiDi algorithm. Also, properly marking the "Powere by" string for translation.
See: http://www.w3.org/International/tutorials/bidi-xhtml/#Slide0420
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 13 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_theme.php | 7 | ||||
-rw-r--r-- | modules/gallery/module.info | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index dd53cf43..45d991af 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -284,11 +284,13 @@ class gallery_installer { module::set_var("gallery", "date_time_format", "Y-M-d H:i:s"); module::set_var("gallery", "time_format", "H:i:s"); module::set_var("gallery", "show_credits", 1); - // @todo this string needs to be picked up by l10n_scanner - module::set_var("gallery", "credits", "Powered by <a href=\"%url\">Gallery %version</a>"); + // Mark string for translation + $powered_by_string = t("Powered by <a href=\"%url\">%gallery_version</a>", + array("locale" => "root")); + module::set_var("gallery", "credits", $powered_by_string); module::set_var("gallery", "simultaneous_upload_limit", 5); module::set_var("gallery", "admin_area_timeout", 90 * 60); - module::set_version("gallery", 28); + module::set_version("gallery", 29); } static function upgrade($version) { @@ -538,6 +540,11 @@ class gallery_installer { module::set_var("gallery", "admin_area_timeout", 90 * 60); module::set_version("gallery", $version = 28); } + + if ($version == 28) { + module::set_var("gallery", "credits", "Powered by <a href=\"%url\">%gallery_version</a>"); + module::set_version("gallery", $version = 29); + } } static function uninstall() { diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index ec650e1c..d6944323 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -112,9 +112,12 @@ class gallery_theme_Core { } static function credits() { - return "<li class=\"g-first\">" . + $version_string = SafeString::of_safe_html( + '<bdo dir="ltr">Gallery ' . gallery::VERSION . '</bdo>'); + return "<li class=\"g-first\">" . t(module::get_var("gallery", "credits"), - array("url" => "http://gallery.menalto.com", "version" => gallery::VERSION)) . + array("url" => "http://gallery.menalto.com", + "gallery_version" => $version_string)) . "</li>"; } diff --git a/modules/gallery/module.info b/modules/gallery/module.info index ae300399..39615e1c 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ name = "Gallery 3" description = "Gallery core application" -version = 28 +version = 29 |