diff options
Diffstat (limited to 'plugins/DirectionDetector')
-rw-r--r-- | plugins/DirectionDetector/DirectionDetectorPlugin.php | 6 | ||||
-rw-r--r-- | plugins/DirectionDetector/locale/DirectionDetector.pot | 21 |
2 files changed, 24 insertions, 3 deletions
diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index 303e60d5f..34c511e21 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -38,7 +38,7 @@ class DirectionDetectorPlugin extends Plugin { * @param object $notice notice is going to be saved */ public function onStartNoticeSave(&$notice){ - if(self::isRTL($notice->content)) + if(!preg_match('/<span class="rtl">/', $notice->rendered) && self::isRTL($notice->content)) $notice->rendered = '<span class="rtl">'.$notice->rendered.'</span>'; return true; } @@ -48,7 +48,7 @@ class DirectionDetectorPlugin extends Plugin { * * @param */ - public function onEndShowStatusNetStyles(&$xml){ + public function onEndShowStatusNetStyles($xml){ $xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;width:490px;} .notice .author {float:left}'); } /** @@ -102,7 +102,7 @@ class DirectionDetectorPlugin extends Plugin { * * Returns false if the input string isn't a valid UTF-8 octet sequence. */ - private static function utf8ToUnicode(&$str){ + private static function utf8ToUnicode($str){ $mState = 0; // cached expected number of octets after the current octet // until the beginning of the next UTF8 character sequence $mUcs4 = 0; // cached Unicode character diff --git a/plugins/DirectionDetector/locale/DirectionDetector.pot b/plugins/DirectionDetector/locale/DirectionDetector.pot new file mode 100644 index 000000000..ebeda2dc4 --- /dev/null +++ b/plugins/DirectionDetector/locale/DirectionDetector.pot @@ -0,0 +1,21 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-04-29 23:39+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: DirectionDetectorPlugin.php:221 +msgid "shows notices with right-to-left content in correct direction." +msgstr "" |