From 67eeaa9cf46b0c68565c84e6c2747344ba66a860 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 3 May 2010 12:27:44 -0700 Subject: Pull localization updates from 0.9.x branch --- .../DirectionDetector/locale/DirectionDetector.pot | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/DirectionDetector/locale/DirectionDetector.pot (limited to 'plugins/DirectionDetector') 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 , 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 \n" +"Language-Team: LANGUAGE \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 "" -- cgit v1.2.3-54-g00ecf From 60825ba535763838059797db03cc32cf07276de0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 5 May 2010 10:51:05 -0700 Subject: Clean up reference usage warnings in DirectionDetector plugin --- plugins/DirectionDetector/DirectionDetectorPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/DirectionDetector') diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index 303e60d5f..0277e02c5 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -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 -- cgit v1.2.3-54-g00ecf From 8260a88f41bb21fe5e5bd25dea15283a08c2224c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 5 May 2010 11:28:05 -0700 Subject: Quick fix for DirectionDetector: only apply once; if it's already there in an incoming message (eg via OStatus), don't reapply it. Modified from patch from Everplays --- plugins/DirectionDetector/DirectionDetectorPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/DirectionDetector') diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index 0277e02c5..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('//', $notice->rendered) && self::isRTL($notice->content)) $notice->rendered = ''.$notice->rendered.''; return true; } -- cgit v1.2.3-54-g00ecf