Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29692/plugin
Modified Files:
_WikiTranslation.php
Log Message:
added link to TranslateText action
Index: _WikiTranslation.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/_WikiTranslation.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -2 -b -p -d -r1.2 -r1.3
--- _WikiTranslation.php 16 Mar 2004 15:47:27 -0000 1.2
+++ _WikiTranslation.php 16 Mar 2004 20:22:32 -0000 1.3
@@ -285,10 +285,23 @@ class _PageList_Column_custom extends _P
// how to markup untranslated words and not existing pages?
// untranslated: (TODO) link to translation editor
- if ($trans == $text) { // untranslated
+ if ($trans == $text or // untranslated
+ (($this->_from_lang != 'en') and
+ ($this->_field != 'en') and
+ ($trans == $this->_plugin->translate($text, 'en', $this->_from_lang))
+ ))
+ {
global $Theme;
- if ($this->dbi->isWikiPage($trans))
- return HTML::span(array('class'=>'wikipage',
- 'style'=>'text-decoration:line-through'),$trans);
- elseif (is_object($page))
+ $link = $Theme->linkUnknownWikiWord($trans);
+ if ($this->dbi->isWikiPage($trans)) {
+ $url = WikiURL($trans, array('action' => 'TranslateText','lang' => $this->_field));
+ $button = $Theme->makeButton('T', $url);
+ $button->addTooltip(sprintf(_("Define the translation for %s in %s"), $trans, $this->_field));
+ $link = HTML::span($button);
+ $link->setAttr('class', 'wikiunknown');
+ $text = HTML::span($Theme->maybeSplitWikiWord($trans));
+ $text->setAttr('style', 'text-decoration:line-through');
+ $link->pushContent($text);
+ return $link;
+ } elseif (is_object($page))
return '';
else // not existing: empty
@@ -303,4 +316,7 @@ class _PageList_Column_custom extends _P
// $Log$
+// Revision 1.3 2004/03/16 20:22:32 rurban
+// added link to TranslateText action
+//
// Revision 1.2 2004/03/16 15:47:27 rurban
// added match, fixed reverse translation, added page=, what=allpages, what=wikiwords, fixed what=pages, simplified _PageList_Column_custom
|