r29195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29194‎ | r29195 | r29196 >
Date:21:44, 2 January 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Don't fuzzy Documentation language
Modified paths:
  • /trunk/extensions/Translate/README (modified) (history)
  • /trunk/extensions/Translate/fuzzy.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/README
@@ -21,6 +21,7 @@
2222 * Preserve whitespace also in Special:Translate table
2323 * Run checks on editing view (current translation or submitted translation in preview) and display them to user
2424 * Fixed a bug where empty text area would be filled with current translation even after first page load
 25+* Don't fuzzy Documentation language
2526
2627 == Changes in version 7 ==
2728 * Released 2007-12-29
Index: trunk/extensions/Translate/fuzzy.php
@@ -1,5 +1,16 @@
22 <?php
33
 4+/**
 5+ * Command line script to mark translations fuzzy (similar to gettext fuzzy).
 6+ *
 7+ * @addtogroup Extensions
 8+ *
 9+ * @author Niklas Laxström
 10+ * @copyright Copyright © 2007-2008, Niklas Laxström
 11+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
 12+ */
 13+
 14+
415 $IP = "../../maintenance/";
516 require_once( $IP . 'commandLine.inc' );
617
@@ -95,7 +106,7 @@
96107 }
97108
98109 private function updateMessage( $title, $text ) {
99 - global $wgTitle, $wgArticle;
 110+ global $wgTitle, $wgArticle, $wgTranslateDocumentationLanguageCode;
100111 $wgTitle = Title::newFromText( "Mediawiki:$title" );
101112
102113 echo "Updating {$wgTitle->getPrefixedText()}... ";
@@ -104,6 +115,12 @@
105116 return;
106117 }
107118
 119+ $items = explode( '/', $wgTitle->getText(), 2 );
 120+ if ( isset( $items[1] ) && $items[1] === $wgTranslateDocumentationLanguageCode ) {
 121+ echo "IGNORED!\n";
 122+ return;
 123+ }
 124+
108125 if ( $this->dryrun ) {
109126 echo "DRY RUN!\n";
110127 return;

Status & tagging log