diff options
Diffstat (limited to 'GentooToolbox/properties/TranslationProperties.body.php')
-rw-r--r-- | GentooToolbox/properties/TranslationProperties.body.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/GentooToolbox/properties/TranslationProperties.body.php b/GentooToolbox/properties/TranslationProperties.body.php index 6d77481e..0c017bab 100644 --- a/GentooToolbox/properties/TranslationProperties.body.php +++ b/GentooToolbox/properties/TranslationProperties.body.php @@ -8,16 +8,17 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ +use SMW\DIProperty; use SMW\PropertyRegistry; class GTBXTranslationProperties { public static function setupProperties() { - PropertyRegistry::registerProperty('___LANG', '_str', wfMessage('gtbx-prop-lang')->inContentLanguage()->text()); - PropertyRegistry::registerPropertyAlias('___LANG', 'Language'); + PropertyRegistry::getInstance()->registerProperty('___LANG', '_str', wfMessage('gtbx-prop-lang')->inContentLanguage()->text()); + PropertyRegistry::getInstance()->registerPropertyAlias('___LANG', 'Language'); - PropertyRegistry::registerProperty('___TRANS', '_boo', wfMessage('gtbx-prop-trans')->inContentLanguage()->text()); - PropertyRegistry::registerPropertyAlias('___TRANS', 'Is Translation Page'); + PropertyRegistry::getInstance()->registerProperty('___TRANS', '_boo', wfMessage('gtbx-prop-trans')->inContentLanguage()->text()); + PropertyRegistry::getInstance()->registerPropertyAlias('___TRANS', 'Is Translation Page'); return true; } @@ -32,14 +33,14 @@ class GTBXTranslationProperties { } // Property 1: Is translation page - $property = new PropertyRegistry('___TRANS'); + $property = new DIProperty('___TRANS'); $is_translation_page = !(TranslatablePage::isTranslationPage($title) === false); $data_item = new SMWDIBoolean($is_translation_page); $data->addPropertyObjectValue($property, $data_item); // Property 2: Language? - $property = new PropertyRegistry('___LANG'); + $property = new DIProperty('___LANG'); global $wgLanguageCode; $language_code = $wgLanguageCode; |