Index: trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.body.php |
— | — | @@ -56,7 +56,6 @@ |
57 | 57 | global $wgFreqPatternTagCloudMaxFontSize, $wgFreqPatternTagCloudMinFontSize, $wgRequest, $wgOut, $searchAttribut, $wgScriptPath; |
58 | 58 | |
59 | 59 | include_once("includes/FrequentPattern.php"); |
60 | | - |
61 | 60 | /* |
62 | 61 | FrequentPattern::deleteAllRules(); |
63 | 62 | FrequentPattern::computeAllRules(); |
— | — | @@ -103,8 +102,8 @@ |
104 | 103 | } |
105 | 104 | |
106 | 105 | // Category |
107 | | - if (strpos(wfMsg("categoryname"), $currentAttributeValue) !== false) { |
108 | | - $attributes[] = sprintf('"%s"', wfMsg("categoryname")); |
| 106 | + if (strpos(wfMsg("fptc-categoryname"), $currentAttributeValue) !== false) { |
| 107 | + $attributes[] = sprintf('"%s"', wfMsg("fptc-categoryname")); |
109 | 108 | } |
110 | 109 | |
111 | 110 | $res->free(); |
— | — | @@ -133,7 +132,7 @@ |
134 | 133 | AND vals.smw_title LIKE '%".mysql_real_escape_string($currentSearchValue)."%' |
135 | 134 | ORDER BY vals.smw_title |
136 | 135 | LIMIT 20) UNION ( |
137 | | - SELECT smw_title AS val, '".wfMsg("categoryname")."' AS att |
| 136 | + SELECT smw_title AS val, '".wfMsg("fptc-categoryname")."' AS att |
138 | 137 | FROM ".$dbr->tableName("smw_ids")." |
139 | 138 | WHERE smw_title LIKE '%".mysql_real_escape_string($currentSearchValue)."%' |
140 | 139 | AND smw_namespace = 14 |
— | — | @@ -150,7 +149,7 @@ |
151 | 150 | continue; |
152 | 151 | } else { |
153 | 152 | foreach ($conclusions as $conclusion) { |
154 | | - $suggestions[] = sprintf('{ "label": "%s", "category": "'.addcslashes(wfMsg("searchSuggestionValue"), '"').'" }', addcslashes($conclusion, '"'), addcslashes($row['val'], '"')); |
| 153 | + $suggestions[] = sprintf('{ "label": "%s", "category": "'.addcslashes(wfMsg("fptc-search-suggestion-value"), '"').'" }', addcslashes($conclusion, '"'), addcslashes($row['val'], '"')); |
155 | 154 | } |
156 | 155 | } |
157 | 156 | } |
— | — | @@ -196,11 +195,11 @@ |
197 | 196 | // Add input field |
198 | 197 | if ($wgUser->isAllowed("protect")) { |
199 | 198 | $refreshData = sprintf('<div id="fptc_refresh">%s</div>', |
200 | | - $wgOut->parseInline(sprintf('[[:%s:%s|%s]]', self::SPECIALPAGE_PREFIX, self::MAINTENANCE_SPECIALPAGE, wfMsg("refreshFrequentPatterns")))); |
| 199 | + $wgOut->parseInline(sprintf('[[:%s:%s|%s]]', self::SPECIALPAGE_PREFIX, self::MAINTENANCE_SPECIALPAGE, wfMsg("fptc-refresh-frequent-patterns")))); |
201 | 200 | } else { |
202 | 201 | $refreshData = ""; |
203 | 202 | } |
204 | | - $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();"> |
| 203 | + $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();"> |
205 | 204 | '); |
206 | 205 | |
207 | 206 | $wgOut->addHTML("<br><br>"); |
— | — | @@ -221,10 +220,10 @@ |
222 | 221 | // Context menu |
223 | 222 | $wgOut->addHTML('<ul id="fptc_contextMenu" class="contextMenu"> |
224 | 223 | <li class="browse"> |
225 | | - <a href="#browse">'.wfMsg("contextMenu_Browse").'</a> |
| 224 | + <a href="#browse">'.wfMsg("fptc-context-menu-browse").'</a> |
226 | 225 | </li> |
227 | 226 | <li class="suggestions separator"> |
228 | | - '.wfMsg("contextMenu_SimilarTags").': |
| 227 | + '.wfMsg("fptc-context-menu-similar-tags").': |
229 | 228 | </li> |
230 | 229 | </ul>'); |
231 | 230 | |
— | — | @@ -237,7 +236,7 @@ |
238 | 237 | } catch (InvalidAttributeException $e) { |
239 | 238 | if ($attribute) { |
240 | 239 | // Attribute not found -> show error |
241 | | - $wgOut->addHTML('<span style="color:red; font-weight:bold;">'.wfMsg("invalidAttribute").'</span>'); |
| 240 | + $wgOut->addHTML('<span style="color:red; font-weight:bold;">'.wfMsg("fptc-invalid-attribute").'</span>'); |
242 | 241 | } |
243 | 242 | } |
244 | 243 | } |
— | — | @@ -254,7 +253,7 @@ |
255 | 254 | |
256 | 255 | $wgOut->addHTML(sprintf('<div class="fptc_tag" style="font-size:%dpx;">%s</div>', |
257 | 256 | $this->fontSizeMin + ($this->fontSizeMax - $this->fontSizeMin) * $tag->getRate(), |
258 | | - $attribute == wfMsg("categoryname") |
| 257 | + $attribute == wfMsg("fptc-categoryname") |
259 | 258 | ? $wgOut->parseInline(sprintf("[[:%s:%s|%s]]", self::CATEGORY_PAGE, $tag->getValue(), $tag->getValue())) |
260 | 259 | : $wgOut->parseInline(sprintf("[[:%s:%s/%s/%s|%s]]", self::SPECIALPAGE_PREFIX, self::ATTRIBUTE_VALUE_INDEX_SPECIALPAGE, $attribute, $tag->getValue(), $tag->getValue())))); |
261 | 260 | } |
— | — | @@ -279,7 +278,8 @@ |
280 | 279 | try { |
281 | 280 | // Only if suggestions found |
282 | 281 | if ($proposal->getProposal()) { |
283 | | - $wgOut->addHTML(wfMsg("suggestion")); |
| 282 | + $wgOut->addHTML(wfMsg("fptc-suggestion")); |
| 283 | + $wgOut->addHTML(" "); |
284 | 284 | } |
285 | 285 | $w=1; |
286 | 286 | foreach ($proposal->getProposal() as $possibleAttribute) { |
— | — | @@ -292,7 +292,7 @@ |
293 | 293 | } |
294 | 294 | |
295 | 295 | } catch (InvalidAttributeException $e) { |
296 | | - $wgOut->addHTML(wfMsg("noSuggestion")); |
| 296 | + $wgOut->addHTML(wfMsg("fptc-no-suggestion")); |
297 | 297 | } |
298 | 298 | if ($proposal->getProposal()) { |
299 | 299 | $wgOut->addHTML("<br><br>"); |
Index: trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloud.i18n.php |
— | — | @@ -12,39 +12,58 @@ |
13 | 13 | $messages = array(); |
14 | 14 | |
15 | 15 | $messages['en'] = array( |
16 | | - "categoryname" => "Category", |
17 | | - "contextMenu_Browse" => "Browse Pages With This Value", |
18 | | - "contextMenu_SimilarTags" => "Similar Tags", |
19 | | - "formAttributeName" => "Property", |
20 | | - "formSubmitButton" => "Submit", |
21 | 16 | "freqpatterntagcloud" => "Frequent Pattern Tag Cloud", |
22 | 17 | "freqpatterntagcloudmaintenance" => "Frequent Pattern Tag Cloud Maintenance", |
23 | | - "invalidAttribute" => "The entered property is invalid.", |
24 | | - "insufficientRightsForMaintenance" => "You have to log in as system administrator to view this page.", |
25 | | - "refreshFrequentPatterns" => "Refresh Data", |
26 | | - "refreshedFrequentPatterns" => "Frequent pattern rules refreshed.", |
27 | | - "searchAttributeName" => "Search property", |
28 | | - "searchButton" => "Search", |
29 | | - "searchSuggestionValue" => "Similar to \"%s\":", |
30 | | - "suggestion" => "Do you mean: ", |
31 | | - "noSuggestion" => "No suggestions found" |
| 18 | + "fptc-categoryname" => "Category", |
| 19 | + "fptc-context-menu-browse" => "Browse pages with this value", |
| 20 | + "fptc-context-menu-similar-tags" => "Similar tags", |
| 21 | + "fptc-form-attribute-name" => "Property", |
| 22 | + "fptc-form-submit-button" => "Submit", |
| 23 | + "fptc-invalid-attribute" => "The entered property is invalid.", |
| 24 | + "fptc-insufficient-rights-for-maintenance" => "You have to log in as system administrator to view this page.", |
| 25 | + "fptc-refresh-frequent-patterns" => "Refresh data", |
| 26 | + "fptc-refreshed-frequent-patterns" => "Frequent pattern rules refreshed.", |
| 27 | + "fptc-search-attribute-name" => "Search property", |
| 28 | + "fptc-search-button" => "Search", |
| 29 | + "fptc-search-suggestion-value" => "Similar to \"%s\":", |
| 30 | + "fptc-suggestion" => "Do you mean:", |
| 31 | + "fptc-no-suggestion" => "No suggestions found" |
32 | 32 | ); |
33 | 33 | |
34 | 34 | $messages['de'] = array( |
35 | | - "categoryname" => "Kategorie", |
36 | | - "contextMenu_Browse" => "Durchsuche Seiten mit diesem Wert", |
37 | | - "contextMenu_SimilarTags" => "Ähnliche Tags", |
38 | | - "formAttributeName" => "Attribut", |
39 | | - "formSubmitButton" => "Eingabe", |
40 | 35 | "freqpatterntagcloud" => "Frequent Pattern Tag Cloud", |
41 | 36 | "freqpatterntagcloudmaintenance" => "Frequent Pattern Tag Cloud Maintenance", |
42 | | - "invalidAttribute" => "Das eingegebene Attribut ist ungültig.", |
43 | | - "insufficientRightsForMaintenance" => "Um diese Seite sehen zu können müssen Sie als Systemadministrator angemeldet sein.", |
44 | | - "refreshFrequentPatterns" => "Aktualisierung der Daten", |
45 | | - "refreshedFrequentPatterns" => "Regeln für frequent pattern neu generiert.", |
46 | | - "searchAttributeName" => "Suche nach Attribut", |
47 | | - "searchButton" => "Suche", |
48 | | - "searchSuggestionValue" => "Ähnlich zu \"%s\":", |
49 | | - "suggestion" => "Meinten Sie: ", |
50 | | - "noSuggestion" => "Keine Vorschläge gefunden" |
| 37 | + "fptc-categoryname" => "Kategorie", |
| 38 | + "fptc-context-menu-browse" => "Durchsuche Seiten mit diesem Wert", |
| 39 | + "fptc-context-menu-similar-tags" => "�hnliche Tags", |
| 40 | + "fptc-form-attribute-name" => "Attribut", |
| 41 | + "fptc-form-submit-button" => "Eingabe", |
| 42 | + "fptc-invalid-attribute" => "Das eingegebene Attribut ist ungültig.", |
| 43 | + "fptc-insufficient-rights-for-maintenance" => "Um diese Seite sehen zu können müssen Sie als Systemadministrator angemeldet sein.", |
| 44 | + "fptc-refresh-frequent-patterns" => "Aktualisierung der Daten", |
| 45 | + "fptc-refreshed-frequent-patterns" => "Regeln für frequent pattern neu generiert.", |
| 46 | + "fptc-search-attribute-name" => "Suche nach Attribut", |
| 47 | + "fptc-search-button" => "Suche", |
| 48 | + "fptc-search-suggestion-value" => "Ähnlich zu \"%s\":", |
| 49 | + "fptc-suggestion" => "Meinten Sie:", |
| 50 | + "fptc-no-suggestion" => "Keine Vorschläge gefunden" |
| 51 | + ); |
| 52 | + |
| 53 | +$messages['qqq'] = array( |
| 54 | + "freqpatterntagcloud" => "This message is the page title of the frequent-pattern-tag-cloud-specialpage and must not be translated.", |
| 55 | + "freqpatterntagcloudmaintenance" => "This message is the page title of the frequent-pattern-tag-cloud-maintenace-specialpage and must not be translated.", |
| 56 | + "fptc-categoryname" => "This message is the name of the category-attribut which is used in SemantikMediaWiki (e.g. category:example)", |
| 57 | + "fptc-context-menu-browse" => "This message is used as a title in context menu of the tag cloud tags", |
| 58 | + "fptc-context-menu-similar-tags" => "This message is used as a title in context menu of the tag cloud tags", |
| 59 | + "fptc-form-attribute-name" => "This message describes the input box on the frequent-pattern-tag-cloud-specialpage", |
| 60 | + "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", |
| 61 | + "fptc-invalid-attribute" => "This message appears if the value in the input box on the frequent-pattern-tag-cloud-specialpage is invalid", |
| 62 | + "fptc-insufficient-rights-for-maintenance" => "This message appears when calling the frequent-pattern-tag-cloud-maintenace-specialpage and the user is not a administrator.", |
| 63 | + "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", |
| 64 | + "fptc-refreshed-frequent-patterns" => "This message appears after successful update of the frequent patterns.", |
| 65 | + "fptc-search-attribute-name" => "This message describes the search input box.", |
| 66 | + "fptc-search-button" => "This message is the text of the button search", |
| 67 | + "fptc-search-suggestion-value" => "This mesage is the title of the search suggestions (parameter %s = suggestion, do not translate)", |
| 68 | + "fptc-suggestion" => "This message appears after submitting an invalid value in the input box on the frequent-pattern-tag-cloud-specialpage", |
| 69 | + "fptc-no-suggestion" => "This message appears if no suggestions can be found." |
51 | 70 | ); |
\ No newline at end of file |
Index: trunk/extensions/FreqPatternTagCloud/includes/Proposal.php |
— | — | @@ -54,8 +54,8 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | // Category |
58 | | - if (strpos(wfMsg("categoryname"), $attribute) !== false) { |
59 | | - $attributes[] = sprintf("%s", wfMsg("categoryname")); |
| 58 | + if (strpos(wfMsg("fptc-categoryname"), $attribute) !== false) { |
| 59 | + $attributes[] = sprintf("%s", wfMsg("fptc-categoryname")); |
60 | 60 | } |
61 | 61 | |
62 | 62 | $res->free(); |
— | — | @@ -88,8 +88,8 @@ |
89 | 89 | } |
90 | 90 | |
91 | 91 | // Category |
92 | | - if (strpos(wfMsg("categoryname"), $attribute) === 0) { |
93 | | - $attributes_1[] = sprintf("%s", wfMsg("categoryname")); |
| 92 | + if (strpos(wfMsg("fptc-categoryname"), $attribute) === 0) { |
| 93 | + $attributes_1[] = sprintf("%s", wfMsg("fptc-categoryname")); |
94 | 94 | } |
95 | 95 | |
96 | 96 | // Search with regexp for related attributes with the same ending |
— | — | @@ -106,8 +106,8 @@ |
107 | 107 | } |
108 | 108 | |
109 | 109 | // Category |
110 | | - if (strpos(wfMsg("categoryname"), $attribute) === strlen(wfMsg("categoryname")) - strlen($attribute)) { |
111 | | - $attributes_2[] = sprintf("%s", wfMsg("categoryname")); |
| 110 | + if (strpos(wfMsg("fptc-categoryname"), $attribute) === strlen(wfMsg("fptc-categoryname")) - strlen($attribute)) { |
| 111 | + $attributes_2[] = sprintf("%s", wfMsg("fptc-categoryname")); |
112 | 112 | } |
113 | 113 | |
114 | 114 | // Merge both arrays for one return |
— | — | @@ -151,8 +151,8 @@ |
152 | 152 | } |
153 | 153 | |
154 | 154 | // Category |
155 | | - if (strpos(wfMsg("categoryname"), $beginAttribut) === 0 || strpos(wfMsg("categoryname"), $endAttribut) === strlen(wfMsg("categoryname")) - strlen($endAttribut) || strpos(wfMsg("categoryname"), $attribute) !== false) { |
156 | | - $attributes[] = sprintf("%s", wfMsg("categoryname")); |
| 155 | + if (strpos(wfMsg("fptc-categoryname"), $beginAttribut) === 0 || strpos(wfMsg("fptc-categoryname"), $endAttribut) === strlen(wfMsg("fptc-categoryname")) - strlen($endAttribut) || strpos(wfMsg("fptc-categoryname"), $attribute) !== false) { |
| 156 | + $attributes[] = sprintf("%s", wfMsg("fptc-categoryname")); |
157 | 157 | } |
158 | 158 | |
159 | 159 | $res->free(); |
Index: trunk/extensions/FreqPatternTagCloud/includes/TagCloud.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | */ |
55 | 55 | private function checkAttribute($attribute) { |
56 | 56 | // Category |
57 | | - if (wfMsg("categoryname") == $attribute) { |
| 57 | + if (wfMsg("fptc-categoryname") == $attribute) { |
58 | 58 | return true; |
59 | 59 | } |
60 | 60 | |
Index: trunk/extensions/FreqPatternTagCloud/includes/Search.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | */ |
42 | 42 | private function attributeAvailable($attribute) { |
43 | 43 | // Category |
44 | | - if (wfMsg("categoryname") == $attribute) { |
| 44 | + if (wfMsg("fptc-categoryname") == $attribute) { |
45 | 45 | return true; |
46 | 46 | } |
47 | 47 | |
Index: trunk/extensions/FreqPatternTagCloud/includes/FrequentPattern.php |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | $dbr =& wfGetDB( DB_SLAVE ); |
155 | 155 | |
156 | 156 | // Get id of attribute |
157 | | - if (wfMsg("categoryname") == $attribute) { |
| 157 | + if (wfMsg("fptc-categoryname") == $attribute) { |
158 | 158 | $res = $dbr->query("SELECT 0"); |
159 | 159 | } else { |
160 | 160 | $res = $dbr->query("SELECT smw_id |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | $res->free(); |
169 | 169 | |
170 | 170 | // Get id of assumption |
171 | | - if (wfMsg("categoryname") == $attribute) { |
| 171 | + if (wfMsg("fptc-categoryname") == $attribute) { |
172 | 172 | $res = $dbr->query("SELECT smw_id |
173 | 173 | FROM ".$dbr->tableName("smw_ids")." |
174 | 174 | WHERE smw_title = '".mysql_real_escape_string($assumption)."' |
Index: trunk/extensions/FreqPatternTagCloud/FreqPatternTagCloudMaintenance.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | if (!$wgUser->isAllowed("protect")) { |
38 | 38 | // No admin |
39 | | - $wgOut->addWikiText(wfMsg("insufficientRightsForMaintenance")); |
| 39 | + $wgOut->addWikiText(wfMsg("fptc-insufficient-rights-for-maintenance")); |
40 | 40 | } else { |
41 | 41 | // Check if this call is the first |
42 | 42 | try { |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | FrequentPattern::computeAllRules(); |
54 | 54 | |
55 | 55 | // Notify user |
56 | | - $wgOut->addWikiText(wfMsg("refreshedFrequentPatterns")); |
| 56 | + $wgOut->addWikiText(wfMsg("fptc-refreshed-frequent-patterns")); |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |