r25142 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25141‎ | r25142 | r25143 >
Date:20:18, 25 August 2007
Author:kim
Status:old
Tags:
Comment:
Replace everything with sitecontext. (.5 KLOC on one day,
the true hackers would not be impressed... but still O:-) )
Modified paths:
  • /trunk/extensions/Wikidata/App.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialConceptMapping.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Utilities.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Wikidata.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/small/go.sh (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php
@@ -188,7 +188,7 @@
189189 $active=true; # wrong place, but hey
190190 $dmId=$this->getDefinedMeaningId();
191191 $dc=wdGetDataSetContext();
192 - $ow_conceptpanel=wfMsg("ow_concept_panel");
 192+ $ow_conceptpanel=wfMsg_sc("concept_panel");
193193
194194 $html="<div class=\"dataset-panel\">";;
195195 $html.="<table border=\"0\"><tr><th class=\"dataset-panel-heading\">$ow_conceptpanel</th></tr>";
@@ -211,7 +211,7 @@
212212 }
213213 $cmtitle=Title::newFromText("Special:ConceptMapping");
214214 $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");
216216 $html.="<tr><td>$cmlink</td></tr>\n";
217217 if($wdShowCopyPanel) {
218218 $html.="<tr><td>".$this->getCopyPanel()."<td><tr>";
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php
@@ -2,6 +2,7 @@
33 if (!defined('MEDIAWIKI')) die();
44
55 require_once("WikiDataAPI.php"); // for bootstrapCollection
 6+ require_once("Utilities.php");
67
78 $wgAvailableRights[] = 'addcollection';
89 $wgGroupPermissions['bureaucrat']['addcollection'] = true;
Index: trunk/extensions/Wikidata/OmegaWiki/Utilities.php
@@ -15,8 +15,8 @@
1616 $args=func_get_args();
1717 array_shift($args);
1818 global
19 - $SiteContext;
20 - return wfMsgReal("${SiteContext}_${message}", $args, true);
 19+ $wdSiteContext;
 20+ return wfMsgReal("${wdSiteContext}_${message}", $args, true);
2121 }
2222
2323
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php
@@ -3,6 +3,7 @@
44 require_once("Attribute.php");
55 require_once("WikiDataGlobals.php");
66 require_once("ViewInformation.php");
 7+require_once("Utilities.php");
