https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112672
Revision: 112672
Author: nikerabbit
Date: 2012-02-29 09:21:21 +0000 (Wed, 29 Feb 2012)
Log Message:
-----------
Parse the messages and pass the reason as variable
Modified Paths:
--------------
trunk/extensions/Translate/PageTranslation.i18n.php
trunk/extensions/Translate/specials/SpecialTranslate.php
Modified: trunk/extensions/Translate/PageTranslation.i18n.php
===================================================================
--- trunk/extensions/Translate/PageTranslation.i18n.php 2012-02-29 08:40:03 UTC
(rev 112671)
+++ trunk/extensions/Translate/PageTranslation.i18n.php 2012-02-29 09:21:21 UTC
(rev 112672)
@@ -97,9 +97,13 @@
'tpt-unknown-page' => 'This namespace is reserved for content page
translations.
The page you are trying to edit does not seem to correspond any page marked
for translation.',
'tpt-translation-restricted' => 'Translation of this message group to
this language has been prevented by translation administrator.',
- 'tpt-discouraged-language-force' => 'Translation administrator has
limited the languages this message group can be translated to. This languages
is not among those languegs.',
- 'tpt-discouraged-language' => 'This language is not among the priority
languages set by translation administrator for this message group.',
+ 'tpt-discouraged-language-force' => 'Translation administrator has
limited the languages this message group can be translated to. This languages
is not among those languages.
+Reason for limiting: $1',
+ 'tpt-discouraged-language' => 'This language is not among the priority
languages set by translation administrator for this message group
+
+Reason for prioritization: $1',
+
'tpt-render-summary' => 'Updating to match new version of source page',
'tpt-download-page' => 'Export page with translations',
Modified: trunk/extensions/Translate/specials/SpecialTranslate.php
===================================================================
--- trunk/extensions/Translate/specials/SpecialTranslate.php 2012-02-29
08:40:03 UTC (rev 112671)
+++ trunk/extensions/Translate/specials/SpecialTranslate.php 2012-02-29
09:21:21 UTC (rev 112672)
@@ -142,13 +142,14 @@
}
$priorityLangs = array_flip( explode( ',',
TranslateMetadata::get( $this->group->getId(), 'prioritylangs' ) ) );
$priorityForce = TranslateMetadata::get(
$this->group->getId(), 'priorityforce' );
- if ( count( $priorityLangs ) > 0 && !isset(
$priorityLangs[$this->options['language']] ) ) {
+ if ( !isset( $priorityLangs[$this->options['language']]
) ) {
$priorityReason = TranslateMetadata::get(
$this->group->getId(), 'priorityreason' );
- if ( $priorityForce == 'on' ) {
+ if ( $priorityForce === 'on' ) {
+ // Hide table
$this->paging['count'] = 0;
- $description .= '<p>' . wfMsg(
'tpt-discouraged-language-force' ) . '</p>' . $priorityReason ;
+ $description .= wfMessage(
'tpt-discouraged-language-force', $priorityReason )->parseAsBlock();
} else {
- $description .= '<p>' . wfMsg(
'tpt-discouraged-language' ) . '</p>' . $priorityReason;
+ $description .= wfMessage(
'tpt-discouraged-language', $priorityReason )->parseAsBlock();
}
}
if ( $description ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs