Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | $active=true; # wrong place, but hey |
190 | 190 | $dmId=$this->getDefinedMeaningId(); |
191 | 191 | $dc=wdGetDataSetContext(); |
192 | | - $ow_conceptpanel=wfMsg("ow_concept_panel"); |
| 192 | + $ow_conceptpanel=wfMsg_sc("concept_panel"); |
193 | 193 | |
194 | 194 | $html="<div class=\"dataset-panel\">";; |
195 | 195 | $html.="<table border=\"0\"><tr><th class=\"dataset-panel-heading\">$ow_conceptpanel</th></tr>"; |
— | — | @@ -211,7 +211,7 @@ |
212 | 212 | } |
213 | 213 | $cmtitle=Title::newFromText("Special:ConceptMapping"); |
214 | 214 | $titleText=$wgTitle->getPrefixedURL(); |
215 | | - $cmlink=$sk->makeLinkObj($cmtitle,"<small>".wfMsg("add_concept_link")."</small>","set_$dc=$dmId&suppressWarnings=true"); |
| 215 | + $cmlink=$sk->makeLinkObj($cmtitle,"<small>".wfMsg_sc("add_concept_link")."</small>","set_$dc=$dmId&suppressWarnings=true"); |
216 | 216 | $html.="<tr><td>$cmlink</td></tr>\n"; |
217 | 217 | if($wdShowCopyPanel) { |
218 | 218 | $html.="<tr><td>".$this->getCopyPanel()."<td><tr>"; |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php |
— | — | @@ -2,6 +2,7 @@ |
3 | 3 | if (!defined('MEDIAWIKI')) die(); |
4 | 4 | |
5 | 5 | require_once("WikiDataAPI.php"); // for bootstrapCollection |
| 6 | + require_once("Utilities.php"); |
6 | 7 | |
7 | 8 | $wgAvailableRights[] = 'addcollection'; |
8 | 9 | $wgGroupPermissions['bureaucrat']['addcollection'] = true; |
Index: trunk/extensions/Wikidata/OmegaWiki/Utilities.php |
— | — | @@ -15,8 +15,8 @@ |
16 | 16 | $args=func_get_args(); |
17 | 17 | array_shift($args); |
18 | 18 | global |
19 | | - $SiteContext; |
20 | | - return wfMsgReal("${SiteContext}_${message}", $args, true); |
| 19 | + $wdSiteContext; |
| 20 | + return wfMsgReal("${wdSiteContext}_${message}", $args, true); |
21 | 21 | } |
22 | 22 | |
23 | 23 | |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -3,6 +3,7 @@ |
4 | 4 | require_once("Attribute.php"); |
5 | 5 | require_once("WikiDataGlobals.php"); |
6 | 6 | require_once("ViewInformation.php"); |
| 7 | +require_once("Utilities.php"); |
7 | 8 | |
8 | 9 | /** |
9 | 10 | * |
— | — | @@ -69,7 +70,6 @@ |
70 | 71 | |
71 | 72 | if (!is_null($viewInformation)) { |
72 | 73 | global $messageCacheOK; |
73 | | - var_dump($messageCacheOK); |
74 | 74 | if (!$messageCacheOK) { |
75 | 75 | #We're not ready to do this yet! |
76 | 76 | return False; #so we get out, but with viewinfo cached |
— | — | @@ -94,19 +94,19 @@ |
95 | 95 | $t=$this; #<-keep things short to declutter |
96 | 96 | |
97 | 97 | $t->in_setup=True; |
98 | | - $t->language = new Attribute("language", wfMsg("Language"), "language"); |
99 | | - $t->spelling = new Attribute("spelling", wfMsg("Spelling"), "spelling"); |
100 | | - $t->text = new Attribute("text", wfMsg("Text"), "text"); |
101 | | - $t->definedMeaningAttributes = new Attribute("defined-meaning-attributes", wfMsg("DefinedMeaningAttributes"), "will-be-specified-below"); |
102 | | - $t->objectAttributes = new Attribute("object-attributes", wfMsg("Annotation"), "will-be-specified-below"); |
| 98 | + $t->language = new Attribute("language", wfMsg_sc("Language"), "language"); |
| 99 | + $t->spelling = new Attribute("spelling", wfMsg_sc("Spelling"), "spelling"); |
| 100 | + $t->text = new Attribute("text", wfMsg_sc("Text"), "text"); |
| 101 | + $t->definedMeaningAttributes = new Attribute("defined-meaning-attributes", wfMsg_sc("DefinedMeaningAttributes"), "will-be-specified-below"); |
| 102 | + $t->objectAttributes = new Attribute("object-attributes", wfMsg_sc("Annotation"), "will-be-specified-below"); |
103 | 103 | $t->expressionId = new Attribute("expression-id", "Expression Id", "expression-id"); |
104 | | - $t->identicalMeaning = new Attribute("indentical-meaning", wfMsg("IdenticalMeaning"), "boolean"); |
| 104 | + $t->identicalMeaning = new Attribute("indentical-meaning", wfMsg_sc("IdenticalMeaning"), "boolean"); |
105 | 105 | |
106 | 106 | if ($viewInformation->filterOnLanguage()) |
107 | | - $t->expression = new Attribute("expression", wfMsg("Spelling"), "spelling"); |
| 107 | + $t->expression = new Attribute("expression", wfMsg_sc("Spelling"), "spelling"); |
108 | 108 | else { |
109 | 109 | $t->expressionStructure = new Structure("expression", $t->language, $t->spelling); |
110 | | - $t->expression = new Attribute(null, wfMsg("Expression"), $t->expressionStructure); |
| 110 | + $t->expression = new Attribute(null, wfMsg_sc("Expression"), $t->expressionStructure); |
111 | 111 | } |
112 | 112 | |
113 | 113 | $t->definedMeaningId = new Attribute("defined-meaning-id", "Defined meaning identifier", "defined-meaning-id"); |
— | — | @@ -126,68 +126,68 @@ |
127 | 127 | $t->definedMeaningLabel = new Attribute("defined-meaning-label", "Defined meaning label", "short-text"); |
128 | 128 | $t->definedMeaningReferenceStructure = new Structure("defined-meaning", $t->definedMeaningId, $t->definedMeaningLabel, $t->definedMeaningDefiningExpression); |
129 | 129 | $definedMeaningReferenceType = $t->definedMeaningReferenceStructure; |
130 | | - $t->definedMeaningReference = new Attribute(null, wfMsg("DefinedMeaningReference"), $definedMeaningReferenceType); |
| 130 | + $t->definedMeaningReference = new Attribute(null, wfMsg_sc("DefinedMeaningReference"), $definedMeaningReferenceType); |
131 | 131 | $t->collectionId = new Attribute("collection", "Collection", "collection-id"); |
132 | | - $t->collectionMeaning = new Attribute("collection-meaning", wfMsg("Collection"), $t->definedMeaningReferenceStructure); |
133 | | - $t->sourceIdentifier = new Attribute("source-identifier", wfMsg("SourceIdentifier"), "short-text"); |
| 132 | + $t->collectionMeaning = new Attribute("collection-meaning", wfMsg_sc("Collection"), $t->definedMeaningReferenceStructure); |
| 133 | + $t->sourceIdentifier = new Attribute("source-identifier", wfMsg_sc("SourceIdentifier"), "short-text"); |
134 | 134 | $t->gotoSourceStructure = new Structure("goto-source",$t->collectionId, $t->sourceIdentifier); |
135 | | - $t->gotoSource = new Attribute(null, wfMsg("GotoSource"), $t->gotoSourceStructure); |
| 135 | + $t->gotoSource = new Attribute(null, wfMsg_sc("GotoSource"), $t->gotoSourceStructure); |
136 | 136 | $t->collectionMembershipStructure = new Structure("collection-membership",$t->collectionId, $t->collectionMeaning, $t->sourceIdentifier); |
137 | | - $t->collectionMembership = new Attribute(null, wfMsg("CollectionMembership"), $t->collectionMembershipStructure); |
| 137 | + $t->collectionMembership = new Attribute(null, wfMsg_sc("CollectionMembership"), $t->collectionMembershipStructure); |
138 | 138 | $t->classMembershipId = new Attribute("class-membership-id", "Class membership id", "integer"); |
139 | 139 | $t->class = new Attribute("class", "Class", $t->definedMeaningReferenceStructure); |
140 | 140 | $t->classMembershipStructure = new Structure("class-membership", $t->classMembershipId, $t->class); |
141 | | - $t->classMembership = new Attribute(null, wfMsg("ClassMembership"), $t->classMembershipStructure); |
| 141 | + $t->classMembership = new Attribute(null, wfMsg_sc("ClassMembership"), $t->classMembershipStructure); |
142 | 142 | |
143 | 143 | global |
144 | 144 | $wgPossiblySynonymousAttributeId; |
145 | 145 | |
146 | 146 | $t->possiblySynonymousId = new Attribute("possibly-synonymous-id", "Possibly synonymous id", "integer"); |
147 | | - $t->possibleSynonym = new Attribute("possible-synonym", wfMsg("PossibleSynonym"), $t->definedMeaningReferenceStructure); |
| 147 | + $t->possibleSynonym = new Attribute("possible-synonym", wfMsg_sc("PossibleSynonym"), $t->definedMeaningReferenceStructure); |
148 | 148 | # Bug found ... This never worked before: (!) |
149 | 149 | #$t->possiblySynonymousStructure = new Structure("possibly-synonymous", $t->possiblySynonymousId, $t->possiblySynonymous); |
150 | 150 | $t->possiblySynonymousStructure = new Structure("possibly-synonymous", $t->possiblySynonymousId, $t->possibleSynonym); |
151 | | - $t->possiblySynonymous = new Attribute(null, wfMsg("PossiblySynonymous"), $t->possiblySynonymousStructure); |
| 151 | + $t->possiblySynonymous = new Attribute(null, wfMsg_sc("PossiblySynonymous"), $t->possiblySynonymousStructure); |
152 | 152 | |
153 | 153 | global |
154 | 154 | $relationTypeType; |
155 | 155 | |
156 | 156 | $t->relationId = new Attribute("relation-id", "Relation identifier", "object-id"); |
157 | | - $t->relationType = new Attribute("relation-type", wfMsg("RelationType"), $t->definedMeaningReferenceStructure); |
158 | | - $t->otherDefinedMeaning = new Attribute("other-defined-meaning", wfMsg("OtherDefinedMeaning"), $definedMeaningReferenceType); |
| 157 | + $t->relationType = new Attribute("relation-type", wfMsg_sc("RelationType"), $t->definedMeaningReferenceStructure); |
| 158 | + $t->otherDefinedMeaning = new Attribute("other-defined-meaning", wfMsg_sc("OtherDefinedMeaning"), $definedMeaningReferenceType); |
159 | 159 | |
160 | 160 | global |
161 | 161 | $wgRelationsAttributeId, $wgIncomingRelationsAttributeId ; |
162 | 162 | |
163 | 163 | $t->relationStructure = new Structure("relations", $t->relationId, $t->relationType, $t->otherDefinedMeaning, $t->objectAttributes); |
164 | | - $t->relations = new Attribute(null, wfMsg("Relations"), $t->relationStructure); |
165 | | - $t->reciprocalRelations = new Attribute("reciprocal-relations", wfMsg("IncomingRelations"), $t->relationStructure); |
| 164 | + $t->relations = new Attribute(null, wfMsg_sc("Relations"), $t->relationStructure); |
| 165 | + $t->reciprocalRelations = new Attribute("reciprocal-relations", wfMsg_sc("IncomingRelations"), $t->relationStructure); |
166 | 166 | $t->translatedTextId = new Attribute("translated-text-id", "Translated text ID", "integer"); |
167 | 167 | $t->translatedTextStructure = new Structure("translated-text", $t->language, $t->text); |
168 | 168 | |
169 | 169 | $t->definitionId = new Attribute("definition-id", "Definition identifier", "integer"); |
170 | 170 | |
171 | 171 | if ($viewInformation->filterOnLanguage() && !$viewInformation->hasMetaDataAttributes()) |
172 | | - $t->alternativeDefinition = new Attribute("alternative-definition", wfMsg("AlternativeDefinition"), "text"); |
| 172 | + $t->alternativeDefinition = new Attribute("alternative-definition", wfMsg_sc("AlternativeDefinition"), "text"); |
173 | 173 | else |
174 | | - $t->alternativeDefinition = new Attribute("alternative-definition", wfMsg("AlternativeDefinition"), $t->translatedTextStructure); |
| 174 | + $t->alternativeDefinition = new Attribute("alternative-definition", wfMsg_sc("AlternativeDefinition"), $t->translatedTextStructure); |
175 | 175 | |
176 | | - $t->source = new Attribute("source-id", wfMsg("Source"), $definedMeaningReferenceType); |
| 176 | + $t->source = new Attribute("source-id", wfMsg_sc("Source"), $definedMeaningReferenceType); |
177 | 177 | |
178 | 178 | global |
179 | 179 | $wgAlternativeDefinitionsAttributeId; |
180 | 180 | |
181 | 181 | $t->alternativeDefinitionsStructure = new Structure("alternative-definitions", $t->definitionId, $t->alternativeDefinition, $t->source); |
182 | 182 | |
183 | | - $t->alternativeDefinitions = new Attribute(null, wfMsg("AlternativeDefinitions"), $t->alternativeDefinitionsStructure); |
| 183 | + $t->alternativeDefinitions = new Attribute(null, wfMsg_sc("AlternativeDefinitions"), $t->alternativeDefinitionsStructure); |
184 | 184 | |
185 | 185 | global |
186 | 186 | $wgSynonymsAndTranslationsAttributeId; |
187 | 187 | |
188 | 188 | if ($viewInformation->filterOnLanguage()) |
189 | | - $synonymsAndTranslationsCaption = wfMsg("Synonyms"); |
| 189 | + $synonymsAndTranslationsCaption = wfMsg_sc("Synonyms"); |
190 | 190 | else |
191 | | - $synonymsAndTranslationsCaption = wfMsg("SynonymsAndTranslations"); |
| 191 | + $synonymsAndTranslationsCaption = wfMsg_sc("SynonymsAndTranslations"); |
192 | 192 | |
193 | 193 | $t->attributeObjectId = new Attribute("attributeObjectId", "Attribute object", "object-id"); |
194 | 194 | |
— | — | @@ -195,59 +195,59 @@ |
196 | 196 | $t->synonymsTranslationsStructure = new Structure("synonyms-translations", $t->syntransId, $t->expression, $t->identicalMeaning, $t->objectAttributes); |
197 | 197 | $t->synonymsAndTranslations = new Attribute(null, "$synonymsAndTranslationsCaption", $t->synonymsTranslationsStructure); |
198 | 198 | $t->translatedTextAttributeId = new Attribute("translated-text-attribute-id", "Attribute identifier", "object-id"); |
199 | | - $t->translatedTextAttribute = new Attribute("translated-text-attribute", wfMsg("TranslatedTextAttribute"), $definedMeaningReferenceType); |
| 199 | + $t->translatedTextAttribute = new Attribute("translated-text-attribute", wfMsg_sc("TranslatedTextAttribute"), $definedMeaningReferenceType); |
200 | 200 | $t->translatedTextValueId = new Attribute("translated-text-value-id", "Translated text value identifier", "translated-text-value-id"); |
201 | 201 | |
202 | 202 | if ($viewInformation->filterOnLanguage() && !$viewInformation->hasMetaDataAttributes()) |
203 | | - $t->translatedTextValue = new Attribute("translated-text-value", wfMsg("TranslatedTextAttributeValue"), "text"); |
| 203 | + $t->translatedTextValue = new Attribute("translated-text-value", wfMsg_sc("TranslatedTextAttributeValue"), "text"); |
204 | 204 | else |
205 | | - $t->translatedTextValue = new Attribute("translated-text", wfMsg("TranslatedTextAttributeValue"), $t->translatedTextStructure); |
| 205 | + $t->translatedTextValue = new Attribute("translated-text", wfMsg_sc("TranslatedTextAttributeValue"), $t->translatedTextStructure); |
206 | 206 | |
207 | 207 | $t->translatedTextAttributeValuesStructure = new Structure("translated-text-attribute-values",$t->translatedTextAttributeId, $t->attributeObjectId, $t->translatedTextAttribute, $t->translatedTextValueId, $t->translatedTextValue, $t->objectAttributes); |
208 | | - $t->translatedTextAttributeValues = new Attribute(null, wfMsg("TranslatedTextAttributeValues"), $t->translatedTextAttributeValuesStructure); |
| 208 | + $t->translatedTextAttributeValues = new Attribute(null, wfMsg_sc("TranslatedTextAttributeValues"), $t->translatedTextAttributeValuesStructure); |
209 | 209 | $t->attributeObject = new Attribute("attribute-object-id", "Attribute object", "object-id"); |
210 | 210 | $t->textAttributeId = new Attribute("text-attribute-id", "Attribute identifier", "object-id"); |
211 | 211 | $t->textAttributeObject = new Attribute("text-attribute-object-id", "Attribute object", "object-id"); |
212 | | - $t->textAttribute = new Attribute("text-attribute", wfMsg("TextAttribute"), $t->definedMeaningReferenceStructure); |
| 212 | + $t->textAttribute = new Attribute("text-attribute", wfMsg_sc("TextAttribute"), $t->definedMeaningReferenceStructure); |
213 | 213 | $t->textAttributeValuesStructure = new Structure("text-attribute-values", $t->textAttributeId, $t->textAttributeObject, $t->textAttribute, $t->text, $t->objectAttributes); |
214 | | - $t->textAttributeValues = new Attribute(null, wfMsg("TextAttributeValues"), $t->textAttributeValuesStructure); |
| 214 | + $t->textAttributeValues = new Attribute(null, wfMsg_sc("TextAttributeValues"), $t->textAttributeValuesStructure); |
215 | 215 | $t->linkLabel = new Attribute("label", "Label", "short-text"); |
216 | 216 | $t->linkURL = new Attribute("url", "URL", "url"); |
217 | 217 | $t->link = new Attribute("link", "Link", new Structure($t->linkLabel, $t->linkURL)); |
218 | 218 | |
219 | 219 | $t->linkAttributeId = new Attribute("link-attribute-id", "Attribute identifier", "object-id"); |
220 | 220 | $t->linkAttributeObject = new Attribute("link-attribute-object-id", "Attribute object", "object-id"); |
221 | | - $t->linkAttribute = new Attribute("link-attribute", wfMsg("LinkAttribute"), $t->definedMeaningReferenceStructure); |
| 221 | + $t->linkAttribute = new Attribute("link-attribute", wfMsg_sc("LinkAttribute"), $t->definedMeaningReferenceStructure); |
222 | 222 | $t->linkAttributeValuesStructure = new Structure("link-attribute-values", $t->linkAttributeId, $t->linkAttributeObject, $t->linkAttribute, $t->link, $t->objectAttributes); |
223 | | - $t->linkAttributeValues = new Attribute(null, wfMsg("LinkAttributeValues"), $t->linkAttributeValuesStructure); |
| 223 | + $t->linkAttributeValues = new Attribute(null, wfMsg_sc("LinkAttributeValues"), $t->linkAttributeValuesStructure); |
224 | 224 | $t->optionAttributeId = new Attribute('option-attribute-id', 'Attribute identifier', 'object-id'); |
225 | 225 | $t->optionAttributeObject = new Attribute('option-attribute-object-id', 'Attribute object', 'object-id'); |
226 | | - $t->optionAttribute = new Attribute('option-attribute', wfMsg("OptionAttribute"), $definedMeaningReferenceType); |
227 | | - $t->optionAttributeOption = new Attribute('option-attribute-option', wfMsg("OptionAttributeOption"), $definedMeaningReferenceType); |
| 226 | + $t->optionAttribute = new Attribute('option-attribute', wfMsg_sc("OptionAttribute"), $definedMeaningReferenceType); |
| 227 | + $t->optionAttributeOption = new Attribute('option-attribute-option', wfMsg_sc("OptionAttributeOption"), $definedMeaningReferenceType); |
228 | 228 | $t->optionAttributeValuesStructure = new Structure('option-attribute-values', $t->optionAttributeId, $t->optionAttribute, $t->optionAttributeObject, $t->optionAttributeOption, $t->objectAttributes); |
229 | | - $t->optionAttributeValues = new Attribute(null, wfMsg("OptionAttributeValues"), $t->optionAttributeValuesStructure); |
| 229 | + $t->optionAttributeValues = new Attribute(null, wfMsg_sc("OptionAttributeValues"), $t->optionAttributeValuesStructure); |
230 | 230 | $t->optionAttributeOptionId = new Attribute('option-attribute-option-id', 'Option identifier', 'object-id'); |
231 | 231 | $t->optionAttributeOptionsStructure = new Structure('option-attribute-options', $t->optionAttributeOptionId, $t->optionAttribute, $t->optionAttributeOption, $t->language); |
232 | | - $t->optionAttributeOptions = new Attribute(null, wfMsg("OptionAttributeOptions"), $t->optionAttributeOptionsStructure); |
| 232 | + $t->optionAttributeOptions = new Attribute(null, wfMsg_sc("OptionAttributeOptions"), $t->optionAttributeOptionsStructure); |
233 | 233 | |
234 | 234 | if ($viewInformation->filterOnLanguage() && !$viewInformation->hasMetaDataAttributes()) |
235 | | - $t->translatedText = new Attribute("translated-text", wfMsg("Text"), "text"); |
| 235 | + $t->translatedText = new Attribute("translated-text", wfMsg_sc("Text"), "text"); |
236 | 236 | else |
237 | | - $t->translatedText = new Attribute(null, wfMsg("TranslatedText"), $t->translatedTextStructure); |
| 237 | + $t->translatedText = new Attribute(null, wfMsg_sc("TranslatedText"), $t->translatedTextStructure); |
238 | 238 | |
239 | | - $t->definition = new Attribute(null, wfMsg("Definition"), new Structure("definition", $t->translatedText, $t->objectAttributes)); |
| 239 | + $t->definition = new Attribute(null, wfMsg_sc("Definition"), new Structure("definition", $t->translatedText, $t->objectAttributes)); |
240 | 240 | |
241 | 241 | global |
242 | 242 | $wgClassAttributesAttributeId; |
243 | 243 | |
244 | 244 | $t->classAttributeId = new Attribute("class-attribute-id", "Class attribute identifier", "object-id"); |
245 | | - $t->classAttributeAttribute = new Attribute("class-attribute-attribute", wfMsg("ClassAttributeAttribute"), $t->definedMeaningReferenceStructure); |
246 | | - $t->classAttributeLevel = new Attribute("class-attribute-level", wfMsg("ClassAttributeLevel"), $t->definedMeaningReferenceStructure); |
247 | | - $t->classAttributeType = new Attribute("class-attribute-type", wfMsg("ClassAttributeType"), "short-text"); |
| 245 | + $t->classAttributeAttribute = new Attribute("class-attribute-attribute", wfMsg_sc("ClassAttributeAttribute"), $t->definedMeaningReferenceStructure); |
| 246 | + $t->classAttributeLevel = new Attribute("class-attribute-level", wfMsg_sc("ClassAttributeLevel"), $t->definedMeaningReferenceStructure); |
| 247 | + $t->classAttributeType = new Attribute("class-attribute-type", wfMsg_sc("ClassAttributeType"), "short-text"); |
248 | 248 | $t->classAttributesStructure = new Structure("class-attributes", $t->classAttributeId, $t->classAttributeAttribute, $t->classAttributeLevel, $t->classAttributeType, $t->optionAttributeOptions); |
249 | | - $t->classAttributes = new Attribute(null, wfMsg("ClassAttributes"), $t->classAttributesStructure); |
| 249 | + $t->classAttributes = new Attribute(null, wfMsg_sc("ClassAttributes"), $t->classAttributesStructure); |
250 | 250 | |
251 | | - $t->definedMeaning = new Attribute(null, wfMsg("DefinedMeaning"), |
| 251 | + $t->definedMeaning = new Attribute(null, wfMsg_sc("DefinedMeaning"), |
252 | 252 | new Structure( |
253 | 253 | "defined-meaning", |
254 | 254 | $t->definition, |
— | — | @@ -262,13 +262,13 @@ |
263 | 263 | ); |
264 | 264 | |
265 | 265 | $t->expressionMeaningStructure = new Structure("expression-exact-meanings", $t->definedMeaningId, $t->text, $t->definedMeaning); |
266 | | - $t->expressionExactMeanings = new Attribute(null, wfMsg("ExactMeanings"), $t->expressionMeaningStructure); |
267 | | - $t->expressionApproximateMeanings = new Attribute("expression-approximate-meanings", wfMsg("ApproximateMeanings"), $t->expressionMeaningStructure); |
| 266 | + $t->expressionExactMeanings = new Attribute(null, wfMsg_sc("ExactMeanings"), $t->expressionMeaningStructure); |
| 267 | + $t->expressionApproximateMeanings = new Attribute("expression-approximate-meanings", wfMsg_sc("ApproximateMeanings"), $t->expressionMeaningStructure); |
268 | 268 | # bug found here also: $t->expressionAoproximateMeaning_S_ |
269 | 269 | $t->expressionMeaningsStructure = new Structure("expression-meanings", $t->expressionExactMeanings, $t->expressionApproximateMeanings); |
270 | | - $t->expressionMeanings = new Attribute(null, wfMsg("ExpressionMeanings"), $t->expressionMeaningsStructure); |
| 270 | + $t->expressionMeanings = new Attribute(null, wfMsg_sc("ExpressionMeanings"), $t->expressionMeaningsStructure); |
271 | 271 | $t->expressionsStructure = new Structure("expressions", $t->expressionId, $t->expression, $t->expressionMeanings); |
272 | | - $t->expressions = new Attribute(null, wfMsg("Expressions"), $t->expressionsStructure); |
| 272 | + $t->expressions = new Attribute(null, wfMsg_sc("Expressions"), $t->expressionsStructure); |
273 | 273 | $t->objectId = new Attribute("object-id", "Object identifier", "object-id"); |
274 | 274 | $t->objectAttributesStructure = new Structure("object-attributes", $t->objectId, $t->textAttributeValues, $t->translatedTextAttributeValues, $t->optionAttributeValues); |
275 | 275 | $t->objectAttributes->setAttributeType($t->objectAttributesStructure); |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php |
— | — | @@ -4,6 +4,7 @@ |
5 | 5 | |
6 | 6 | $wgExtensionFunctions[] = 'wfSpecialTransaction'; |
7 | 7 | require_once("Wikidata.php"); |
| 8 | +require_once("Utilities.php"); |
8 | 9 | |
9 | 10 | |
10 | 11 | function wfSpecialTransaction() { |
Index: trunk/extensions/Wikidata/OmegaWiki/Wikidata.php |
— | — | @@ -4,6 +4,7 @@ |
5 | 5 | require_once("Transaction.php"); |
6 | 6 | require_once("OmegaWikiAttributes.php"); |
7 | 7 | require_once("WikiDataAPI.php"); |
| 8 | +require_once("Utilities.php"); |
8 | 9 | |
9 | 10 | class DefaultWikidataApplication { |
10 | 11 | protected $showRecordLifeSpan; |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialConceptMapping.php |
— | — | @@ -26,6 +26,7 @@ |
27 | 27 | |
28 | 28 | require_once("Wikidata.php"); |
29 | 29 | require_once("WikiDataAPI.php"); |
| 30 | + require_once("Utilities.php"); |
30 | 31 | class SpecialConceptMapping extends SpecialPage { |
31 | 32 | |
32 | 33 | function SpecialConceptMapping() { |
Index: trunk/extensions/Wikidata/OmegaWiki/small/go.sh |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | #!/bin/sh |
3 | 3 | |
4 | | -svn revert *.php |
| 4 | +#svn revert *.php |
5 | 5 | for a in *.php; do small/autoreplace.sh $a; done; |
6 | 6 | cp done/* . |
7 | 7 | |
Index: trunk/extensions/Wikidata/App.php |
— | — | @@ -1,5 +1,9 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +global |
| 5 | + $wdSiteContext; |
| 6 | +$wdSiteContext="ow"; |
| 7 | + |
4 | 8 | $wgDefaultGoPrefix='Expression:'; |
5 | 9 | $wgHooks['BeforePageDisplay'][]='addWikidataHeader'; |
6 | 10 | $wgHooks['GetEditLinkTrail'][]='addWikidataEditLinkTrail'; |
— | — | @@ -21,7 +25,7 @@ |
22 | 26 | # It _must_ exist for the Wikidata application to be executed |
23 | 27 | # successfully. |
24 | 28 | $wdDefaultViewDataSet='uw'; |
25 | | -$wdShowCopyPanel=false; |
| 29 | +$wdShowCopyPanel=true; |
26 | 30 | |
27 | 31 | $wdGroupDefaultView=array(); |
28 | 32 | # Here you can set group defaults. |
— | — | @@ -117,56 +121,59 @@ |
118 | 122 | 'ow_concept_panel'=>'Concept Panel', |
119 | 123 | 'ow_dm_badtitle'=>'This page does not point to any DefinedMeaning (concept). Please check the web address.', |
120 | 124 | 'ow_dm_missing'=>'This page seems to point to a non-existent DefinedMeaning (concept). Please check the web address.', |
121 | | - |
122 | | - "Attribute" => "Property", |
123 | | - "AlternativeDefinition" => "Alternative definition", |
124 | | - "AlternativeDefinitions" => "Alternative definitions", |
125 | | - "Annotation" => "Annotation", |
126 | | - "ApproximateMeanings" => "Approximate meanings", |
127 | | - "ClassAttributeAttribute" => "Attribute", |
128 | | - "ClassAttributes" => "Class attributes", |
129 | | - "ClassAttributeLevel" => "Level", |
130 | | - "ClassAttributeType" => "Type", |
131 | | - "ClassMembership" => "Class membership", |
132 | | - "Collection" => "Collection", |
133 | | - "CollectionMembership" => "Collection membership", |
134 | | - "Definition" => "Definition", |
135 | | - "DefinedMeaningAttributes" => "Annotation", |
136 | | - "DefinedMeaning" => "Defined meaning", |
137 | | - "DefinedMeaningReference" => "Defined meaning", |
138 | | - "ExactMeanings" => "Exact meanings", |
139 | | - "Expression" => "Expression", |
140 | | - "ExpressionMeanings" => "Expression meanings", |
141 | | - "Expressions" => "Expressions", |
142 | | - "IdenticalMeaning" => "Identical meaning?", |
143 | | - "IncomingRelations" => "Incoming relations", |
144 | | - "GotoSource" => "Go to source", |
145 | | - "language" => "Language", |
146 | | - "LevelAnnotation" => "Annotation", |
147 | | - "OptionAttributeOption" => "Option", |
148 | | - "OptionAttributeOptions" => "Options", |
149 | | - "OptionAttributeValues" => "Option properties", |
150 | | - "OtherDefinedMeaning" => "Other defined meaning", |
151 | | - "PopupAnnotation" => "Annotation", |
152 | | - "PossibleSynonym" => "Possible synonym", |
153 | | - "PossiblySynonymous" => "Possibly synonymous", |
154 | | - "Relations" => "Relations", |
155 | | - "RelationType" => "Relation type", |
156 | | - "spelling" => "Spelling", |
157 | | - "Synonyms" => "Synonyms", |
158 | | - "SynonymsAndTranslations" => "Synonyms and translations", |
159 | | - "Source" => "Source", |
160 | | - "SourceIdentifier" => "Source identifier", |
161 | | - "text" => "Text", |
162 | | - "TextAttributeValues" => "String properties", |
163 | | - "TranslatedTextAttribute" => "Property", |
164 | | - "TranslatedText" => "Translated text", |
165 | | - "TranslatedTextAttributeValue" => "Text", |
166 | | - "TranslatedTextAttributeValues" => "Text properties", |
167 | | - "LinkAttributeValues" => "Links" |
| 125 | + "ow_AlternativeDefinition" => "Alternative definition", |
| 126 | + "ow_AlternativeDefinitions" => "Alternative definitions", |
| 127 | + "ow_Annotation" => "Annotation", |
| 128 | + "ow_ApproximateMeanings" => "Approximate meanings", |
| 129 | + "ow_ClassAttributeAttribute" => "Attribute", |
| 130 | + "ow_ClassAttributes" => "Class attributes", |
| 131 | + "ow_ClassAttributeLevel" => "Level", |
| 132 | + "ow_ClassAttributeType" => "Type", |
| 133 | + "ow_ClassMembership" => "Class membership", |
| 134 | + "ow_Collection" => "Collection", |
| 135 | + "ow_CollectionMembership" => "Collection membership", |
| 136 | + "ow_Definition" => "Definition", |
| 137 | + "ow_DefinedMeaningAttributes" => "Annotation", |
| 138 | + "ow_DefinedMeaning" => "Defined meaning", |
| 139 | + "ow_DefinedMeaningReference" => "Defined meaning", |
| 140 | + "ow_ExactMeanings" => "Exact meanings", |
| 141 | + "ow_Expression" => "Expression", |
| 142 | + "ow_ExpressionMeanings" => "Expression meanings", |
| 143 | + "ow_Expressions" => "Expressions", |
| 144 | + "ow_IdenticalMeaning" => "Identical meaning?", |
| 145 | + "ow_IncomingRelations" => "Incoming relations", |
| 146 | + "ow_GotoSource" => "Go to source", |
| 147 | + "ow_Language" => "Language", |
| 148 | + "ow_LevelAnnotation" => "Annotation", |
| 149 | + "ow_OptionAttribute" => "Property", |
| 150 | + "ow_OptionAttributeOption" => "Option", |
| 151 | + "ow_OptionAttributeOptions" => "Options", |
| 152 | + "ow_OptionAttributeValues" => "Option properties", |
| 153 | + "ow_OtherDefinedMeaning" => "Other defined meaning", |
| 154 | + "ow_PopupAnnotation" => "Annotation", |
| 155 | + "ow_PossibleSynonym" => "Possible synonym", |
| 156 | + "ow_PossiblySynonymous" => "Possibly synonymous", |
| 157 | + "ow_Relations" => "Relations", |
| 158 | + "ow_RelationType" => "Relation type", |
| 159 | + "ow_Spelling" => "Spelling", |
| 160 | + "ow_Synonyms" => "Synonyms", |
| 161 | + "ow_SynonymsAndTranslations" => "Synonyms and translations", |
| 162 | + "ow_Source" => "Source", |
| 163 | + "ow_SourceIdentifier" => "Source identifier", |
| 164 | + "ow_TextAttribute" => "Property", |
| 165 | + "ow_Text" => "Text", |
| 166 | + "ow_TextAttributeValues" => "String properties", |
| 167 | + "ow_TranslatedTextAttribute" => "Property", |
| 168 | + "ow_TranslatedText" => "Translated text", |
| 169 | + "ow_TranslatedTextAttributeValue" => "Text", |
| 170 | + "ow_TranslatedTextAttributeValues" => "Text properties", |
| 171 | + "ow_LinkAttribute" => "Property", |
| 172 | + "ow_LinkAttributeValues" => "Links" |
| 173 | + |
168 | 174 | ) |
169 | 175 | ); |
170 | 176 | |
| 177 | + |
171 | 178 | $datasets=wdGetDatasets(); |
172 | 179 | $datasetarray['']=wfMsgHtml('ow_none_selected'); |
173 | 180 | foreach($datasets as $datasetid=>$dataset) { |
— | — | @@ -180,6 +187,10 @@ |
181 | 188 | 'options'=>$datasetarray |
182 | 189 | ); |
183 | 190 | |
| 191 | + global |
| 192 | + $messageCacheOK; |
| 193 | + $messageCacheOK=True; |
| 194 | + |
184 | 195 | return true; |
185 | 196 | } |
186 | 197 | |