Index: trunk/extensions/Translate/Translate.i18n.php |
— | — | @@ -6639,6 +6639,10 @@ |
6640 | 6640 | 'translate-next' => 'Seuraava sivu', |
6641 | 6641 | 'translate-prev' => 'Edellinen sivu', |
6642 | 6642 | 'translate-page-description-legend' => 'Tietoja ryhmästä', |
| 6643 | + 'translate-page-description-hasoptional' => 'This message group contains optional messages. |
| 6644 | +Optional messages should only be translated when your language has special requirements |
| 6645 | +like not using spaces or transliterating proper names. $1', |
| 6646 | + 'translate-page-description-hasoptional-open' => 'Show optional messages.', |
6643 | 6647 | 'translate-page-edit' => 'muokkaa', |
6644 | 6648 | 'translate-ext-url' => '<hr />Verkkosivu: $1', |
6645 | 6649 | 'translate-optional' => '(valinnainen)', |
Index: trunk/extensions/Translate/specials/SpecialTranslate.php |
— | — | @@ -120,6 +120,25 @@ |
121 | 121 | echo $output; |
122 | 122 | } else { |
123 | 123 | $description = $this->getGroupDescription( $this->group ); |
| 124 | + |
| 125 | + $taskid = $this->options['task']; |
| 126 | + if ( in_array( $taskid, array( 'untranslated', 'reviewall' ), true ) ) { |
| 127 | + $hasOptional = count( $this->group->getTags( 'optional' ) ); |
| 128 | + if ( $hasOptional ) { |
| 129 | + $linker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; |
| 130 | + $linktext = wfMessage( 'translate-page-description-hasoptional-open' )->escaped(); |
| 131 | + $params = array( 'task' => 'optional' ) + $this->nondefaults; |
| 132 | + $link = $linker->link( $this->getTitle(), $linktext, array(), $params ); |
| 133 | + $note = wfMessage( 'translate-page-description-hasoptional' )->rawParams( $link )->parseAsBlock(); |
| 134 | + |
| 135 | + if ( $description ) { |
| 136 | + $description .= '<hr>' . $note; |
| 137 | + } else { |
| 138 | + $description = $note; |
| 139 | + } |
| 140 | + } |
| 141 | + } |
| 142 | + |
124 | 143 | if ( $description ) { |
125 | 144 | $description = Xml::fieldset( wfMsg( 'translate-page-description-legend' ), $description ); |
126 | 145 | } |