From 53d13dd11d577971bc6997499fb38bdbc0c6bc1c Mon Sep 17 00:00:00 2001 From: KitsuneSolar Date: Sun, 16 Jul 2023 23:53:33 +0000 Subject: [PATCH] 2023-07-16 23:53:33 --- .gitignore | 1 + CHANGELOG.md | 0 CONTRIBUTING.md | 13 ++++ LICENSE | 2 +- MW_EXT_META.class.php | 23 ++++++ MW_EXT_META.i18n.namespaces.php | 72 +++++++++++++++++ MW_EXT_META.php | 16 ++++ README.md | 19 ++++- composer.json | 46 +++++++++++ extension.json | 134 ++++++++++++++++++++++++++++++++ i18n/ru.json | 11 +++ 11 files changed, 335 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 MW_EXT_META.class.php create mode 100644 MW_EXT_META.i18n.namespaces.php create mode 100644 MW_EXT_META.php create mode 100644 composer.json create mode 100644 extension.json create mode 100644 i18n/ru.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..969906b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing + +- Feedback, wishes and suggestions can be sent by email. +- Constructive criticism, bug descriptions and other reports are welcome. +- Email: mail@ihub.to + +## Sources + +- [**GitHub**](https://github.com/pkgstore) +- [GitLab](https://gitlab.com/pkgstore) (MIRROR) +- [Codeberg](https://codeberg.org/pkgstore) (MIRROR) +- [MosHub](https://hub.mos.ru/pkgstore) (MIRROR) +- [Git.Org.Ru](https://git.org.ru/pkgstore) (MIRROR) diff --git a/LICENSE b/LICENSE index 8dbae8f..62a7665 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Package Store +Copyright (c) 2023 iHub TO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MW_EXT_META.class.php b/MW_EXT_META.class.php new file mode 100644 index 0000000..a4b1980 --- /dev/null +++ b/MW_EXT_META.class.php @@ -0,0 +1,23 @@ + 'Sandbox', + NS_EXT_SANDBOX_TALK => 'Sandbox_talk', + NS_EXT_DRAFT => 'Draft', + NS_EXT_DRAFT_TALK => 'Draft_talk', + NS_EXT_BLOG => 'Blog', + NS_EXT_BLOG_TALK => 'Blog_talk', + NS_EXT_NEWS => 'News', + NS_EXT_NEWS_TALK => 'News_talk', + NS_EXT_EXTENSION => 'Extension', + NS_EXT_EXTENSION_TALK => 'Extension_talk', + NS_EXT_THEME => 'Theme', + NS_EXT_THEME_TALK => 'Theme_talk', + NS_EXT_PORTAL => 'Portal', + NS_EXT_PORTAL_TALK => 'Portal_talk', +]; + +$namespaceNames['ru'] = [ + NS_EXT_SANDBOX => 'Песочница', + NS_EXT_SANDBOX_TALK => 'Обсуждение_песочницы', + NS_EXT_DRAFT => 'Черновик', + NS_EXT_DRAFT_TALK => 'Обсуждение_черновика', + NS_EXT_BLOG => 'Блог', + NS_EXT_BLOG_TALK => 'Обсуждение_блога', + NS_EXT_NEWS => 'Новость', + NS_EXT_NEWS_TALK => 'Обсуждение_новости', + NS_EXT_EXTENSION => 'Расширение', + NS_EXT_EXTENSION_TALK => 'Обсуждение_расширения', + NS_EXT_THEME => 'Тема', + NS_EXT_THEME_TALK => 'Обсуждение_темы', + NS_EXT_PORTAL => 'Портал', + NS_EXT_PORTAL_TALK => 'Обсуждение_портала', +]; \ No newline at end of file diff --git a/MW_EXT_META.php b/MW_EXT_META.php new file mode 100644 index 0000000..c010281 --- /dev/null +++ b/MW_EXT_META.php @@ -0,0 +1,16 @@ +=8.2", + "pkgstore/mediawiki-ext-kernel": "*" + }, + "autoload": { + "classmap": [ + "MW_EXT_META.class.php" + ] + }, + "config": { + "optimize-autoloader": true, + "prepend-autoloader": false + }, + "extra": { + "installer-name": "MW_EXT_META" + } +} diff --git a/extension.json b/extension.json new file mode 100644 index 0000000..1143b05 --- /dev/null +++ b/extension.json @@ -0,0 +1,134 @@ +{ + "name": "MW_EXT_META", + "version": "1.0.0", + "author": [ + "[https://ihub.to/ iHub TO]", + "[https://kitsune.solar/ Kitsune Solar]", + "..." + ], + "url": "https://ihub.to/", + "descriptionmsg": "mw-meta-desc", + "license-name": "[https://choosealicense.com/licenses/mit/ MIT]", + "type": "other", + "require": { + "MediaWiki": ">= 1.31.0", + "extensions": { + "MW_EXT_Kernel": "*" + } + }, + "namespaces": [ + { + "id": 1000000010, + "constant": "NS_EXT_SANDBOX", + "name": "Sandbox", + "subpages": true + }, + { + "id": 1000000011, + "constant": "NS_EXT_SANDBOX_TALK", + "name": "Sandbox_talk" + }, + { + "id": 1000000020, + "constant": "NS_EXT_DRAFT", + "name": "Draft", + "subpages": true + }, + { + "id": 1000000021, + "constant": "NS_EXT_DRAFT_TALK", + "name": "Draft_talk" + }, + { + "id": 1000000030, + "constant": "NS_EXT_BLOG", + "name": "Blog", + "subpages": false, + "content": true + }, + { + "id": 1000000031, + "constant": "NS_EXT_BLOG_TALK", + "name": "Blog_talk" + }, + { + "id": 1000000040, + "constant": "NS_EXT_NEWS", + "name": "News", + "subpages": false, + "content": true + }, + { + "id": 1000000041, + "constant": "NS_EXT_NEWS_TALK", + "name": "News_talk" + }, + { + "id": 1000000050, + "constant": "NS_EXT_EXTENSION", + "name": "Extension", + "subpages": true, + "content": true + }, + { + "id": 1000000051, + "constant": "NS_EXT_EXTENSION_TALK", + "name": "Extension_talk" + }, + { + "id": 1000000060, + "constant": "NS_EXT_THEME", + "name": "Theme", + "subpages": true, + "content": true + }, + { + "id": 1000000061, + "constant": "NS_EXT_THEME_TALK", + "name": "Theme_talk" + }, + { + "id": 1000000070, + "constant": "NS_EXT_PORTAL", + "name": "Portal", + "subpages": true, + "content": true + }, + { + "id": 1000000071, + "constant": "NS_EXT_PORTAL_TALK", + "name": "Portal_talk" + } + ], + "AddGroups": { + "bureaucrat": [ + "editor" + ] + }, + "RemoveGroups": { + "bureaucrat": [ + "editor" + ] + }, + "AutoloadClasses": { + "MediaWiki\\Extension\\PkgStore\\MW_EXT_META": "MW_EXT_META.class.php" + }, + "Hooks": { + "BeforePageDisplay": [ + "MediaWiki\\Extension\\PkgStore\\MW_EXT_META::onBeforePageDisplay" + ] + }, + "ExtensionMessagesFiles": { + "MW_EXT_METANamespaces": "MW_EXT_META.i18n.namespaces.php" + }, + "MessagesDirs": { + "MW_EXT_META": [ + "i18n" + ] + }, + "ResourceFileModulePaths": { + "localBasePath": "modules", + "remoteExtPath": "MW_EXT_META/modules" + }, + "manifest_version": 2 +} diff --git a/i18n/ru.json b/i18n/ru.json new file mode 100644 index 0000000..b156526 --- /dev/null +++ b/i18n/ru.json @@ -0,0 +1,11 @@ +{ + "@metadata": { + "authors": [ + "iHub TO" + ] + }, + "group-editor": "Редакторы", + "group-editor-member": "{{GENDER:$1|редактор}}", + "grouppage-editor": "{{ns:project}}:Редакторы", + "mw-meta-desc": "Интеграция дополнительных элементов в движок MediaWiki. Специально для проектов [METADATA / FOUNDATION https://metadata.foundation/]." +}