Revision: 46227
Author:   siebrand
Date:     2009-01-25 20:44:19 +0000 (Sun, 25 Jan 2009)

Log Message:
-----------
Add parameter to 4 messages to allow for better localisation 
('smw_oi_statementsabout', 'smw_oi_mapto', 'smw_oi_thisissubcategoryof', and 
'smw_oi_thishascategory')

Modified Paths:
--------------
    trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php
    
trunk/extensions/SemanticMediaWiki/specials/OntologyImport/SMW_SpecialOntologyImport.php

Modified: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php       
2009-01-25 20:30:34 UTC (rev 46226)
+++ trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php       
2009-01-25 20:44:19 UTC (rev 46227)
@@ -171,11 +171,11 @@
        'smw_oi_select'               => 'Select the statements to import, and 
then click the import button.',
        'smw_oi_textforall'           => 'Header text to add to all imports 
(may be empty):',
        'smw_oi_selectall'            => 'Select or unselect all statements',
-       'smw_oi_statementsabout'      => 'Statements about',
-       'smw_oi_mapto'                => 'Map entity to',
+       'smw_oi_statementsabout'      => 'Statements about $1',
+       'smw_oi_mapto'                => 'Map entity to $1',
        'smw_oi_comment'              => 'Add the following text:',
-       'smw_oi_thisissubcategoryof'  => 'A subcategory of',
-       'smw_oi_thishascategory'      => 'Is part of',
+       'smw_oi_thisissubcategoryof'  => 'A subcategory of $1',
+       'smw_oi_thishascategory'      => 'Is part of $1',
        'smw_oi_importedfromontology' => 'Import from ontology',
 
        // Messages for (data)Types Special

Modified: 
trunk/extensions/SemanticMediaWiki/specials/OntologyImport/SMW_SpecialOntologyImport.php
===================================================================
--- 
trunk/extensions/SemanticMediaWiki/specials/OntologyImport/SMW_SpecialOntologyImport.php
    2009-01-25 20:30:34 UTC (rev 46226)
+++ 
trunk/extensions/SemanticMediaWiki/specials/OntologyImport/SMW_SpecialOntologyImport.php
    2009-01-25 20:44:19 UTC (rev 46227)
@@ -188,7 +188,8 @@
                        } else {
                                $classnew = 'class="new" ';
                        }
-                       $s['HUMAN'] = wfMsg( 'smw_oi_thishascategory' ) . ' <a 
href="'. $t->getLocalURL() .'" '. $classnew .'title="'. $t->getPrefixedText() 
.'">'. $t->getPrefixedText() .'</a>' . "\n";
+                       $thishascategoryLink = '<a href="'. $t->getLocalURL() 
.'" '. $classnew .'title="'. $t->getPrefixedText() .'">'. $t->getPrefixedText() 
.'</a>';
+                       $s['HUMAN'] = wfMsg( 'smw_oi_thishascategory', 
$thishascategoryLink ) . "\n";
                        $s['WIKI'] = "[[" . $t->getPrefixedText() . "]]" . "\n";
                        $statements[] = $s;
                }
@@ -222,7 +223,8 @@
                        } else {
                                $classnew = 'class="new" ';
                        }
-                       $s['HUMAN'] = wfMsg( 'smw_oi_thisissubcategoryof' ) . ' 
<a href="'. $t->getLocalURL() .'" '. $classnew .'title="'. 
$t->getPrefixedText() .'">'. $t->getPrefixedText() .'</a>' . "\n";
+                       $thisissubcategoryofLink = '<a href="'. 
$t->getLocalURL() .'" '. $classnew .'title="'. $t->getPrefixedText() .'">'. 
$t->getPrefixedText() .'</a>';
+                       $s['HUMAN'] = wfMsg( 'smw_oi_thisissubcategoryof', 
$thisissubcategoryofLink ) . "\n";
                        $s['WIKI'] = "[[" . $t->getPrefixedText() . "]]" . "\n";
                        $statements[] = $s;
                }
@@ -340,12 +342,14 @@
 
                // TODO $message .= '<input type="checkbox" />'; one click to 
click all statements about an entity
                wfLoadExtensionMessages('SemanticMediaWiki');
-               $message .= wfMsg( 'smw_oi_statementsabout' ) . ' <a href="'. 
$t->getLocalURL() .'" '. $classnew .'title="'. $t->getPrefixedText() .'">'. 
$t->getPrefixedText() .'</a> <br />' . "\n";
+               $statementsaboutLink = ' <a href="'. $t->getLocalURL() .'" '. 
$classnew .'title="'. $t->getPrefixedText() .'">'. $t->getPrefixedText() .'</a> 
<br />';
+               $message .= wfMsg( 'smw_oi_statementsabout', 
$statementsaboutLink ) . "\n";
 
                $snr = 0;
                if ($need_to_map) {
                        $value = $ns . ':' . $t->getDBkey() . '::[[equivalent 
URI:=' . $entity->getURI() . '| ]]'; // TODO internationalize equivalent URI
-                       $message .= '&nbsp; <input type="checkbox" name="s' . 
$enr . '_' . $snr++ . '" value="' . $value . '" />' . wfMsg( 'smw_oi_mapto' ) . 
' <em><a href="' . $entity->getURI() . '" title="' . $entity->getURI() . '">' . 
$entity->getURI() . '</a></em> <br />' . "\n";
+                       $maptoLink = '<em><a href="' . $entity->getURI() . '" 
title="' . $entity->getURI() . '">' . $entity->getURI() . '</a></em> <br />';
+                       $message .= '&nbsp; <input type="checkbox" name="s' . 
$enr . '_' . $snr++ . '" value="' . $value . '" />' . wfMsg( 'smw_oi_mapto', 
$maptoLink ) . "\n";
                }
 
                foreach ($statements as $statement) {



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to