78
89 /**
910 *
@@ -69,7 +70,6 @@
7071
7172 if (!is_null($viewInformation)) {
7273 global $messageCacheOK;
73 - var_dump($messageCacheOK);
7474 if (!$messageCacheOK) {
7575 #We're not ready to do this yet!
7676 return False; #so we get out, but with viewinfo cached
@@ -94,19 +94,19 @@
9595 $t=$this; #<-keep things short to declutter
9696
9797 $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");
103103 $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");
105105
106106 if ($viewInformation->filterOnLanguage())
107 - $t->expression = new Attribute("expression", wfMsg("Spelling"), "spelling");
 107+ $t->expression = new Attribute("expression", wfMsg_sc("Spelling"), "spelling");
108108 else {
109109 $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);
111111 }
112112
113113 $t->definedMeaningId = new Attribute("defined-meaning-id", "Defined meaning identifier", "defined-meaning-id");
@@ -126,68 +126,68 @@
127127 $t->definedMeaningLabel = new Attribute("defined-meaning-label", "Defined meaning label", "short-text");
128128 $t->definedMeaningReferenceStructure = new Structure("defined-meaning", $t->definedMeaningId, $t->definedMeaningLabel, $t->definedMeaningDefiningExpression);
129129 $definedMeaningReferenceType = $t->definedMeaningReferenceStructure;
130 - $t->definedMeaningReference = new Attribute(null, wfMsg("DefinedMeaningReference"), $definedMeaningReferenceType);
 130+ $t->definedMeaningReference = new Attribute(null, wfMsg_sc("DefinedMeaningReference"), $definedMeaningReferenceType);
131131 $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");
134134 $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);
136136 $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);
138138 $t->classMembershipId = new Attribute("class-membership-id", "Class membership id", "integer");
139139 $t->class = new Attribute("class", "Class", $t->definedMeaningReferenceStructure);
140140 $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);
142142
143143 global
144144 $wgPossiblySynonymousAttributeId;
145145
146146 $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);
148148 # Bug found ... This never worked before: (!)
149149 #$t->possiblySynonymousStructure = new Structure("possibly-synonymous", $t->possiblySynonymousId, $t->possiblySynonymous);
150150 $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);
152152
153153 global
154154 $relationTypeType;
155155
156156 $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);
159159
160160 global
161161 $wgRelationsAttributeId, $wgIncomingRelationsAttributeId ;
162162
163163 $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);
166166 $t->translatedTextId = new Attribute("translated-text-id", "Translated text ID", "integer");
167167 $t->translatedTextStructure = new Structure("translated-text", $t->language, $t->text);
168168
169169 $t->definitionId = new Attribute("definition-id", "Definition identifier", "integer");
170170
171171 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");
173173 else
174 - $t->alternativeDefinition = new Attribute("alternative-definition", wfMsg("AlternativeDefinition"), $t->translatedTextStructure);
 174+ $t->alternativeDefinition = new Attribute("alternative-definition", wfMsg_sc("AlternativeDefinition"), $t->translatedTextStructure);
175175
176 - $t->source = new Attribute("source-id", wfMsg("Source"), $definedMeaningReferenceType);
 176+ $t->source = new Attribute("source-id", wfMsg_sc("Source"), $definedMeaningReferenceType);
177177
178178 global
179179 $wgAlternativeDefinitionsAttributeId;
180180
181181 $t->alternativeDefinitionsStructure = new Structure("alternative-definitions", $t->definitionId, $t->alternativeDefinition, $t->source);
182182
183 - $t->alternativeDefinitions = new Attribute(null, wfMsg("AlternativeDefinitions"), $t->alternativeDefinitionsStructure);
 183+ $t->alternativeDefinitions = new Attribute(null, wfMsg_sc("AlternativeDefinitions"), $t->alternativeDefinitionsStructure);
184184
185185 global
186186 $wgSynonymsAndTranslationsAttributeId;
187187
188188 if ($viewInformation->filterOnLanguage())
189 - $synonymsAndTranslationsCaption = wfMsg("Synonyms");
 189+ $synonymsAndTranslationsCaption = wfMsg_sc("Synonyms");
190190 else
191 - $synonymsAndTranslationsCaption = wfMsg("SynonymsAndTranslations");
 191+ $synonymsAndTranslationsCaption = wfMsg_sc("SynonymsAndTranslations");
192192
193193 $t->attributeObjectId = new Attribute("attributeObjectId", "Attribute object", "object-id");
194194
@@ -195,59 +195,59 @@
196196 $t->synonymsTranslationsStructure = new Structure("synonyms-translations", $t->syntransId, $t->expression, $t->identicalMeaning, $t->objectAttributes);
197197 $t->synonymsAndTranslations = new Attribute(null, "$synonymsAndTranslationsCaption", $t->synonymsTranslationsStructure);
198198 $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);
200200 $t->translatedTextValueId = new Attribute("translated-text-value-id", "Translated text value identifier", "translated-text-value-id");
201201
202202 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");
204204 else
205 - $t->translatedTextValue = new Attribute("translated-text", wfMsg("TranslatedTextAttributeValue"), $t->translatedTextStructure);
 205+ $t->translatedTextValue = new Attribute("translated-text", wfMsg_sc("TranslatedTextAttributeValue"), $t->translatedTextStructure);
206206
207207 $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);
209209 $t->attributeObject = new Attribute("attribute-object-id", "Attribute object", "object-id");
210210 $t->textAttributeId = new Attribute("text-attribute-id", "Attribute identifier", "object-id");
211211 $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);
213213 $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);
215215 $t->linkLabel = new Attribute("label", "Label", "short-text");
216216 $t->linkURL = new Attribute("url", "URL", "url");
217217 $t->link = new Attribute("link", "Link", new Structure($t->linkLabel, $t->linkURL));
218218
219219 $t->linkAttributeId = new Attribute("link-attribute-id", "Attribute identifier", "object-id");
220220 $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);
222222 $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);
224224 $t->optionAttributeId = new Attribute('option-attribute-id', 'Attribute identifier', 'object-id');
225225 $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);
228228 $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);
230230 $t->optionAttributeOptionId = new Attribute('option-attribute-option-id', 'Option identifier', 'object-id');
231231 $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);
233233
234234 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");
236236 else
237 - $t->translatedText = new Attribute(null, wfMsg("TranslatedText"), $t->translatedTextStructure);
 237+ $t->translatedText = new Attribute(null, wfMsg_sc("TranslatedText"), $t->translatedTextStructure);
238238
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));
240240
241241 global
242242 $wgClassAttributesAttributeId;
243243
244244 $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");
248248 $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);
250250
251 - $t->definedMeaning = new Attribute(null, wfMsg("DefinedMeaning"),
 251+ $t->definedMeaning = new Attribute(null, wfMsg_sc("DefinedMeaning"),
252252 new Structure(
253253 "defined-meaning",
254254 $t->definition,
@@ -262,13 +262,13 @@
263263 );
264264
265265 $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);
268268 # bug found here also: $t->expressionAoproximateMeaning_S_
269269 $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);
271271 $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);
273273 $t->objectId = new Attribute("object-id", "Object identifier", "object-id");
274274 $t->objectAttributesStructure = new Structure("object-attributes", $t->objectId, $t->textAttributeValues, $t->translatedTextAttributeValues, $t->optionAttributeValues);
275275 $t->objectAttributes->setAttributeType($t->objectAttributesStructure);
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php
@@ -4,6 +4,7 @@
55
66 $wgExtensionFunctions[] = 'wfSpecialTransaction';
77 require_once("Wikidata.php");
 8+require_once("Utilities.php");
89
910
1011 function wfSpecialTransaction() {
Index: trunk/extensions/Wikidata/OmegaWiki/Wikidata.php
@@ -4,6 +4,7 @@
55 require_once("Transaction.php");
66 require_once("OmegaWikiAttributes.php");
77 require_once("WikiDataAPI.php");
 8+require_once("Utilities.php");
89
910 class DefaultWikidataApplication {
1011 protected $showRecordLifeSpan;
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialConceptMapping.php
@@ -26,6 +26,7 @@
2727
2828 require_once("Wikidata.php");
2929 require_once("WikiDataAPI.php");
 30+ require_once("Utilities.php");
3031 class SpecialConceptMapping extends SpecialPage {
3132
3233 function SpecialConceptMapping() {
Index: trunk/extensions/Wikidata/OmegaWiki/small/go.sh
@@ -1,6 +1,6 @@
22 #!/bin/sh
33
4 -svn revert *.php
 4+#svn revert *.php
55 for a in *.php; do small/autoreplace.sh $a; done;
66 cp done/* .
77
Index: trunk/extensions/Wikidata/App.php
@@ -1,5 +1,9 @@
22 <?php
33
 4+global
 5+ $wdSiteContext;
 6+$wdSiteContext="ow";
 7+
48 $wgDefaultGoPrefix='Expression:';
59 $wgHooks['BeforePageDisplay'][]='addWikidataHeader';
610 $wgHooks['GetEditLinkTrail'][]='addWikidataEditLinkTrail';
@@ -21,7 +25,7 @@
2226 # It _must_ exist for the Wikidata application to be executed
2327 # successfully.
2428 $wdDefaultViewDataSet='uw';
25 -$wdShowCopyPanel=false;
 29+$wdShowCopyPanel=true;
2630
2731 $wdGroupDefaultView=array();
2832 # Here you can set group defaults.
@@ -117,56 +121,59 @@
118122 'ow_concept_panel'=>'Concept Panel',
119123 'ow_dm_badtitle'=>'This page does not point to any DefinedMeaning (concept). Please check the web address.',
120124 '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+
168174 )
169175 );
170176
 177+
171178 $datasets=wdGetDatasets();
172179 $datasetarray['']=wfMsgHtml('ow_none_selected');
173180 foreach($datasets as $datasetid=>$dataset) {
@@ -180,6 +187,10 @@
181188 'options'=>$datasetarray
182189 );
183190
 191+ global
 192+ $messageCacheOK;
 193+ $messageCacheOK=True;
 194+
184195 return true;
185196 }
186197

Status & tagging log