mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-12-02 20:16:17 +00:00
87ddb7f735
This feature add an option `notranslations` that allows the category tree only to show the default pages and not include their translations equivalents on the tree. For example let's say we have a page (Test_page) that was created in a default language "en" in a category TestCat, and has translations listed: Test_page/es, Test_page/de, Test_page/ar etc. Doing `<categorytree notranslations="on">TestCat</categorytree> will render only the Test_page page with it's link to the page on the tree and nothing more. Note: If page "Foo/hu" exist but "Foo" doesn't, it should include "Foo/hu" in the category tree. In most case though, a base page will exist. Also, the feature is only available if Extension:Translate is made available on that wiki. TODO: If "notranslations" is used along side with "showcount", consider subtracting the number of pages suppressed from the total page count in the category tree for consistency. Bug: T229265 Change-Id: Ib4e7ab6ad98c05857cda1cd98bbc19e0504677bb
149 lines
4 KiB
JSON
149 lines
4 KiB
JSON
{
|
|
"name": "CategoryTree",
|
|
"author": "Daniel Kinzler",
|
|
"url": "https://www.mediawiki.org/wiki/Extension:CategoryTree",
|
|
"descriptionmsg": "categorytree-desc",
|
|
"license-name": "GPL-2.0-or-later",
|
|
"type": "parserhook",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.35.0"
|
|
},
|
|
"ConfigRegistry": {
|
|
"categorytree": "GlobalVarConfig::newInstance"
|
|
},
|
|
"ExtensionFunctions": [
|
|
"CategoryTreeHooks::initialize"
|
|
],
|
|
"SpecialPages": {
|
|
"CategoryTree": "CategoryTreePage"
|
|
},
|
|
"APIModules": {
|
|
"categorytree": "ApiCategoryTree"
|
|
},
|
|
"MessagesDirs": {
|
|
"CategoryTree": [
|
|
"i18n",
|
|
"i18n/api"
|
|
]
|
|
},
|
|
"ExtensionMessagesFiles": {
|
|
"CategoryTreeAlias": "CategoryTree.alias.php",
|
|
"CategoryTreeMagic": "CategoryTree.i18n.magic.php"
|
|
},
|
|
"AutoloadClasses": {
|
|
"CategoryTreePage": "includes/CategoryTreePage.php",
|
|
"CategoryTree": "includes/CategoryTree.php",
|
|
"CategoryTreeCategoryPage": "includes/CategoryTreeCategoryPage.php",
|
|
"CategoryTreeCategoryViewer": "includes/CategoryTreeCategoryViewer.php",
|
|
"CategoryTreeHooks": "includes/CategoryTreeHooks.php",
|
|
"CategoryTreeMode": "includes/CategoryTreeMode.php",
|
|
"CategoryTreeHidePrefix": "includes/CategoryTreeHidePrefix.php",
|
|
"ApiCategoryTree": "includes/ApiCategoryTree.php"
|
|
},
|
|
"ResourceModules": {
|
|
"ext.categoryTree": {
|
|
"localBasePath": "modules/ext.categoryTree",
|
|
"remoteExtPath": "CategoryTree/modules/ext.categoryTree",
|
|
"styles": "ext.categoryTree.css",
|
|
"packageFiles": [
|
|
"ext.categoryTree.js",
|
|
{
|
|
"name": "data.json",
|
|
"callback": "CategoryTreeHooks::getDataForJs"
|
|
}
|
|
],
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
],
|
|
"messages": [
|
|
"categorytree-collapse",
|
|
"categorytree-expand",
|
|
"categorytree-collapse-bullet",
|
|
"categorytree-expand-bullet",
|
|
"categorytree-load",
|
|
"categorytree-loading",
|
|
"categorytree-nothing-found",
|
|
"categorytree-no-subcategories",
|
|
"categorytree-no-parent-categories",
|
|
"categorytree-no-pages",
|
|
"categorytree-error",
|
|
"categorytree-retry"
|
|
],
|
|
"dependencies": [
|
|
"mediawiki.api"
|
|
]
|
|
},
|
|
"ext.categoryTree.styles": {
|
|
"targets": [
|
|
"desktop",
|
|
"mobile"
|
|
],
|
|
"styles": "ext.categoryTree.styles.css"
|
|
}
|
|
},
|
|
"ResourceFileModulePaths": {
|
|
"localBasePath": "modules",
|
|
"remoteExtPath": "CategoryTree/modules"
|
|
},
|
|
"Hooks": {
|
|
"ArticleFromTitle": "CategoryTreeHooks::articleFromTitle",
|
|
"SpecialTrackingCategories::preprocess": "CategoryTreeHooks::onSpecialTrackingCategoriesPreprocess",
|
|
"SpecialTrackingCategories::generateCatLink": "CategoryTreeHooks::onSpecialTrackingCategoriesGenerateCatLink",
|
|
"SkinBuildSidebar": "CategoryTreeHooks::onSkinBuildSidebar",
|
|
"ParserFirstCallInit": "CategoryTreeHooks::setHooks",
|
|
"OutputPageMakeCategoryLinks": "CategoryTreeHooks::outputPageMakeCategoryLinks",
|
|
"BeforePageDisplay": "CategoryTreeHooks::addHeaders",
|
|
"BeforePageDisplayMobile": "CategoryTreeHooks::addHeaders",
|
|
"OutputPageParserOutput": "CategoryTreeHooks::parserOutput"
|
|
},
|
|
"config": {
|
|
"CategoryTreeMaxChildren": 200,
|
|
"CategoryTreeAllowTag": true,
|
|
"CategoryTreeDisableCache": 21600,
|
|
"CategoryTreeMaxDepth": {
|
|
"10": 1,
|
|
"20": 1,
|
|
"0": 2
|
|
},
|
|
"CategoryTreeForceHeaders": false,
|
|
"CategoryTreeSidebarRoot": null,
|
|
"CategoryTreeHijackPageCategories": false,
|
|
"CategoryTreeUseCategoryTable": true,
|
|
"CategoryTreeOmitNamespace": 20,
|
|
"CategoryTreeDefaultMode": 0,
|
|
"CategoryTreeDefaultOptions": {
|
|
"mode": null,
|
|
"hideprefix": null,
|
|
"showcount": false,
|
|
"namespaces": false,
|
|
"notranslations": false
|
|
},
|
|
"CategoryTreeCategoryPageMode": 0,
|
|
"CategoryTreeCategoryPageOptions": {
|
|
"mode": null,
|
|
"showcount": true
|
|
},
|
|
"CategoryTreeSpecialPageOptions": {
|
|
"showcount": true
|
|
},
|
|
"CategoryTreeSidebarOptions": {
|
|
"mode": 0,
|
|
"hideprefix": 20,
|
|
"showcount": false,
|
|
"hideroot": true,
|
|
"namespaces": false,
|
|
"depth": 1
|
|
},
|
|
"CategoryTreePageCategoryOptions": {
|
|
"mode": 100,
|
|
"hideprefix": 20,
|
|
"showcount": false,
|
|
"hideroot": false,
|
|
"namespaces": false,
|
|
"depth": 0
|
|
}
|
|
},
|
|
"manifest_version": 1
|
|
}
|