Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataGlobals.php |
— | — | @@ -6,21 +6,44 @@ |
7 | 7 | $wgAnnotationAttributeName, |
8 | 8 | $wgApproximateMeaningsAttributeName, |
9 | 9 | $wgAuthorityAttributeName, |
| 10 | + $wgClassAttributeAttributeAttributeName, |
| 11 | + $wgClassAttributesAttributeName, |
| 12 | + $wgClassAttributeLevelAttributeName, |
| 13 | + $wgClassAttributeTypeAttributeName, |
10 | 14 | $wgClassMembershipAttributeName, |
| 15 | + $wgCollectionAttributeName, |
| 16 | + $wgCollectionMembershipAttributeName, |
| 17 | + $wgDefinedMeaningAttributesAttributeName, |
| 18 | + $wgDefinedMeaningAttributeName, |
| 19 | + $wgDefinedMeaningReferenceAttributeName, |
11 | 20 | $wgDefinitionAttributeName, |
| 21 | + $wgLanguageAttributeName, |
12 | 22 | $wgExactMeaningsAttributeName, |
| 23 | + $wgExpressionAttributeName, |
| 24 | + $wgExpressionMeaningsAttributeName, |
| 25 | + $wgExpressionsAttributeName, |
| 26 | + $wgIdenticalMeaningAttributeName, |
13 | 27 | $wgIncomingRelationsAttributeName, |
14 | 28 | $wgLevelAnnotationAttributeName, |
15 | 29 | $wgOptionAttributeOptionAttributeName, |
| 30 | + $wgOptionAttributeOptionsAttributeName, |
16 | 31 | $wgOptionAttributeValuesAttributeName, |
17 | | - $wgOtherDefinedMeaningAttributeName, |
| 32 | + $wgOtherDefinedMeaningAttributeName, |
| 33 | + $wgPopupAnnotationName, |
| 34 | + $wgPossibleSynonymAttributeName, |
18 | 35 | $wgPossiblySynonymousAttributeName, |
19 | 36 | $wgRelationsAttributeName, |
20 | 37 | $wgRelationTypeAttributeName, |
21 | 38 | $wgSourceAttributeName, |
| 39 | + $wgSourceIdentifierAttributeName, |
| 40 | + $wgSpellingAttributeName, |
| 41 | + $wgSynonymsAttributeName, |
| 42 | + $wgSynonymsAndTranslationsAttributeName, |
22 | 43 | $wgTextAttributeAttributeName, |
| 44 | + $wgTextAttributeName, |
23 | 45 | $wgTextAttributeValuesAttributeName, |
24 | 46 | $wgTranslatedTextAttributeAttributeName, |
| 47 | + $wgTranslatedTextAttributeName, |
25 | 48 | $wgTranslatedTextAttributeValueAttributeName, |
26 | 49 | $wgTranslatedTextAttributeValuesAttributeName, |
27 | 50 | $wgUrlAttributeAttributeName, |
— | — | @@ -31,22 +54,45 @@ |
32 | 55 | $wgAnnotationAttributeName = "Annotation"; |
33 | 56 | $wgApproximateMeaningsAttributeName = "Approximate meanings"; |
34 | 57 | $wgAuthorityAttributeName = "Authority"; |
| 58 | +$wgClassAttributeAttributeAttributeName = "Attribute"; |
| 59 | +$wgClassAttributesAttributeName = "Class attributes"; |
| 60 | +$wgClassAttributeLevelAttributeName = "Level"; |
| 61 | +$wgClassAttributeTypeAttributeName = "Type"; |
35 | 62 | $wgClassMembershipAttributeName = "Class membership"; |
| 63 | +$wgCollectionAttributeName = "Collection"; |
| 64 | +$wgCollectionMembershipAttributeName = "Collection membership"; |
36 | 65 | $wgDefinitionAttributeName = "Definition"; |
| 66 | +$wgDefinedMeaningAttributesAttributeName = "Annotation"; |
| 67 | +$wgDefinedMeaningAttributeName = "Defined meaning"; |
| 68 | +$wgDefinedMeaningReferenceAttributeName = "Defined meaning"; |
37 | 69 | $wgExactMeaningsAttributeName = "Exact meanings"; |
| 70 | +$wgExpressionAttributeName = "Expression"; |
| 71 | +$wgExpressionMeaningsAttributeName = "Expression meanings"; |
| 72 | +$wgExpressionsAttributeName = "Expressions"; |
| 73 | +$wgIdenticalMeaningAttributeName = "Identical meaning?"; |
38 | 74 | $wgIncomingRelationsAttributeName = "Incoming relations"; |
| 75 | +$wgLanguageAttributeName = "Language"; |
39 | 76 | $wgLevelAnnotationAttributeName = "Annotation"; |
40 | 77 | $wgOptionAttributeAttributeName = "Property"; |
41 | 78 | $wgOptionAttributeOptionAttributeName = "Option"; |
| 79 | +$wgOptionAttributeOptionsAttributeName = "Options"; |
42 | 80 | $wgOptionAttributeValuesAttributeName = "Option properties"; |
43 | 81 | $wgOtherDefinedMeaningAttributeName = "Other defined meaning"; |
| 82 | +$wgPopupAnnotationName = "Annotation"; |
| 83 | +$wgPossibleSynonymAttributeName = "Possible synonym"; |
44 | 84 | $wgPossiblySynonymousAttributeName = "Possibly synonymous"; |
45 | 85 | $wgRelationsAttributeName = "Relations"; |
46 | | -$wgRelationTypeAttributeName = "Relation type"; |
47 | | -$wgTranslatedTextAttributeAttributeName = "Property"; |
| 86 | +$wgRelationTypeAttributeName = "Relation type"; |
| 87 | +$wgSpellingAttributeName = "Spelling"; |
| 88 | +$wgSynonymsAttributeName = "Synonyms"; |
| 89 | +$wgSynonymsAndTranslationsAttributeName = "Synonyms and translations"; |
48 | 90 | $wgSourceAttributeName = "Source"; |
| 91 | +$wgSourceIdentifierAttributeName = "Source identifier"; |
49 | 92 | $wgTextAttributeAttributeName = "Property"; |
| 93 | +$wgTextAttributeName = "Text"; |
50 | 94 | $wgTextAttributeValuesAttributeName = "String properties"; |
| 95 | +$wgTranslatedTextAttributeAttributeName = "Property"; |
| 96 | +$wgTranslatedTextAttributeName = "Translated text"; |
51 | 97 | $wgTranslatedTextAttributeValueAttributeName = "Text"; |
52 | 98 | $wgTranslatedTextAttributeValuesAttributeName = "Text properties"; |
53 | 99 | $wgUrlAttributeAttributeName = "Property"; |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -5,26 +5,34 @@ |
6 | 6 | |
7 | 7 | function initializeOmegaWikiAttributes($filterOnLanguage, $hasMetaDataAttributes) { |
8 | 8 | global |
9 | | - $languageAttribute, $spellingAttribute, $textAttribute; |
| 9 | + $languageAttribute, $spellingAttribute, $textAttribute, |
| 10 | + $wgLanguageAttributeName, $wgSpellingAttributeName, $wgTextAttributeName; |
10 | 11 | |
11 | | - $languageAttribute = new Attribute("language", "Language", "language"); |
12 | | - $spellingAttribute = new Attribute("spelling", "Spelling", "spelling"); |
13 | | - $textAttribute = new Attribute("text", "Text", "text"); |
| 12 | + $languageAttribute = new Attribute("language", $wgLanguageAttributeName, "language"); |
| 13 | + $spellingAttribute = new Attribute("spelling", $wgSpellingAttributeName, "spelling"); |
| 14 | + $textAttribute = new Attribute("text", $wgTextAttributeName, "text"); |
14 | 15 | |
15 | 16 | global |
16 | | - $expressionIdAttribute, $identicalMeaningAttribute; |
| 17 | + $objectAttributesAttribute, $definedMeaningAttributesAttribute, |
| 18 | + $wgDefinedMeaningAttributesAttributeName, $wgAnnotationAttributeName; |
17 | 19 | |
| 20 | + $definedMeaningAttributesAttribute = new Attribute("defined-meaning-attributes", $wgDefinedMeaningAttributesAttributeName, "will-be-specified-below"); |
| 21 | + $objectAttributesAttribute = new Attribute("object-attributes", $wgAnnotationAttributeName, "will-be-specified-below"); |
| 22 | + |
| 23 | + global |
| 24 | + $expressionIdAttribute, $identicalMeaningAttribute, $wgIdenticalMeaningAttributeName; |
| 25 | + |
18 | 26 | $expressionIdAttribute = new Attribute("expression-id", "Expression Id", "expression-id"); |
19 | | - $identicalMeaningAttribute = new Attribute("indentical-meaning", "Identical meaning?", "boolean"); |
| 27 | + $identicalMeaningAttribute = new Attribute("indentical-meaning", $wgIdenticalMeaningAttributeName, "boolean"); |
20 | 28 | |
21 | 29 | global |
22 | | - $expressionStructure, $expressionAttribute; |
| 30 | + $expressionStructure, $expressionAttribute, $wgExpressionAttributeName; |
23 | 31 | |
24 | 32 | if ($filterOnLanguage) |
25 | | - $expressionAttribute = new Attribute("expression", "Spelling", "spelling"); |
| 33 | + $expressionAttribute = new Attribute("expression", $wgSpellingAttributeName, "spelling"); |
26 | 34 | else { |
27 | 35 | $expressionStructure = new Structure($languageAttribute, $spellingAttribute); |
28 | | - $expressionAttribute = new Attribute("expression", "Expression", new RecordType($expressionStructure)); |
| 36 | + $expressionAttribute = new Attribute("expression", $wgExpressionAttributeName, new RecordType($expressionStructure)); |
29 | 37 | } |
30 | 38 | |
31 | 39 | global |
— | — | @@ -35,26 +43,27 @@ |
36 | 44 | |
37 | 45 | global |
38 | 46 | $definedMeaningReferenceStructure, $definedMeaningLabelAttribute, $definedMeaningReferenceKeyStructure, $definedMeaningReferenceType, |
39 | | - $definedMeaningReferenceAttribute; |
| 47 | + $definedMeaningReferenceAttribute, $wgDefinedMeaningReferenceAttributeName; |
40 | 48 | |
41 | 49 | $definedMeaningLabelAttribute = new Attribute("defined-meaning-label", "Defined meaning label", "short-text"); |
42 | 50 | $definedMeaningReferenceStructure = new Structure($definedMeaningIdAttribute, $definedMeaningLabelAttribute, $definedMeaningDefiningExpressionAttribute); |
43 | 51 | $definedMeaningReferenceKeyStructure = new Structure($definedMeaningIdAttribute); |
44 | 52 | $definedMeaningReferenceType = new RecordType($definedMeaningReferenceStructure); |
45 | | - $definedMeaningReferenceAttribute = new Attribute("defined-meaning", "Defined meaning", $definedMeaningReferenceType); |
| 53 | + $definedMeaningReferenceAttribute = new Attribute("defined-meaning", $wgDefinedMeaningReferenceAttributeName, $definedMeaningReferenceType); |
46 | 54 | |
47 | 55 | global |
48 | | - $collectionIdAttribute, $collectionMeaningType, $collectionMeaningAttribute, $sourceIdentifierAttribute; |
| 56 | + $collectionIdAttribute, $collectionMeaningType, $collectionMeaningAttribute, $sourceIdentifierAttribute, |
| 57 | + $wgCollectionAttributeName, $wgSourceIdentifierAttributeName; |
49 | 58 | |
50 | 59 | $collectionIdAttribute = new Attribute("collection", "Collection", "collection-id"); |
51 | 60 | $collectionMeaningType = new RecordType($definedMeaningReferenceStructure); |
52 | | - $collectionMeaningAttribute = new Attribute("collection-meaning", "Collection", $collectionMeaningType); |
53 | | - $sourceIdentifierAttribute = new Attribute("source-identifier", "Source identifier", "short-text"); |
| 61 | + $collectionMeaningAttribute = new Attribute("collection-meaning", $wgCollectionAttributeName, $collectionMeaningType); |
| 62 | + $sourceIdentifierAttribute = new Attribute("source-identifier", $wgSourceIdentifierAttributeName, "short-text"); |
54 | 63 | |
55 | 64 | global |
56 | | - $collectionMembershipAttribute; |
| 65 | + $collectionMembershipAttribute, $wgCollectionMembershipAttributeName; |
57 | 66 | |
58 | | - $collectionMembershipAttribute = new Attribute("collection-membership", "Collection membership", new RecordSetType(new Structure($collectionIdAttribute, $collectionMeaningAttribute, $sourceIdentifierAttribute))); |
| 67 | + $collectionMembershipAttribute = new Attribute("collection-membership", $wgCollectionMembershipAttributeName, new RecordSetType(new Structure($collectionIdAttribute, $collectionMeaningAttribute, $sourceIdentifierAttribute))); |
59 | 68 | |
60 | 69 | global |
61 | 70 | $classMembershipIdAttribute, $classAttribute; |
— | — | @@ -70,10 +79,10 @@ |
71 | 80 | $classMembershipAttribute = new Attribute("class-membership", $wgClassMembershipAttributeName, new RecordSetType($classMembershipStructure)); |
72 | 81 | |
73 | 82 | global |
74 | | - $possiblySynonymousIdAttribute, $possibleSynonymAttribute; |
| 83 | + $possiblySynonymousIdAttribute, $possibleSynonymAttribute, $wgPossibleSynonymAttributeName; |
75 | 84 | |
76 | 85 | $possiblySynonymousIdAttribute = new Attribute("possibly-synonymous-id", "Possibly synonymous id", "integer"); |
77 | | - $possibleSynonymAttribute = new Attribute("possible-synonym", "Possible synonym", new RecordType($definedMeaningReferenceStructure)); |
| 86 | + $possibleSynonymAttribute = new Attribute("possible-synonym", $wgPossibleSynonymAttributeName, new RecordType($definedMeaningReferenceStructure)); |
78 | 87 | |
79 | 88 | global |
80 | 89 | $possiblySynonymousStructure, $possiblySynonymousKeyStructure, $possiblySynonymousAttribute, |
— | — | @@ -126,12 +135,13 @@ |
127 | 136 | $alternativeDefinitionsAttribute = new Attribute("alternative-definitions", $wgAlternativeDefinitionsAttributeName, new RecordSetType(new Structure($definitionIdAttribute, $alternativeDefinitionAttribute, $sourceAttribute))); |
128 | 137 | |
129 | 138 | global |
130 | | - $synonymsAndTranslationsAttribute, $syntransIdAttribute; |
| 139 | + $synonymsAndTranslationsAttribute, $syntransIdAttribute, |
| 140 | + $wgSynonymsAttributeName, $wgSynonymsAndTranslationsAttributeName; |
131 | 141 | |
132 | 142 | if ($filterOnLanguage) |
133 | | - $synonymsAndTranslationsCaption = "Synonyms"; |
| 143 | + $synonymsAndTranslationsCaption = $wgSynonymsAttributeName; |
134 | 144 | else |
135 | | - $synonymsAndTranslationsCaption = "Synonyms and translations"; |
| 145 | + $synonymsAndTranslationsCaption = $wgSynonymsAndTranslationsAttributeName; |
136 | 146 | |
137 | 147 | $syntransIdAttribute = new Attribute("syntrans-id", "$synonymsAndTranslationsCaption identifier", "integer"); |
138 | 148 | $synonymsAndTranslationsAttribute = new Attribute("synonyms-translations", "$synonymsAndTranslationsCaption", new RecordSetType(new Structure($syntransIdAttribute, $expressionAttribute, $identicalMeaningAttribute, $objectAttributesAttribute))); |
— | — | @@ -185,23 +195,23 @@ |
186 | 196 | $optionAttributeValuesAttribute = new Attribute('option-attribute-values', $wgOptionAttributeValuesAttributeName, new RecordSetType($optionAttributeValuesStructure)); |
187 | 197 | |
188 | 198 | global |
189 | | - $optionAttributeOptionIdAttribute, $optionAttributeOptionsAttribute; |
| 199 | + $optionAttributeOptionIdAttribute, $optionAttributeOptionsAttribute, $wgOptionAttributeOptionsAttributeName; |
190 | 200 | |
191 | 201 | $optionAttributeOptionIdAttribute = new Attribute('option-attribute-option-id', 'Option identifier', 'object-id'); |
192 | 202 | $optionAttributeOptionsStructure = new Structure($optionAttributeOptionIdAttribute, $optionAttributeAttribute, $optionAttributeOptionAttribute, $languageAttribute); |
193 | | - $optionAttributeOptionsAttribute = new Attribute('option-attribute-options', 'Options', new RecordSetType($optionAttributeOptionsStructure)); |
| 203 | + $optionAttributeOptionsAttribute = new Attribute('option-attribute-options', $wgOptionAttributeOptionsAttributeName, new RecordSetType($optionAttributeOptionsStructure)); |
194 | 204 | |
195 | 205 | global |
196 | 206 | $definitionAttribute, $definedMeaningAttribute, $translatedTextAttribute, $classAttributesAttribute, |
197 | | - $wgDefinitionAttributeName; |
| 207 | + $wgDefinitionAttributeName, $wgDefinedMeaningAttributeName, $wgTranslatedTextAttributeName; |
198 | 208 | |
199 | 209 | if ($filterOnLanguage && !$hasMetaDataAttributes) |
200 | | - $translatedTextAttribute = new Attribute("translated-text", "Text", "text"); |
| 210 | + $translatedTextAttribute = new Attribute("translated-text", $wgTextAttributeName, "text"); |
201 | 211 | else |
202 | | - $translatedTextAttribute = new Attribute("translated-text", "Translated text", new RecordSetType($translatedTextStructure)); |
| 212 | + $translatedTextAttribute = new Attribute("translated-text", $wgTranslatedTextAttributeName, new RecordSetType($translatedTextStructure)); |
203 | 213 | |
204 | 214 | $definitionAttribute = new Attribute("definition", $wgDefinitionAttributeName, new RecordType(new Structure($translatedTextAttribute, $objectAttributesAttribute))); |
205 | | - $definedMeaningAttribute = new Attribute("defined-meaning", "Defined meaning", new RecordType(new Structure($definitionAttribute, $classAttributesAttribute, $alternativeDefinitionsAttribute, $synonymsAndTranslationsAttribute, $relationsAttribute, $classMembershipAttribute, $collectionMembershipAttribute, $objectAttributesAttribute))); |
| 215 | + $definedMeaningAttribute = new Attribute("defined-meaning", $wgDefinedMeaningAttributeName, new RecordType(new Structure($definitionAttribute, $classAttributesAttribute, $alternativeDefinitionsAttribute, $synonymsAndTranslationsAttribute, $relationsAttribute, $classMembershipAttribute, $collectionMembershipAttribute, $objectAttributesAttribute))); |
206 | 216 | |
207 | 217 | global |
208 | 218 | $expressionsAttribute, $expressionMeaningStructure, $expressionExactMeaningsAttribute, $expressionApproximateMeaningsAttribute, |
— | — | @@ -212,32 +222,35 @@ |
213 | 223 | $expressionApproximateMeaningsAttribute = new Attribute("expression-approximate-meanings", $wgApproximateMeaningsAttributeName, new RecordSetType($expressionMeaningStructure)); |
214 | 224 | |
215 | 225 | global |
216 | | - $expressionMeaningsAttribute, $expressionMeaningsStructure, $expressionApproximateMeaningAttribute; |
| 226 | + $expressionMeaningsAttribute, $expressionMeaningsStructure, $expressionApproximateMeaningAttribute, |
| 227 | + $wgExpressionMeaningsAttributeName, $wgExpressionsAttributeName; |
217 | 228 | |
218 | 229 | $expressionMeaningsStructure = new Structure($expressionExactMeaningsAttribute, $expressionApproximateMeaningAttribute); |
219 | | - $expressionMeaningsAttribute = new Attribute("expression-meanings", "Expression meanings", new RecordType($expressionMeaningsStructure)); |
| 230 | + $expressionMeaningsAttribute = new Attribute("expression-meanings", $wgExpressionMeaningsAttributeName, new RecordType($expressionMeaningsStructure)); |
220 | 231 | |
221 | | - $expressionsAttribute = new Attribute("expressions", "Expressions", new RecordSetType(new Structure($expressionIdAttribute, $expressionAttribute, $expressionMeaningsAttribute))); |
| 232 | + $expressionsAttribute = new Attribute("expressions", $wgExpressionsAttributeName, new RecordSetType(new Structure($expressionIdAttribute, $expressionAttribute, $expressionMeaningsAttribute))); |
222 | 233 | |
223 | 234 | global |
224 | 235 | $objectIdAttribute, $objectAttributesStructure, $wgAnnotationAttributeName; |
225 | 236 | |
226 | 237 | $objectIdAttribute = new Attribute("object-id", "Object identifier", "object-id"); |
227 | 238 | $objectAttributesStructure = new Structure($objectIdAttribute, $textAttributeValuesAttribute, $translatedTextAttributeValuesAttribute, $optionAttributeValuesAttribute); |
228 | | - $objectAttributesAttribute = new Attribute("object-attributes", $wgAnnotationAttributeName, new RecordType($objectAttributesStructure)); |
| 239 | + $objectAttributesAttribute->type = new RecordType($objectAttributesStructure); |
| 240 | + $definedMeaningAttributesAttribute->type = new RecordType($objectAttributesStructure); |
229 | 241 | |
230 | 242 | global |
231 | 243 | $classAttributesStructure, |
232 | 244 | // $classAttributeClassAttribute, |
233 | | - $classAttributeIdAttribute, $classAttributeAttributeAttribute, $classAttributeLevelAttribute, $classAttributeTypeAttribute; |
| 245 | + $classAttributeIdAttribute, $classAttributeAttributeAttribute, $classAttributeLevelAttribute, $classAttributeTypeAttribute, |
| 246 | + $wgClassAttributeAttributeAttributeName, $wgClassAttributeLevelAttributeName, |
| 247 | + $wgClassAttributeTypeAttributeName, $wgClassAttributesAttributeName; |
234 | 248 | |
235 | 249 | $classAttributeIdAttribute = new Attribute("class-attribute-id", "Class attribute identifier", "object-id"); |
236 | | - //$classAttributeClassAttribute = new Attribute("class-attribute-class", "Class", "defined-meaning-id"); |
237 | | - $classAttributeAttributeAttribute = new Attribute("class-attribute-attribute", "Attribute", new RecordType($definedMeaningReferenceStructure)); |
238 | | - $classAttributeLevelAttribute = new Attribute("class-attribute-level", "Level", new RecordType($definedMeaningReferenceStructure)); |
239 | | - $classAttributeTypeAttribute = new Attribute("class-attribute-type", "Type", "short-text"); |
| 250 | + $classAttributeAttributeAttribute = new Attribute("class-attribute-attribute", $wgClassAttributeAttributeAttributeName, new RecordType($definedMeaningReferenceStructure)); |
| 251 | + $classAttributeLevelAttribute = new Attribute("class-attribute-level", $wgClassAttributeLevelAttributeName, new RecordType($definedMeaningReferenceStructure)); |
| 252 | + $classAttributeTypeAttribute = new Attribute("class-attribute-type", $wgClassAttributeTypeAttributeName, "short-text"); |
240 | 253 | $classAttributesStructure = new Structure($classAttributeIdAttribute, $classAttributeAttributeAttribute, $classAttributeLevelAttribute, $classAttributeTypeAttribute, $optionAttributeOptionsAttribute); |
241 | | - $classAttributesAttribute = new Attribute("class-attributes", "Class attributes", new RecordSetType($classAttributesStructure)); |
| 254 | + $classAttributesAttribute = new Attribute("class-attributes", $wgClassAttributesAttributeName, new RecordSetType($classAttributesStructure)); |
242 | 255 | } |
243 | 256 | |
244 | 257 | ?> |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | function initializeObjectAttributeEditors($filterLanguageId, $showRecordLifeSpan, $showAuthority) { |
10 | 10 | global |
11 | | - $objectAttributesAttribute, |
| 11 | + $objectAttributesAttribute, $definedMeaningAttributesAttribute, |
12 | 12 | $definedMeaningObjectAttributesEditor, $definedMeaningIdAttribute, |
13 | 13 | $definitionObjectAttributesEditor, $definedMeaningIdAttribute, |
14 | 14 | $synonymsAndTranslationsObjectAttributesEditor, $syntransIdAttribute, |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | $relationMeaningName, $synTransMeaningName, |
23 | 23 | $annotationMeaningName; |
24 | 24 | |
25 | | - $definedMeaningObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5); |
| 25 | + $definedMeaningObjectAttributesEditor = new RecordUnorderedListEditor($definedMeaningAttributesAttribute, 5); |
26 | 26 | $definitionObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5); |
27 | 27 | $synonymsAndTranslationsObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5); |
28 | 28 | $possiblySynonymousObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5); |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | |
89 | 89 | function getDefinitionEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority) { |
90 | 90 | global |
91 | | - $definitionAttribute, $translatedTextAttribute, $definitionObjectAttributesEditor; |
| 91 | + $definitionAttribute, $translatedTextAttribute, $definitionObjectAttributesEditor, $wgPopupAnnotationName; |
92 | 92 | |
93 | 93 | if ($filterLanguageId == 0) |
94 | 94 | $controller = new DefinedMeaningDefinitionController(); |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | |
98 | 98 | $editor = new RecordDivListEditor($definitionAttribute); |
99 | 99 | $editor->addEditor(getTranslatedTextEditor($translatedTextAttribute, $controller, $filterLanguageId, $showRecordLifeSpan, $showAuthority)); |
100 | | - $editor->addEditor(new PopUpEditor($definitionObjectAttributesEditor, 'Annotation')); |
| 100 | + $editor->addEditor(new PopUpEditor($definitionObjectAttributesEditor, $wgPopupAnnotationName)); |
101 | 101 | |
102 | 102 | return $editor; |
103 | 103 | } |
— | — | @@ -178,12 +178,12 @@ |
179 | 179 | function getSynonymsAndTranslationsEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority) { |
180 | 180 | global |
181 | 181 | $synonymsAndTranslationsAttribute, $identicalMeaningAttribute, $expressionIdAttribute, |
182 | | - $expressionAttribute, $synonymsAndTranslationsObjectAttributesEditor; |
| 182 | + $expressionAttribute, $synonymsAndTranslationsObjectAttributesEditor, $wgPopupAnnotationName; |
183 | 183 | |
184 | 184 | $tableEditor = new RecordSetTableEditor($synonymsAndTranslationsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new SynonymTranslationController($filterLanguageId)); |
185 | 185 | $tableEditor->addEditor(getExpressionTableCellEditor($expressionAttribute, $filterLanguageId)); |
186 | 186 | $tableEditor->addEditor(new BooleanEditor($identicalMeaningAttribute, new SimplePermissionController(true), true, true)); |
187 | | - $tableEditor->addEditor(new PopUpEditor($synonymsAndTranslationsObjectAttributesEditor, 'Annotation')); |
| 187 | + $tableEditor->addEditor(new PopUpEditor($synonymsAndTranslationsObjectAttributesEditor, $wgPopupAnnotationName)); |
188 | 188 | |
189 | 189 | addTableMetadataEditors($tableEditor, $showRecordLifeSpan, $showAuthority); |
190 | 190 | |
— | — | @@ -193,12 +193,12 @@ |
194 | 194 | function getDefinedMeaningRelationsEditor($showRecordLifeSpan, $showAuthority) { |
195 | 195 | global |
196 | 196 | $relationsAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute, |
197 | | - $relationsObjectAttributesEditor; |
| 197 | + $relationsObjectAttributesEditor, $wgPopupAnnotationName; |
198 | 198 | |
199 | 199 | $editor = new RecordSetTableEditor($relationsAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, new DefinedMeaningRelationController()); |
200 | 200 | $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true)); |
201 | 201 | $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true)); |
202 | | - $editor->addEditor(new PopUpEditor($relationsObjectAttributesEditor, 'Annotation')); |
| 202 | + $editor->addEditor(new PopUpEditor($relationsObjectAttributesEditor, $wgPopupAnnotationName)); |
203 | 203 | |
204 | 204 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
205 | 205 | |
— | — | @@ -208,12 +208,12 @@ |
209 | 209 | function getDefinedMeaningReciprocalRelationsEditor($showRecordLifeSpan, $showAuthority) { |
210 | 210 | global |
211 | 211 | $reciprocalRelationsAttribute, $relationTypeAttribute, $otherDefinedMeaningAttribute, |
212 | | - $relationsObjectAttributesEditor; |
| 212 | + $relationsObjectAttributesEditor, $wgPopupAnnotationName; |
213 | 213 | |
214 | 214 | $editor = new RecordSetTableEditor($reciprocalRelationsAttribute, new SimplePermissionController(false), new ShowEditFieldChecker(true), new AllowAddController(false), false, false, null); |
215 | 215 | $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true)); |
216 | 216 | $editor->addEditor(new RelationTypeReferenceEditor($relationTypeAttribute, new SimplePermissionController(false), true)); |
217 | | - $editor->addEditor(new PopUpEditor($relationsObjectAttributesEditor, 'Annotation')); |
| 217 | + $editor->addEditor(new PopUpEditor($relationsObjectAttributesEditor, $wgPopupAnnotationName)); |
218 | 218 | |
219 | 219 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
220 | 220 | |
— | — | @@ -233,6 +233,9 @@ |
234 | 234 | } |
235 | 235 | |
236 | 236 | function getGroupedRelationTypeEditor($groupedRelationsAttribute, $groupedRelationIdAttribute, $otherDefinedMeaningAttribute, $relationTypeId, $showRecordLifeSpan, $showAuthority, $objectAttributesEditor) { |
| 237 | + global |
| 238 | + $wgPopupAnnotationName; |
| 239 | + |
237 | 240 | $editor = new RecordSetTableEditor( |
238 | 241 | $groupedRelationsAttribute, |
239 | 242 | new SimplePermissionController(true), |
— | — | @@ -246,7 +249,7 @@ |
247 | 250 | $editor->addEditor(new DefinedMeaningReferenceEditor($otherDefinedMeaningAttribute, new SimplePermissionController(false), true)); |
248 | 251 | |
249 | 252 | if ($objectAttributesEditor != null) |
250 | | - $editor->addEditor(new PopUpEditor($objectAttributesEditor, 'Annotation')); |
| 253 | + $editor->addEditor(new PopUpEditor($objectAttributesEditor, $wgPopupAnnotationName)); |
251 | 254 | |
252 | 255 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
253 | 256 | |
— | — | @@ -268,12 +271,13 @@ |
269 | 272 | |
270 | 273 | function getTextAttributeValuesEditor($showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) { |
271 | 274 | global |
272 | | - $textAttributeAttribute, $textAttribute, $textAttributeValuesAttribute, $textValueObjectAttributesEditor; |
| 275 | + $textAttributeAttribute, $textAttribute, $textAttributeValuesAttribute, $textValueObjectAttributesEditor, |
| 276 | + $wgPopupAnnotationName; |
273 | 277 | |
274 | 278 | $editor = new RecordSetTableEditor($textAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller); |
275 | 279 | $editor->addEditor(new TextAttributeEditor($textAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher)); |
276 | 280 | $editor->addEditor(new TextEditor($textAttribute, new SimplePermissionController(true), true)); |
277 | | - $editor->addEditor(new PopUpEditor($textValueObjectAttributesEditor, 'Annotation')); |
| 281 | + $editor->addEditor(new PopUpEditor($textValueObjectAttributesEditor, $wgPopupAnnotationName)); |
278 | 282 | |
279 | 283 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
280 | 284 | |
— | — | @@ -282,12 +286,13 @@ |
283 | 287 | |
284 | 288 | function getURLAttributeValuesEditor($showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) { |
285 | 289 | global |
286 | | - $urlAttributeAttribute, $urlAttribute, $urlAttributeValuesAttribute, $urlValueObjectAttributesEditor; |
| 290 | + $urlAttributeAttribute, $urlAttribute, $urlAttributeValuesAttribute, $urlValueObjectAttributesEditor, |
| 291 | + $wgPopupAnnotationName; |
287 | 292 | |
288 | 293 | $editor = new RecordSetTableEditor($urlAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller); |
289 | 294 | $editor->addEditor(new TextAttributeEditor($urlAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher)); |
290 | 295 | $editor->addEditor(new URLEditor($urlAttribute, new SimplePermissionController(true), true)); |
291 | | - $editor->addEditor(new PopUpEditor($urlValueObjectAttributesEditor, 'Annotation')); |
| 296 | + $editor->addEditor(new PopUpEditor($urlValueObjectAttributesEditor, $wgPopupAnnotationName)); |
292 | 297 | |
293 | 298 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
294 | 299 | |
— | — | @@ -296,7 +301,8 @@ |
297 | 302 | |
298 | 303 | function getTranslatedTextAttributeValuesEditor($filterLanguageId, $showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) { |
299 | 304 | global |
300 | | - $translatedTextAttributeAttribute, $translatedTextValueAttribute, $translatedTextAttributeValuesAttribute, $translatedTextValueObjectAttributesEditor; |
| 305 | + $translatedTextAttributeAttribute, $translatedTextValueAttribute, $translatedTextAttributeValuesAttribute, |
| 306 | + $translatedTextValueObjectAttributesEditor, $wgPopupAnnotationName; |
301 | 307 | |
302 | 308 | if ($filterLanguageId == 0) |
303 | 309 | $translatedTextAttributeValueController = new TranslatedTextAttributeValueController(); |
— | — | @@ -306,7 +312,7 @@ |
307 | 313 | $editor = new RecordSetTableEditor($translatedTextAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller); |
308 | 314 | $editor->addEditor(new TranslatedTextAttributeEditor($translatedTextAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher)); |
309 | 315 | $editor->addEditor(getTranslatedTextEditor($translatedTextValueAttribute, $translatedTextAttributeValueController, $filterLanguageId, $showRecordLifeSpan, $showAuthority)); |
310 | | - $editor->addEditor(new PopUpEditor($translatedTextValueObjectAttributesEditor, 'Annotation')); |
| 316 | + $editor->addEditor(new PopUpEditor($translatedTextValueObjectAttributesEditor, $wgPopupAnnotationName)); |
311 | 317 | |
312 | 318 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
313 | 319 | |
— | — | @@ -315,13 +321,14 @@ |
316 | 322 | |
317 | 323 | function getOptionAttributeValuesEditor($showRecordLifeSpan, $showAuthority, $controller, $levelDefinedMeaningName, $objectIdFetcher) { |
318 | 324 | global |
319 | | - $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeValuesAttribute, $optionValueObjectAttributesEditor; |
| 325 | + $optionAttributeAttribute, $optionAttributeOptionAttribute, $optionAttributeValuesAttribute, |
| 326 | + $optionValueObjectAttributesEditor, $wgPopupAnnotationName; |
320 | 327 | |
321 | 328 | $editor = new RecordSetTableEditor($optionAttributeValuesAttribute, new SimplePermissionController(true), new ShowEditFieldChecker(true), new AllowAddController(true), true, false, $controller); |
322 | 329 | |
323 | 330 | $editor->addEditor(new OptionAttributeEditor($optionAttributeAttribute, new SimplePermissionController(false), true, $levelDefinedMeaningName, $objectIdFetcher)); |
324 | 331 | $editor->addEditor(new OptionSelectEditor($optionAttributeOptionAttribute, new SimplePermissionController(false), true)); |
325 | | - $editor->addEditor(new PopUpEditor($optionValueObjectAttributesEditor, 'Annotation')); |
| 332 | + $editor->addEditor(new PopUpEditor($optionValueObjectAttributesEditor, $wgPopupAnnotationName)); |
326 | 333 | |
327 | 334 | addTableMetadataEditors($editor, $showRecordLifeSpan, $showAuthority); |
328 | 335 | |
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiRecordSets.php |
— | — | @@ -427,7 +427,7 @@ |
428 | 428 | $definedMeaningAttribute, $definitionAttribute, $classAttributesAttribute, |
429 | 429 | $alternativeDefinitionsAttribute, $synonymsAndTranslationsAttribute, |
430 | 430 | $relationsAttribute, $reciprocalRelationsAttribute, |
431 | | - $classMembershipAttribute, $collectionMembershipAttribute, $objectAttributesAttribute, |
| 431 | + $classMembershipAttribute, $collectionMembershipAttribute, $definedMeaningAttributesAttribute, |
432 | 432 | $possiblySynonymousAttribute; |
433 | 433 | |
434 | 434 | $record = new ArrayRecord($definedMeaningAttribute->type->getStructure()); |
— | — | @@ -447,7 +447,7 @@ |
448 | 448 | $record->setAttributeValue($reciprocalRelationsAttribute, getDefinedMeaningReciprocalRelationsRecordSet($definedMeaningId, $filterLanguageId, $queryTransactionInformation)); |
449 | 449 | $record->setAttributeValue($classMembershipAttribute, getDefinedMeaningClassMembershipRecordSet($definedMeaningId, $queryTransactionInformation)); |
450 | 450 | $record->setAttributeValue($collectionMembershipAttribute, getDefinedMeaningCollectionMembershipRecordSet($definedMeaningId, $queryTransactionInformation)); |
451 | | - $record->setAttributeValue($objectAttributesAttribute, getObjectAttributesRecord($definedMeaningId, $filterLanguageId, $queryTransactionInformation)); |
| 451 | + $record->setAttributeValue($definedMeaningAttributesAttribute, getObjectAttributesRecord($definedMeaningId, $filterLanguageId, $queryTransactionInformation)); |
452 | 452 | |
453 | 453 | return $record; |
454 | 454 | } |