http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98772

Revision: 98772
Author:   fptc
Date:     2011-10-03 15:26:10 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
Fixing i18n topics of r98627

Modified Paths:
--------------
    trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.body.php
    trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.i18n.php
    trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloudMaintenance.php
    trunk/extensions/FreqPatternTagCloud/includes/FrequentPattern.php
    trunk/extensions/FreqPatternTagCloud/includes/Proposal.php
    trunk/extensions/FreqPatternTagCloud/includes/Search.php
    trunk/extensions/FreqPatternTagCloud/includes/TagCloud.php

Modified: trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.body.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.body.php   
2011-10-03 15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.body.php   
2011-10-03 15:26:10 UTC (rev 98772)
@@ -56,7 +56,6 @@
                global $wgFreqPatternTagCloudMaxFontSize, 
$wgFreqPatternTagCloudMinFontSize, $wgRequest, $wgOut, $searchAttribut, 
$wgScriptPath;
                
                include_once("includes/FrequentPattern.php");
-               
                /*
                FrequentPattern::deleteAllRules();
                FrequentPattern::computeAllRules();
@@ -103,8 +102,8 @@
                }
                
                // Category
-               if (strpos(wfMsg("categoryname"), $currentAttributeValue) !== 
false) {
-                       $attributes[] = sprintf('"%s"', wfMsg("categoryname"));
+               if (strpos(wfMsg("fptc-categoryname"), $currentAttributeValue) 
!== false) {
+                       $attributes[] = sprintf('"%s"', 
wfMsg("fptc-categoryname"));
                }
                
                $res->free();
@@ -133,7 +132,7 @@
                                                        AND vals.smw_title LIKE 
'%".mysql_real_escape_string($currentSearchValue)."%'
                                                        ORDER BY vals.smw_title
                                                        LIMIT 20) UNION (
-                                                       SELECT smw_title AS 
val, '".wfMsg("categoryname")."' AS att
+                                                       SELECT smw_title AS 
val, '".wfMsg("fptc-categoryname")."' AS att
                                                        FROM 
".$dbr->tableName("smw_ids")."
                                                        WHERE smw_title LIKE 
'%".mysql_real_escape_string($currentSearchValue)."%'
                                                        AND smw_namespace = 14
@@ -150,7 +149,7 @@
                                continue;
                        } else {
                                foreach ($conclusions as $conclusion) {
-                                       $suggestions[] = sprintf('{ "label": 
"%s", "category": "'.addcslashes(wfMsg("searchSuggestionValue"), '"').'" }', 
addcslashes($conclusion, '"'), addcslashes($row['val'], '"'));
+                                       $suggestions[] = sprintf('{ "label": 
"%s", "category": "'.addcslashes(wfMsg("fptc-search-suggestion-value"), '"').'" 
}', addcslashes($conclusion, '"'), addcslashes($row['val'], '"'));
                                }
                        }
                }
@@ -196,11 +195,11 @@
                // Add input field
                if ($wgUser->isAllowed("protect")) {
                        $refreshData = sprintf('<div 
id="fptc_refresh">%s</div>', 
-                                       
$wgOut->parseInline(sprintf('[[:%s:%s|%s]]', self::SPECIALPAGE_PREFIX, 
self::MAINTENANCE_SPECIALPAGE, wfMsg("refreshFrequentPatterns"))));
+                                       
$wgOut->parseInline(sprintf('[[:%s:%s|%s]]', self::SPECIALPAGE_PREFIX, 
self::MAINTENANCE_SPECIALPAGE, wfMsg("fptc-refresh-frequent-patterns"))));
                } else {
                        $refreshData = "";
                }
-               $wgOut->addHTML($refreshData.wfMsg("formAttributeName").': 
<input type="text" name="fptc_attributeName" id="fptc_attributeName" 
value="'.$defaultAttribute.'"><input type="submit" 
value="'.wfMsg("formSubmitButton").'" onClick="fptc_relocate();">
+               
$wgOut->addHTML($refreshData.wfMsg("fptc-form-attribute-name").': <input 
type="text" name="fptc_attributeName" id="fptc_attributeName" 
value="'.$defaultAttribute.'"><input type="submit" 
value="'.wfMsg("fptc-form-submit-button").'" onClick="fptc_relocate();">
                                        ');
                
                $wgOut->addHTML("<br><br>");
@@ -221,10 +220,10 @@
                        // Context menu
                        $wgOut->addHTML('<ul id="fptc_contextMenu" 
class="contextMenu">
                                                <li class="browse">
-                                               <a 
href="#browse">'.wfMsg("contextMenu_Browse").'</a>
+                                               <a 
href="#browse">'.wfMsg("fptc-context-menu-browse").'</a>
                                                </li>
                                                <li class="suggestions 
separator">
-                                               
'.wfMsg("contextMenu_SimilarTags").':
+                                               
'.wfMsg("fptc-context-menu-similar-tags").':
                                                </li>
                                                </ul>');
                        
@@ -237,7 +236,7 @@
                } catch (InvalidAttributeException $e) {
                        if ($attribute) {       
                                // Attribute not found -> show error
-                               $wgOut->addHTML('<span style="color:red; 
font-weight:bold;">'.wfMsg("invalidAttribute").'</span>');
+                               $wgOut->addHTML('<span style="color:red; 
font-weight:bold;">'.wfMsg("fptc-invalid-attribute").'</span>');
                        }
                }
        }
@@ -254,7 +253,7 @@
                
                $wgOut->addHTML(sprintf('<div class="fptc_tag" 
style="font-size:%dpx;">%s</div>', 
                                        $this->fontSizeMin + 
($this->fontSizeMax - $this->fontSizeMin) * $tag->getRate(),
-                                       $attribute == wfMsg("categoryname") 
+                                       $attribute == 
wfMsg("fptc-categoryname") 
                                                ? 
$wgOut->parseInline(sprintf("[[:%s:%s|%s]]", self::CATEGORY_PAGE, 
$tag->getValue(), $tag->getValue())) 
                                                : 
$wgOut->parseInline(sprintf("[[:%s:%s/%s/%s|%s]]", self::SPECIALPAGE_PREFIX, 
self::ATTRIBUTE_VALUE_INDEX_SPECIALPAGE, $attribute, $tag->getValue(), 
$tag->getValue()))));
        }
@@ -279,7 +278,8 @@
                                        try {
                                                // Only if suggestions found
                                                if ($proposal->getProposal()) {
-                                                       
$wgOut->addHTML(wfMsg("suggestion"));
+                                                       
$wgOut->addHTML(wfMsg("fptc-suggestion"));
+                                                       $wgOut->addHTML(" ");
                                                }
                                                $w=1;
                                                foreach 
($proposal->getProposal() as $possibleAttribute) {
@@ -292,7 +292,7 @@
                                                }
                                                
                                        } catch (InvalidAttributeException $e) {
-                                               
$wgOut->addHTML(wfMsg("noSuggestion"));
+                                               
$wgOut->addHTML(wfMsg("fptc-no-suggestion"));
                                        }
                                        if ($proposal->getProposal()) {
                                                $wgOut->addHTML("<br><br>");

Modified: trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.i18n.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.i18n.php   
2011-10-03 15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.i18n.php   
2011-10-03 15:26:10 UTC (rev 98772)
@@ -12,39 +12,58 @@
 $messages = array();
 
 $messages['en'] = array(
-               "categoryname" => "Category",
-               "contextMenu_Browse" => "Browse Pages With This Value",
-               "contextMenu_SimilarTags" => "Similar Tags",
-               "formAttributeName" => "Property",
-               "formSubmitButton" => "Submit",
                "freqpatterntagcloud" => "Frequent Pattern Tag Cloud",
                "freqpatterntagcloudmaintenance" => "Frequent Pattern Tag Cloud 
Maintenance",
-               "invalidAttribute" => "The entered property is invalid.",
-               "insufficientRightsForMaintenance" => "You have to log in as 
system administrator to view this page.",
-               "refreshFrequentPatterns" => "Refresh Data",
-               "refreshedFrequentPatterns" => "Frequent pattern rules 
refreshed.",
-               "searchAttributeName" => "Search property",
-               "searchButton" => "Search",
-               "searchSuggestionValue" => "Similar to \"%s\":",
-               "suggestion" => "Do you mean: ",
-               "noSuggestion" => "No suggestions found"
+               "fptc-categoryname" => "Category",
+               "fptc-context-menu-browse" => "Browse pages with this value",
+               "fptc-context-menu-similar-tags" => "Similar tags",
+               "fptc-form-attribute-name" => "Property",
+               "fptc-form-submit-button" => "Submit",
+               "fptc-invalid-attribute" => "The entered property is invalid.",
+               "fptc-insufficient-rights-for-maintenance" => "You have to log 
in as system administrator to view this page.",
+               "fptc-refresh-frequent-patterns" => "Refresh data",
+               "fptc-refreshed-frequent-patterns" => "Frequent pattern rules 
refreshed.",
+               "fptc-search-attribute-name" => "Search property",
+               "fptc-search-button" => "Search",
+               "fptc-search-suggestion-value" => "Similar to \"%s\":",
+               "fptc-suggestion" => "Do you mean:",
+               "fptc-no-suggestion" => "No suggestions found"
                );
                
 $messages['de'] = array(
-               "categoryname" => "Kategorie",
-               "contextMenu_Browse" => "Durchsuche Seiten mit diesem Wert",
-               "contextMenu_SimilarTags" => "&Auml;hnliche Tags",
-               "formAttributeName" => "Attribut",
-               "formSubmitButton" => "Eingabe",
                "freqpatterntagcloud" => "Frequent Pattern Tag Cloud",
                "freqpatterntagcloudmaintenance" => "Frequent Pattern Tag Cloud 
Maintenance",
-               "invalidAttribute" => "Das eingegebene Attribut ist 
ung&uuml;ltig.",
-               "insufficientRightsForMaintenance" => "Um diese Seite sehen zu 
k&ouml;nnen m&uuml;ssen Sie als Systemadministrator angemeldet sein.",
-               "refreshFrequentPatterns" => "Aktualisierung der Daten",
-               "refreshedFrequentPatterns" => "Regeln f&uuml;r frequent 
pattern neu generiert.",
-               "searchAttributeName" => "Suche nach Attribut",
-               "searchButton" => "Suche",
-               "searchSuggestionValue" => "&Auml;hnlich zu \"%s\":",
-               "suggestion" => "Meinten Sie: ",
-               "noSuggestion" => "Keine Vorschl&auml;ge gefunden"
+               "fptc-categoryname" => "Kategorie",
+               "fptc-context-menu-browse" => "Durchsuche Seiten mit diesem 
Wert",
+               "fptc-context-menu-similar-tags" => "\xC4hnliche Tags",
+               "fptc-form-attribute-name" => "Attribut",
+               "fptc-form-submit-button" => "Eingabe",
+               "fptc-invalid-attribute" => "Das eingegebene Attribut ist 
ung&uuml;ltig.",
+               "fptc-insufficient-rights-for-maintenance" => "Um diese Seite 
sehen zu k&ouml;nnen m&uuml;ssen Sie als Systemadministrator angemeldet sein.",
+               "fptc-refresh-frequent-patterns" => "Aktualisierung der Daten",
+               "fptc-refreshed-frequent-patterns" => "Regeln f&uuml;r frequent 
pattern neu generiert.",
+               "fptc-search-attribute-name" => "Suche nach Attribut",
+               "fptc-search-button" => "Suche",
+               "fptc-search-suggestion-value" => "&Auml;hnlich zu \"%s\":",
+               "fptc-suggestion" => "Meinten Sie:",
+               "fptc-no-suggestion" => "Keine Vorschl&auml;ge gefunden"
+               );
+               
+$messages['qqq'] = array(
+               "freqpatterntagcloud" => "This message is the page title of the 
frequent-pattern-tag-cloud-specialpage and must not be translated.",
+               "freqpatterntagcloudmaintenance" => "This message is the page 
title of the frequent-pattern-tag-cloud-maintenace-specialpage and must not be 
translated.",
+               "fptc-categoryname" => "This message is the name of the 
category-attribut which is used in SemantikMediaWiki (e.g. category:example)",
+               "fptc-context-menu-browse" => "This message is used as a title 
in context menu of the tag cloud tags",
+               "fptc-context-menu-similar-tags" => "This message is used as a 
title in context menu of the tag cloud tags",
+               "fptc-form-attribute-name" => "This message describes the input 
box on the frequent-pattern-tag-cloud-specialpage",
+               "fptc-form-submit-button" => "This message is the text of the 
button which submits the value in the input box on the 
frequent-pattern-tag-cloud-specialpage",
+               "fptc-invalid-attribute" => "This message appears if the value 
in the input box on the frequent-pattern-tag-cloud-specialpage is invalid",
+               "fptc-insufficient-rights-for-maintenance" => "This message 
appears when calling the frequent-pattern-tag-cloud-maintenace-specialpage and 
the user is not a administrator.",
+               "fptc-refresh-frequent-patterns" => "This message is the text 
of the button to refresh the frequent patterns on the 
frequent-pattern-tag-cloud-maintenace-specialpage",
+               "fptc-refreshed-frequent-patterns" => "This message appears 
after successful update of the frequent patterns.",
+               "fptc-search-attribute-name" => "This message describes the 
search input box.",
+               "fptc-search-button" => "This message is the text of the button 
search",
+               "fptc-search-suggestion-value" => "This mesage is the title of 
the search suggestions (parameter %s = suggestion, do not translate)",
+               "fptc-suggestion" => "This message appears after submitting an 
invalid value in the input box on the frequent-pattern-tag-cloud-specialpage",
+               "fptc-no-suggestion" => "This message appears if no suggestions 
can be found."
                );
\ No newline at end of file

Modified: 
trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloudMaintenance.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloudMaintenance.php     
2011-10-03 15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloudMaintenance.php     
2011-10-03 15:26:10 UTC (rev 98772)
@@ -35,7 +35,7 @@
                
                if (!$wgUser->isAllowed("protect")) {
                        // No admin
-                       
$wgOut->addWikiText(wfMsg("insufficientRightsForMaintenance"));
+                       
$wgOut->addWikiText(wfMsg("fptc-insufficient-rights-for-maintenance"));
                } else {
                        // Check if this call is the first
                        try {
@@ -52,7 +52,7 @@
                        FrequentPattern::computeAllRules();
                        
                        // Notify user
-                       $wgOut->addWikiText(wfMsg("refreshedFrequentPatterns"));
+                       
$wgOut->addWikiText(wfMsg("fptc-refreshed-frequent-patterns"));
                }
        }
        

Modified: trunk/extensions/FreqPatternTagCloud/includes/FrequentPattern.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/includes/FrequentPattern.php   
2011-10-03 15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/includes/FrequentPattern.php   
2011-10-03 15:26:10 UTC (rev 98772)
@@ -153,7 +153,7 @@
                $dbr =& wfGetDB( DB_SLAVE );
                
                // Get id of attribute
-               if (wfMsg("categoryname") == $attribute) {
+               if (wfMsg("fptc-categoryname") == $attribute) {
                        $res = $dbr->query("SELECT 0");
                } else {
                        $res = $dbr->query("SELECT smw_id
@@ -167,7 +167,7 @@
                $res->free();
                
                // Get id of assumption
-               if (wfMsg("categoryname") == $attribute) {
+               if (wfMsg("fptc-categoryname") == $attribute) {
                        $res = $dbr->query("SELECT smw_id
                                                FROM 
".$dbr->tableName("smw_ids")."
                                                WHERE smw_title = 
'".mysql_real_escape_string($assumption)."'

Modified: trunk/extensions/FreqPatternTagCloud/includes/Proposal.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/includes/Proposal.php  2011-10-03 
15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/includes/Proposal.php  2011-10-03 
15:26:10 UTC (rev 98772)
@@ -54,8 +54,8 @@
                }
                
                // Category
-               if (strpos(wfMsg("categoryname"), $attribute) !== false) {
-                       $attributes[] = sprintf("%s", wfMsg("categoryname"));
+               if (strpos(wfMsg("fptc-categoryname"), $attribute) !== false) {
+                       $attributes[] = sprintf("%s", 
wfMsg("fptc-categoryname"));
                }
                
                $res->free();
@@ -88,8 +88,8 @@
                }
                
                // Category
-               if (strpos(wfMsg("categoryname"), $attribute) === 0) {
-                       $attributes_1[] = sprintf("%s", wfMsg("categoryname"));
+               if (strpos(wfMsg("fptc-categoryname"), $attribute) === 0) {
+                       $attributes_1[] = sprintf("%s", 
wfMsg("fptc-categoryname"));
                }
                
                // Search with regexp for related attributes with the same 
ending 
@@ -106,8 +106,8 @@
                }
                
                // Category
-               if (strpos(wfMsg("categoryname"), $attribute) === 
strlen(wfMsg("categoryname")) - strlen($attribute)) {
-                       $attributes_2[] = sprintf("%s", wfMsg("categoryname"));
+               if (strpos(wfMsg("fptc-categoryname"), $attribute) === 
strlen(wfMsg("fptc-categoryname")) - strlen($attribute)) {
+                       $attributes_2[] = sprintf("%s", 
wfMsg("fptc-categoryname"));
                }
                
                // Merge both arrays for one return
@@ -151,8 +151,8 @@
                }
                
                // Category
-               if (strpos(wfMsg("categoryname"), $beginAttribut) === 0 || 
strpos(wfMsg("categoryname"), $endAttribut) === strlen(wfMsg("categoryname")) - 
strlen($endAttribut) || strpos(wfMsg("categoryname"), $attribute) !== false) {
-                       $attributes[] = sprintf("%s", wfMsg("categoryname"));
+               if (strpos(wfMsg("fptc-categoryname"), $beginAttribut) === 0 || 
strpos(wfMsg("fptc-categoryname"), $endAttribut) === 
strlen(wfMsg("fptc-categoryname")) - strlen($endAttribut) || 
strpos(wfMsg("fptc-categoryname"), $attribute) !== false) {
+                       $attributes[] = sprintf("%s", 
wfMsg("fptc-categoryname"));
                }
                
                $res->free();

Modified: trunk/extensions/FreqPatternTagCloud/includes/Search.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/includes/Search.php    2011-10-03 
15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/includes/Search.php    2011-10-03 
15:26:10 UTC (rev 98772)
@@ -40,7 +40,7 @@
         */
        private function attributeAvailable($attribute) {
                // Category
-               if (wfMsg("categoryname") == $attribute) {
+               if (wfMsg("fptc-categoryname") == $attribute) {
                        return true;
                }
                

Modified: trunk/extensions/FreqPatternTagCloud/includes/TagCloud.php
===================================================================
--- trunk/extensions/FreqPatternTagCloud/includes/TagCloud.php  2011-10-03 
15:15:48 UTC (rev 98771)
+++ trunk/extensions/FreqPatternTagCloud/includes/TagCloud.php  2011-10-03 
15:26:10 UTC (rev 98772)
@@ -53,7 +53,7 @@
         */
        private function checkAttribute($attribute) {
                // Category
-               if (wfMsg("categoryname") == $attribute) {
+               if (wfMsg("fptc-categoryname") == $attribute) {
                        return true;
                }
                


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to