Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php |
— | — | @@ -58,8 +58,7 @@ |
59 | 59 | include_once($smwgIP . '/includes/SMW_DataValueFactory.php'); |
60 | 60 | // See if this attribute is a special one like e.g. "Has unit" |
61 | 61 | $propertyname = smwfNormalTitleText($propertyname); //slightly normalize label |
62 | | - $specprops = $smwgContLang->getSpecialPropertiesArray(); |
63 | | - $special = array_search($propertyname, $specprops); |
| 62 | + $special = $smwgContLang->findSpecialPropertyID($propertyname); |
64 | 63 | |
65 | 64 | switch ($special) { |
66 | 65 | case false: // normal attribute |
— | — | @@ -292,11 +291,10 @@ |
293 | 292 | } |
294 | 293 | |
295 | 294 | global $smwgContLang, $wgContLang; |
296 | | - $specprops = $smwgContLang->getSpecialPropertiesArray(); |
297 | 295 | foreach(SMWFactbox::$semdata->getSpecialProperties() as $specialProperty) { |
298 | 296 | $valueArray = SMWFactbox::$semdata->getSpecialValues($specialProperty); |
299 | | - if (array_key_exists($specialProperty,$specprops)) { // only print specprops with an official name |
300 | | - $specialPropertyName = $specprops[$specialProperty]; |
| 297 | + $specialPropertyName = $smwgContLang->findSpecialPropertyLabel($specialProperty); |
| 298 | + if ($specialPropertyName !== false) { // only print specprops with an official name |
301 | 299 | foreach ($valueArray as $value) { |
302 | 300 | // if ($value instanceof SMWDataValue) { |
303 | 301 | // $vt = $value->getLongWikiText(true); |
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php |
— | — | @@ -26,9 +26,7 @@ |
27 | 27 | protected function initParameters() { |
28 | 28 | global $smwgContLang, $smwgPropertyPagingLimit; |
29 | 29 | $this->limit = $smwgPropertyPagingLimit; |
30 | | - // TODO: Code shared with SMW_Factbox, should be a utility checkSpecialProperty function? |
31 | | - $srels = $smwgContLang->getSpecialPropertiesArray(); |
32 | | - $this->special_prop = array_search($this->mTitle->getText(), $srels); |
| 30 | + $this->special_prop = $smwgContLang->findSpecialPropertyID($this->mTitle->getText(), false); |
33 | 31 | return true; |
34 | 32 | } |
35 | 33 | |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Language.php |
— | — | @@ -9,11 +9,12 @@ |
10 | 10 | abstract class SMW_Language { |
11 | 11 | |
12 | 12 | // the message arrays ... |
13 | | - protected $smwContentMessages; |
14 | | - protected $smwUserMessages; |
15 | | - protected $smwSpecialProperties; |
| 13 | + protected $m_ContentMessages; |
| 14 | + protected $m_UserMessages; |
16 | 15 | protected $m_DatatypeLabels; |
17 | 16 | protected $m_DatatypeAliases = array(); |
| 17 | + protected $m_SpecialProperties; |
| 18 | + protected $m_SpecialPropertyAliases = array(); |
18 | 19 | protected $m_Namespaces; |
19 | 20 | protected $m_NamespaceAliases = array(); |
20 | 21 | |
— | — | @@ -51,25 +52,62 @@ |
52 | 53 | } |
53 | 54 | |
54 | 55 | /** |
55 | | - * Function that returns the labels for the special relations and attributes. |
| 56 | + * Function that returns the labels for the special properties. |
56 | 57 | */ |
57 | 58 | function getSpecialPropertiesArray() { |
58 | | - return $this->smwSpecialProperties; |
| 59 | + return $this->m_SpecialProperties; |
59 | 60 | } |
60 | 61 | |
61 | 62 | /** |
| 63 | + * Aliases for special properties, if any. |
| 64 | + */ |
| 65 | + function getSpecialPropertyAliases() { |
| 66 | + return $this->m_SpecialPropertyAliases; |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Find and return the id for the special property of the given local label. |
| 71 | + * If the label does not belong to a special property, return false. |
| 72 | + * The given label should be slightly normalised, i.e. as returned by Title |
| 73 | + * or smwfNormalTitleText(). |
| 74 | + */ |
| 75 | + function findSpecialPropertyID($label, $useAlias = true) { |
| 76 | + $id = array_search($label, $this->m_SpecialProperties); |
| 77 | + if ($id !== false) { |
| 78 | + return $id; |
| 79 | + } elseif ( ($useAlias) && (array_key_exists($label, $this->m_SpecialPropertyAliases)) ) { |
| 80 | + return $this->m_SpecialPropertyAliases[$label]; |
| 81 | + } else { |
| 82 | + return false; |
| 83 | + } |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * Get the translated user label for a given internal special property ID. |
| 88 | + * Returns false for properties without a translation (these are usually the |
| 89 | + * internal ones generated by SMW but not shown to the user). |
| 90 | + */ |
| 91 | + public function findSpecialPropertyLabel($id) { |
| 92 | + if (array_key_exists($id, $this->m_SpecialProperties)) { |
| 93 | + return $this->m_SpecialProperties[$id]; |
| 94 | + } else { // language bug, incomplete translation |
| 95 | + return false; |
| 96 | + } |
| 97 | + } |
| 98 | + |
| 99 | + /** |
62 | 100 | * Extends the array of special properties with a mapping from an $id to a |
63 | 101 | * language dependent label. |
64 | 102 | * NOTE: this function is provided for ad hoc compatibility with the Halo project. |
65 | 103 | * A better solution will replace it at some time. |
66 | 104 | */ |
67 | 105 | function addSpecialProperty($id, $label) { |
68 | | - if (array_key_exists($id, $this->smwSpecialProperties)) { |
69 | | - trigger_error('The ID "' . $id . '" already belongs to the special property "' . $this->smwSpecialProperties[$key] . '" and thus cannot be used for "' . $label . '".', E_USER_WARNING); |
| 106 | + if (array_key_exists($id, $this->m_SpecialProperties)) { |
| 107 | + trigger_error('The ID "' . $id . '" already belongs to the special property "' . $this->m_SpecialProperties[$key] . '" and thus cannot be used for "' . $label . '".', E_USER_WARNING); |
70 | 108 | } elseif ($id < 1000) { |
71 | 109 | trigger_error('IDs below 1000 are not allowed for custom special properties. Registration of "' . $label . '" failed.', E_USER_WARNING); |
72 | 110 | } else { |
73 | | - $this->smwSpecialProperties[$id] = $label; |
| 111 | + $this->m_SpecialProperties[$id] = $label; |
74 | 112 | } |
75 | 113 | } |
76 | 114 | |
— | — | @@ -78,7 +116,7 @@ |
79 | 117 | * in some article, and can thus not be translated to individual users). |
80 | 118 | */ |
81 | 119 | function getContentMsgArray() { |
82 | | - return $this->smwContentMessages; |
| 120 | + return $this->m_ContentMessages; |
83 | 121 | } |
84 | 122 | |
85 | 123 | /** |
— | — | @@ -86,7 +124,7 @@ |
87 | 125 | * the current user, and can thus be given in the individual user language). |
88 | 126 | */ |
89 | 127 | function getUserMsgArray() { |
90 | | - return $this->smwUserMessages; |
| 128 | + return $this->m_UserMessages; |
91 | 129 | } |
92 | 130 | } |
93 | 131 | |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageEn extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'Editing help on properties', |
14 | 14 | 'smw_helppage' => 'Relation', |
15 | 15 | 'smw_viewasrdf' => 'RDF feed', |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | ); |
85 | 85 | |
86 | 86 | |
87 | | -protected $smwUserMessages = array( |
| 87 | +protected $m_UserMessages = array( |
88 | 88 | 'smw_devel_warning' => 'This feature is currently under development, and might not be fully functional. Backup your data before using it.', |
89 | 89 | // Messages for pages of types and properties |
90 | 90 | 'smw_type_header' => 'Properties of type “$1”', |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | 'URI' => '_uri' |
201 | 201 | ); |
202 | 202 | |
203 | | -protected $smwSpecialProperties = array( |
| 203 | +protected $m_SpecialProperties = array( |
204 | 204 | //always start upper-case |
205 | 205 | SMW_SP_HAS_TYPE => 'Has type', |
206 | 206 | SMW_SP_HAS_URI => 'Equivalent URI', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageRu.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageRu extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'Редактирование справки по отношениям и атрибутам', |
14 | 14 | 'smw_helppage' => 'Отношение', |
15 | 15 | 'smw_viewasrdf' => 'RDF источник', |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | ); |
85 | 85 | |
86 | 86 | |
87 | | -protected $smwUserMessages = array( |
| 87 | +protected $m_UserMessages = array( |
88 | 88 | 'smw_devel_warning' => 'Эта функция в настоящее время находится в разработке. Сделайте резервную копию прежде чем продолжать.', |
89 | 89 | // Messages for article pages of types, relations, and attributes |
90 | 90 | 'smw_type_header' => 'Атрибуты типа “$1”', |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | 'Annotation URI' => '_anu' |
228 | 228 | ); |
229 | 229 | |
230 | | -protected $smwSpecialProperties = array( |
| 230 | +protected $m_SpecialProperties = array( |
231 | 231 | //always start upper-case |
232 | 232 | SMW_SP_HAS_TYPE => 'Имеет тип', |
233 | 233 | SMW_SP_HAS_URI => 'Эквивалентный URI', |
— | — | @@ -239,7 +239,20 @@ |
240 | 240 | SMW_SP_POSSIBLE_VALUE => 'Возможные значения' // TODO: check translation, should be "Allowed value" (singular) |
241 | 241 | ); |
242 | 242 | |
| 243 | +protected $m_SpecialPropertyAliases = array( |
| 244 | + // support English aliases for special properties |
| 245 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 246 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 247 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 248 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 249 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 250 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 251 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 252 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 253 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 254 | +); |
243 | 255 | |
| 256 | + |
244 | 257 | protected $m_Namespaces = array( |
245 | 258 | SMW_NS_RELATION => 'Отношение', |
246 | 259 | SMW_NS_RELATION_TALK => 'Отношение_дискуссия', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEs.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageEs extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'Ayuda a la redacción de relaciones y atributos', |
14 | 14 | 'smw_helppage' => 'Relaciones y atributos', |
15 | 15 | 'smw_viewasrdf' => 'Ver como RDF', |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | 'smw_querytoolarge' => 'The following query conditions could not be considered due to the wikis restrictions in query size or depth: $1.' |
84 | 84 | ); |
85 | 85 | |
86 | | -protected $smwUserMessages = array( |
| 86 | +protected $m_UserMessages = array( |
87 | 87 | 'smw_devel_warning' => 'Esta función está aún en desarrollo y quizá aun no sea operativa. Es quizá recomendable hacer una copia de seguridad del wiki antes de utilizar esta función.', |
88 | 88 | // Messages for article pages of types, relations, and attributes |
89 | 89 | 'smw_type_header' => 'Atributos de tipo “$1”', |
— | — | @@ -218,7 +218,7 @@ |
219 | 219 | 'Annotation URI' => '_anu' |
220 | 220 | ); |
221 | 221 | |
222 | | -protected $smwSpecialProperties = array( |
| 222 | +protected $m_SpecialProperties = array( |
223 | 223 | //always start upper-case |
224 | 224 | SMW_SP_HAS_TYPE => 'Tiene tipo de datos', |
225 | 225 | SMW_SP_HAS_URI => 'URI equivalente', |
— | — | @@ -231,6 +231,19 @@ |
232 | 232 | SMW_SP_POSSIBLE_VALUE => 'Permite el valor' |
233 | 233 | ); |
234 | 234 | |
| 235 | +protected $m_SpecialPropertyAliases = array( |
| 236 | + // support English aliases for special properties |
| 237 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 238 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 239 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 240 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 241 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 242 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 243 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 244 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 245 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 246 | +); |
| 247 | + |
235 | 248 | protected $m_Namespaces = array( |
236 | 249 | SMW_NS_RELATION => "Relación", |
237 | 250 | SMW_NS_RELATION_TALK => "Discusión_relación", |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageFr.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageFr extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'Aide à la rédaction de relations et d\'attributs', |
14 | 14 | 'smw_helppage' => 'Relations et attributs', |
15 | 15 | 'smw_viewasrdf' => 'Voir comme RDF', |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | 'smw_querytoolarge' => 'The following query conditions could not be considered due to the wikis restrictions in query size or depth: $1.' |
84 | 84 | ); |
85 | 85 | |
86 | | -protected $smwUserMessages = array( |
| 86 | +protected $m_UserMessages = array( |
87 | 87 | 'smw_devel_warning' => 'Cette fonction est encore en développement et n\'est peut-être pas encore opérationnelle. Il est peut-être judicieux de faire une sauvegarde du contenu du wiki avant toute utilisation de cette fonction.', |
88 | 88 | // Messages for article pages of types, relations, and attributes |
89 | 89 | 'smw_type_header' => 'Attributes of type “$1”', // TODO translate |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | 'Annotation URI' => '_anu' |
221 | 221 | ); |
222 | 222 | |
223 | | -protected $smwSpecialProperties = array( |
| 223 | +protected $m_SpecialProperties = array( |
224 | 224 | //always start upper-case |
225 | 225 | SMW_SP_HAS_TYPE => 'A le type', |
226 | 226 | SMW_SP_HAS_URI => 'URI équivalente', |
— | — | @@ -232,6 +232,19 @@ |
233 | 233 | SMW_SP_POSSIBLE_VALUE => 'Valeur possible' |
234 | 234 | ); |
235 | 235 | |
| 236 | +protected $m_SpecialPropertyAliases = array( |
| 237 | + // support English aliases for special properties |
| 238 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 239 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 240 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 241 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 242 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 243 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 244 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 245 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 246 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 247 | +); |
| 248 | + |
236 | 249 | protected $m_Namespaces = array( |
237 | 250 | SMW_NS_RELATION => "Relation", |
238 | 251 | SMW_NS_RELATION_TALK => "Discussion_relation", |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageDe.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | |
19 | 19 | class SMW_LanguageDe extends SMW_Language { |
20 | 20 | |
21 | | -protected $smwContentMessages = array( |
| 21 | +protected $m_ContentMessages = array( |
22 | 22 | 'smw_edithelp' => 'Bearbeitungshilfe für Attribute', |
23 | 23 | 'smw_helppage' => 'Relationen und Attribute', |
24 | 24 | 'smw_viewasrdf' => 'RDF-Feed', |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | 'smw_querytoolarge' => 'Die folgenden Anfragebedingungne konnten wegen den in diesem Wiki gültigen Beschränkungen für größe und Tiefe von Anfragen nicht berücksichtigt werden: $1.' |
93 | 93 | ); |
94 | 94 | |
95 | | -protected $smwUserMessages = array( |
| 95 | +protected $m_UserMessages = array( |
96 | 96 | 'smw_devel_warning' => 'Diese Funktion befindet sich zur Zeit in Entwicklung und ist eventuell noch nicht voll einsatzfähig. Eventuell ist es ratsam, den Inhalt des Wikis vor der Benutzung dieser Funktion zu sichern.', |
97 | 97 | // Messages for article pages of types, relations, and attributes |
98 | 98 | 'smw_type_header' => 'Attribute mit dem Datentyp „$1“', |
— | — | @@ -208,7 +208,7 @@ |
209 | 209 | 'Annotation URI' => '_anu' |
210 | 210 | ); |
211 | 211 | |
212 | | -protected $smwSpecialProperties = array( |
| 212 | +protected $m_SpecialProperties = array( |
213 | 213 | //always start upper-case |
214 | 214 | SMW_SP_HAS_TYPE => 'Hat Datentyp', |
215 | 215 | SMW_SP_HAS_URI => 'Gleichwertige URI', |
— | — | @@ -221,6 +221,19 @@ |
222 | 222 | SMW_SP_POSSIBLE_VALUE => 'Erlaubt Wert' |
223 | 223 | ); |
224 | 224 | |
| 225 | +protected $m_SpecialPropertyAliases = array( |
| 226 | + // support English aliases for special properties |
| 227 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 228 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 229 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 230 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 231 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 232 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 233 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 234 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 235 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 236 | +); |
| 237 | + |
225 | 238 | protected $m_Namespaces = array( |
226 | 239 | SMW_NS_RELATION => "Relation", |
227 | 240 | SMW_NS_RELATION_TALK => "Relation_Diskussion", |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageNl.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageNl extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'Bewerkingshulp bij eigenschappen', |
14 | 14 | 'smw_helppage' => 'Relatie', |
15 | 15 | 'smw_viewasrdf' => 'RDF-feed', |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | 'smw_querytoolarge' => 'De volgende zoekopdrachtcondities zijn niet in acht genomen vanwege beperkingen in de grootte of diepte van zoekopdrachten in deze wiki: $1.' |
81 | 81 | ); |
82 | 82 | |
83 | | -protected $smwUserMessages = array( |
| 83 | +protected $m_UserMessages = array( |
84 | 84 | 'smw_devel_warning' => 'Deze functie wordt op het moment ontwikkeld en is wellicht niet volledig functioneel. Maak een back-up voordat u deze functie gebruikt.', |
85 | 85 | // Messages for pages of types and properties |
86 | 86 | 'smw_type_header' => 'Eigenschappen voor type “$1”', |
— | — | @@ -204,7 +204,7 @@ |
205 | 205 | 'Annotation URI' => '_anu' |
206 | 206 | ); |
207 | 207 | |
208 | | -protected $smwSpecialProperties = array( |
| 208 | +protected $m_SpecialProperties = array( |
209 | 209 | //always start upper-case |
210 | 210 | SMW_SP_HAS_TYPE => 'Heeft type', |
211 | 211 | SMW_SP_HAS_URI => 'Equivalent URI', |
— | — | @@ -217,6 +217,19 @@ |
218 | 218 | SMW_SP_POSSIBLE_VALUE => 'Geldige waarde' |
219 | 219 | ); |
220 | 220 | |
| 221 | +protected $m_SpecialPropertyAliases = array( |
| 222 | + // support English aliases for special properties |
| 223 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 224 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 225 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 226 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 227 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 228 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 229 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 230 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 231 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 232 | +); |
| 233 | + |
221 | 234 | protected $m_Namespaces = array( |
222 | 235 | SMW_NS_RELATION => 'Relatie', |
223 | 236 | SMW_NS_RELATION_TALK => 'Overleg_relatie', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguagePl.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | |
29 | 29 | class SMW_LanguagePl extends SMW_Language { |
30 | 30 | |
31 | | -protected $smwContentMessages = array( |
| 31 | +protected $m_ContentMessages = array( |
32 | 32 | 'smw_edithelp' => 'Pomoc edycyjna odnośnie relacji i atrybutów', |
33 | 33 | 'smw_helppage' => 'Relacja', |
34 | 34 | 'smw_viewasrdf' => 'RDF feed', //TODO: translate? |
— | — | @@ -103,7 +103,7 @@ |
104 | 104 | ); |
105 | 105 | |
106 | 106 | |
107 | | -protected $smwUserMessages = array( |
| 107 | +protected $m_UserMessages = array( |
108 | 108 | 'smw_devel_warning' => 'Ta opcja jest obecnie w fazie rozwoju, może nie być w pełni funkcjonalna. Przed użyciem zabezpiecz swoje dane.', |
109 | 109 | // Messages for article pages of types, relations, and attributes |
110 | 110 | 'smw_type_header' => 'Atrybuty typu “$1”', |
— | — | @@ -250,7 +250,7 @@ |
251 | 251 | 'Annotation URI' => '_anu' |
252 | 252 | ); |
253 | 253 | |
254 | | -protected $smwSpecialProperties = array( |
| 254 | +protected $m_SpecialProperties = array( |
255 | 255 | //always start upper-case |
256 | 256 | SMW_SP_HAS_TYPE => 'Ma typ', |
257 | 257 | SMW_SP_HAS_URI => 'Równoważne URI', |
— | — | @@ -263,7 +263,20 @@ |
264 | 264 | SMW_SP_POSSIBLE_VALUE => 'Dopuszcza wartość' |
265 | 265 | ); |
266 | 266 | |
| 267 | +protected $m_SpecialPropertyAliases = array( |
| 268 | + // support English aliases for special properties |
| 269 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 270 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 271 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 272 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 273 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 274 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 275 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 276 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 277 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 278 | +); |
267 | 279 | |
| 280 | + |
268 | 281 | protected $m_Namespaces = array( |
269 | 282 | SMW_NS_RELATION => 'Relacja', |
270 | 283 | SMW_NS_RELATION_TALK => 'Dyskusja_relacji', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageHe.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageHe extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'עזרה בנושא עריכת יחסים ותכונות', |
14 | 14 | 'smw_helppage' => 'יחס', |
15 | 15 | 'smw_viewasrdf' => 'RDF feed', |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | ); |
84 | 84 | |
85 | 85 | |
86 | | -protected $smwUserMessages = array( |
| 86 | +protected $m_UserMessages = array( |
87 | 87 | 'smw_devel_warning' => 'This feature is currently under development, and might not be fully functional. Backup your data before using it.', |
88 | 88 | // Messages for article pages of types, relations, and attributes |
89 | 89 | 'smw_type_header' => 'Attributes of type “$1”', // TODO translate |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | 'Annotation URI' => '_anu' |
232 | 232 | ); |
233 | 233 | |
234 | | -protected $smwSpecialProperties = array( |
| 234 | +protected $m_SpecialProperties = array( |
235 | 235 | //always start upper-case |
236 | 236 | SMW_SP_HAS_TYPE => 'מטיפוס', |
237 | 237 | SMW_SP_HAS_URI => 'מזהה יחודי תואם', |
— | — | @@ -243,7 +243,20 @@ |
244 | 244 | SMW_SP_POSSIBLE_VALUE => 'ערכים אפשריים' // TODO: check translation, should be singular value// |
245 | 245 | ); |
246 | 246 | |
| 247 | +protected $m_SpecialPropertyAliases = array( |
| 248 | + // support English aliases for special properties |
| 249 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 250 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 251 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 252 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 253 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 254 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 255 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 256 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 257 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 258 | +); |
247 | 259 | |
| 260 | + |
248 | 261 | protected $m_Namespaces = array( |
249 | 262 | SMW_NS_RELATION => 'יחס', |
250 | 263 | SMW_NS_RELATION_TALK => 'שיחת_יחס', |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageSk.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | |
10 | 10 | class SMW_LanguageSk extends SMW_Language { |
11 | 11 | |
12 | | -protected $smwContentMessages = array( |
| 12 | +protected $m_ContentMessages = array( |
13 | 13 | 'smw_edithelp' => 'Pomoc pri upravovaní vzťahov a atribútov', |
14 | 14 | 'smw_helppage' => 'Vzťah', |
15 | 15 | 'smw_viewasrdf' => 'RDF feed', |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | ); |
86 | 86 | |
87 | 87 | |
88 | | -protected $smwUserMessages = array( |
| 88 | +protected $m_UserMessages = array( |
89 | 89 | 'smw_devel_warning' => 'Táto vlastnosť je momentálne vo vývoji a nemusí byť celkom funkčná. Predtým, než ju použijete si zálohujte dáta.', |
90 | 90 | // Messages for article pages of types, relations, and attributes |
91 | 91 | 'smw_type_header' => 'Attributes of type “$1”', // TODO translate |
— | — | @@ -227,7 +227,7 @@ |
228 | 228 | 'Annotation URI' => '_anu' |
229 | 229 | ); |
230 | 230 | |
231 | | -protected $smwSpecialProperties = array( |
| 231 | +protected $m_SpecialProperties = array( |
232 | 232 | //always start upper-case |
233 | 233 | SMW_SP_HAS_TYPE => 'Má typ', |
234 | 234 | SMW_SP_HAS_URI => 'Ekvivalent URI', |
— | — | @@ -240,7 +240,20 @@ |
241 | 241 | SMW_SP_POSSIBLE_VALUE => 'Allowed value' //TODO translate |
242 | 242 | ); |
243 | 243 | |
| 244 | +protected $m_SpecialPropertyAliases = array( |
| 245 | + // support English aliases for special properties |
| 246 | + 'Has type' => SMW_SP_HAS_TYPE, |
| 247 | + 'Equivalent URI' => SMW_SP_HAS_URI, |
| 248 | + 'Subproperty of' => SMW_SP_SUBPROPERTY_OF, |
| 249 | + 'Main display unit' => SMW_SP_MAIN_DISPLAY_UNIT, |
| 250 | + 'Display unit' => SMW_SP_DISPLAY_UNIT, |
| 251 | + 'Imported from' => SMW_SP_IMPORTED_FROM, |
| 252 | + 'Corresponds to' => SMW_SP_CONVERSION_FACTOR, |
| 253 | + 'Provides service' => SMW_SP_SERVICE_LINK, |
| 254 | + 'Allows value' => SMW_SP_POSSIBLE_VALUE |
| 255 | +); |
244 | 256 | |
| 257 | + |
245 | 258 | protected $m_Namespaces = array( |
246 | 259 | SMW_NS_RELATION => 'Vzťah', |
247 | 260 | SMW_NS_RELATION_TALK => 'Diskusia o vzťahu', |