r73009 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73008‎ | r73009 | r73010 >
Date:19:30, 14 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Fix missing msgctxt
Modified paths:
  • /trunk/extensions/Translate/ffs/Gettext.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/ffs/Gettext.php
@@ -721,6 +721,7 @@
722722
723723 protected function formatMessageBlock( $key, $m, $trans, $pot, $pluralCount ) {
724724 $header = $this->formatDocumentation( $key );
 725+ $content = '';
725726
726727 $comments = self::chainGetter( 'comments', $pot, $trans, array() );
727728 foreach ( $comments as $type => $typecomments ) {
@@ -732,9 +733,9 @@
733734 $flags = self::chainGetter( 'flags', $pot, $trans, array() );
734735 $flags = array_merge( $m->getTags(), $flags );
735736
736 - $ctxt = self::chainGetter( 'msgctxt', $pot, $trans, false );
 737+ $ctxt = self::chainGetter( 'ctxt', $pot, $trans, false );
737738 if ( $ctxt ) {
738 - $output .= 'msgctxt ' . self::escape( $ctxt ) . "\n";
 739+ $content .= 'msgctxt ' . self::escape( $ctxt ) . "\n";
739740 }
740741
741742 $msgid = $m->definition();
@@ -747,7 +748,7 @@
748749
749750 if ( preg_match( '/{{PLURAL:GETTEXT/i', $msgid ) ) {
750751 $forms = $this->splitPlural( $msgid, 2 );
751 - $content = 'msgid ' . $this->escape( $forms[0] ) . "\n";
 752+ $content .= 'msgid ' . $this->escape( $forms[0] ) . "\n";
752753 $content .= 'msgid_plural ' . $this->escape( $forms[1] ) . "\n";
753754
754755 try {
@@ -763,7 +764,7 @@
764765 }
765766
766767 } else {
767 - $content = 'msgid ' . self::escape( $msgid ) . "\n";
 768+ $content .= 'msgid ' . self::escape( $msgid ) . "\n";
768769 $content .= 'msgstr ' . self::escape( $msgstr ) . "\n";
769770 }
770771

Status & tagging log