| Wichtig: Benutzerleitstellen bitte in dieser Liste eintragen! Beim Erstellen eines Leitstellenartikels bitte diese Hinweise beachten. |
MediaWiki:Gadget-HotCat.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Legacy>Serhan K Serhan verschob die Seite MediaWiki:Gadget-HotCat nach MediaWiki:Gadget-HotCat.js, ohne dabei eine Weiterleitung anzulegen |
Legacy>D5B Test (HotCat soll deutsch sprechen) |
||
| Zeile 31: | Zeile 31: | ||
}); | }); | ||
}); | }); | ||
// Localize these messages to the main language of your wiki. | |||
,messages : | |||
{ cat_removed : 'Entferne [[Kategorie:$1]]' | |||
,template_removed : 'Entferne {{[[Kategorie:$1|$1]]}}' | |||
,cat_added : 'Ergänze [[Kategorie:$1]]' | |||
,cat_keychange: 'neuer Sortierschlüssel für [[Kategorie:$1]]: "$2"' // $2 is the new key | |||
,cat_notFound : 'Kategorie "$1" konnte nicht gefunden werden' | |||
,cat_exists : 'Kategorie "$1" bereits enthalten; nicht ergänzt' | |||
,cat_resolved : ' (Weiterleitung [[Kategorie:$1]] aufgelöst)' | |||
,uncat_removed: 'entferne {{uncategorized}}' | |||
,separator : '; ' | |||
,prefix : '[[Hilfe:HotCat|HC]]: ' | |||
// Some text to prefix to the edit summary. | |||
,using : "" | |||
// Some text to append to the edit summary. Named 'using' for historical reasons. If you prefer | |||
// to have a marker at the front, use prefix and set this to the empty string. | |||
,multi_change : '$1 Kategorien' | |||
// $1 is replaced by a number. If your language has several plural forms (c.f. [[:en:Dual (grammatical form)]]), | |||
// you can set this to an array of strings suitable for passing to mw.language.configPlural(). | |||
// If that function doesn't exist, HotCat will simply fall back to using the last | |||
// entry in the array. | |||
,commit : 'Speichern' | |||
// Button text. Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage, | |||
// see localization hook below. | |||
,ok : 'OK' | |||
// Button text. Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage, | |||
// see localization hook below. | |||
,cancel : 'Abbrechen' | |||
// Button text. Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage, | |||
// see localization hook below. | |||
,multi_error : 'Quelltext konnte nicht abrufen werden. Deine Änderungen wurden deshalb nicht gespeichert.' | |||
// Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage, | |||
// see localization hook below. | |||
} | |||
,category_regexp : '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]' | |||
// Regular sub-expression matching all possible names for the category namespace. Is automatically localized | |||
// correctly if you're running MediaWiki 1.16 or later. Otherwise, set it appropriately, e.g. at the German | |||
// Wikipedia, use '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii][Ee]', or at the | |||
// Chinese Wikipedia, use '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|分类|分類'. Note that namespaces are case- | |||
// insensitive! | |||
,category_canonical : 'Kategorie' | |||
// The standard category name on your wiki. Is automatically localized correctly if you're running | |||
// MediaWiki 1.16 or later; otherwise, set it to the preferred category name (e.g., "Kategorie"). | |||
,categories : 'Kategorien' | |||
// Plural of category_canonical. | |||
,disambig_category : null | |||
// Any category in this category is deemed a disambiguation category; i.e., a category that should not contain | |||
// any items, but that contains links to other categories where stuff should be categorized. If you don't have | |||
// that concept on your wiki, set it to null. | |||
,redir_category : null | |||
// Any category in this category is deemed a (soft) redirect to some other category defined by the first link | |||
// to another category. If your wiki doesn't have soft category redirects, set this to null. | |||
,links : {change: '(±)', remove: '(−)', add: '(+)', restore: '(×)', undo: '(×)', down: '(↓)', up: '(↑)'} | |||
// The little modification links displayed after category names. | |||
,tooltips : { | |||
change: 'Ändern' | |||
,remove: 'Entfernen' | |||
,add: 'Neue Kategorie hinzufügen' | |||
,restore: 'Wiederherstellen' | |||
,undo: 'Zurücksetzen' | |||
,down: 'durch Unterkategorie ersetzen' | |||
,up: 'durch Überkategorie ersetzen' | |||
} | |||
// The tooltips for the above links | |||
,addmulti : '<span>+<sup>+</sup></span>' | |||
// The HTML content of the "enter multi-mode" link at the front. | |||
,multi_tooltip : 'Mehrere Kategorien ändern' | |||
// Tooltip for the "enter multi-mode" link | |||
,disable : | |||
function () { // Return true to disable HotCat. HotCat guarantees that the wg* globals exist here. | |||
var ns = wgNamespaceNumber; | |||
return ( ns < 0 // Special pages; Special:Upload is handled differently | |||
|| ns === 10 // Templates | |||
|| ns === 8 // MediaWiki | |||
|| ns === 6 && wgArticleId === 0 // Non-existing file pages | |||
|| ns === 2 && /\.(js|css)$/.test(wgTitle) // User scripts | |||
|| typeof (wgNamespaceIds) != 'undefined' | |||
&& ( ns === wgNamespaceIds['creator'] | |||
|| ns === wgNamespaceIds['timedtext'] | |||
|| ns === wgNamespaceIds['institution'] | |||
) | |||
); | |||
} | |||
,uncat_regexp : null | |||
// A regexp matching a templates used to mark uncategorized pages, if your wiki does have that. | |||
// If not, set it to null. | |||
,existsYes : '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/P_yes.svg/20px-P_yes.svg.png' | |||
,existsNo : '//upload.wikimedia.org/wikipedia/commons/thumb/4/42/P_no.svg/20px-P_no.svg.png' | |||
// The images used for the little indication icon. Should not need changing. | |||
,template_regexp : '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]' | |||
// Regexp to recognize templates. Like "category" above; autolocalized for MW 1.16+, otherwise set manually here. | |||
// On the German Wikipedia, you might use '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Vv][Oo][Rr][Ll][Aa][Gg][Ee]'. | |||
,template_categories : {} | |||
// a list of categories which can be removed by removing a template | |||
// key: the category without namespace | |||
// value: A regexp matching the template name, again without namespace | |||
// If you don't have this at your wiki, or don't want this, set it to an empty object {}. | |||
,engine_names : { | |||
searchindex : 'Indexsuche' | |||
,pagelist : 'Seitenliste' | |||
,combined : 'Kombinierte Suche' | |||
,subcat : 'Unterkategorien' | |||
,parentcat : 'Überkategorien' | |||
} | |||
Version vom 30. Juli 2014, 16:25 Uhr
window.hotcat_translations_from_commons = true;
/*
This imports the latest version of HotCat from Commons. HotCat is a gadget to make changes to categories much easier. Full documentation can be found at commons:Help:Gadget-HotCat
- /
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
// Präfix „Datei:“ für Dateibeschreibungsseiten und Spezial:Hochladen als Vorgabe $(function () {
var namespaceNumber = mw.config.get('wgNamespaceNumber');
if (namespaceNumber === -1 && mw.config.get('wgCanonicalSpecialPageName') == 'Upload') {
// We're on Special:Upload: pretend we were in the file namespace.
namespaceNumber = 6;
}
// Exclude all other namespaces including talk pages and special pages
if (namespaceNumber !== 6) return;
$('body').delegate('.hotcatinput input:text', 'focus', function () {
var wasSet = $(this).data('hotcatprefixset');
if (wasSet) return; // Already done, don't re-do it (user might have deleted pre-filled text)
if (!this.value) {
// If input field is empty, then pre-fill it
var namespaceNames = mw.config.get('wgFormattedNamespaces');
if (namespaceNames && typeof (namespaceNames[namespaceNumber]) == 'string') {
var suffix = ':';
this.value = namespaceNames[namespaceNumber] + suffix;
}
}
$(this).data('hotcatprefixset', true);
});
}); // Localize these messages to the main language of your wiki.
,messages :
{ cat_removed : 'Entferne '
,template_removed : 'Entferne {{}}'
,cat_added : 'Ergänze '
,cat_keychange: 'neuer Sortierschlüssel für : "$2"' // $2 is the new key
,cat_notFound : 'Kategorie "$1" konnte nicht gefunden werden'
,cat_exists : 'Kategorie "$1" bereits enthalten; nicht ergänzt'
,cat_resolved : ' (Weiterleitung aufgelöst)'
,uncat_removed: 'entferne Vorlage:Uncategorized'
,separator : '; '
,prefix : 'HC: '
// Some text to prefix to the edit summary.
,using : ""
// Some text to append to the edit summary. Named 'using' for historical reasons. If you prefer
// to have a marker at the front, use prefix and set this to the empty string.
,multi_change : '$1 Kategorien'
// $1 is replaced by a number. If your language has several plural forms (c.f. en:Dual (grammatical form)),
// you can set this to an array of strings suitable for passing to mw.language.configPlural().
// If that function doesn't exist, HotCat will simply fall back to using the last
// entry in the array.
,commit : 'Speichern'
// Button text. Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage,
// see localization hook below.
,ok : 'OK'
// Button text. Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage,
// see localization hook below.
,cancel : 'Abbrechen'
// Button text. Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage,
// see localization hook below.
,multi_error : 'Quelltext konnte nicht abrufen werden. Deine Änderungen wurden deshalb nicht gespeichert.'
// Localize to wgContentLanguage here; localize to wgUserLanguage in a subpage,
// see localization hook below.
}
,category_regexp : '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]'
// Regular sub-expression matching all possible names for the category namespace. Is automatically localized
// correctly if you're running MediaWiki 1.16 or later. Otherwise, set it appropriately, e.g. at the German
// Wikipedia, use '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii][Ee]', or at the
// Chinese Wikipedia, use '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|分类|分類'. Note that namespaces are case-
// insensitive!
,category_canonical : 'Kategorie'
// The standard category name on your wiki. Is automatically localized correctly if you're running
// MediaWiki 1.16 or later; otherwise, set it to the preferred category name (e.g., "Kategorie").
,categories : 'Kategorien'
// Plural of category_canonical.
,disambig_category : null
// Any category in this category is deemed a disambiguation category; i.e., a category that should not contain
// any items, but that contains links to other categories where stuff should be categorized. If you don't have
// that concept on your wiki, set it to null.
,redir_category : null
// Any category in this category is deemed a (soft) redirect to some other category defined by the first link
// to another category. If your wiki doesn't have soft category redirects, set this to null.
,links : {change: '(±)', remove: '(−)', add: '(+)', restore: '(×)', undo: '(×)', down: '(↓)', up: '(↑)'}
// The little modification links displayed after category names.
,tooltips : {
change: 'Ändern'
,remove: 'Entfernen'
,add: 'Neue Kategorie hinzufügen'
,restore: 'Wiederherstellen'
,undo: 'Zurücksetzen'
,down: 'durch Unterkategorie ersetzen'
,up: 'durch Überkategorie ersetzen'
}
// The tooltips for the above links
,addmulti : '++'
// The HTML content of the "enter multi-mode" link at the front.
,multi_tooltip : 'Mehrere Kategorien ändern'
// Tooltip for the "enter multi-mode" link
,disable :
function () { // Return true to disable HotCat. HotCat guarantees that the wg* globals exist here.
var ns = wgNamespaceNumber;
return ( ns < 0 // Special pages; Special:Upload is handled differently
|| ns === 10 // Templates
|| ns === 8 // MediaWiki
|| ns === 6 && wgArticleId === 0 // Non-existing file pages
|| ns === 2 && /\.(js|css)$/.test(wgTitle) // User scripts
|| typeof (wgNamespaceIds) != 'undefined'
&& ( ns === wgNamespaceIds['creator']
|| ns === wgNamespaceIds['timedtext']
|| ns === wgNamespaceIds['institution']
)
);
}
,uncat_regexp : null
// A regexp matching a templates used to mark uncategorized pages, if your wiki does have that.
// If not, set it to null.
,existsYes : '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/P_yes.svg/20px-P_yes.svg.png'
,existsNo : '//upload.wikimedia.org/wikipedia/commons/thumb/4/42/P_no.svg/20px-P_no.svg.png'
// The images used for the little indication icon. Should not need changing.
,template_regexp : '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]'
// Regexp to recognize templates. Like "category" above; autolocalized for MW 1.16+, otherwise set manually here.
// On the German Wikipedia, you might use '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Vv][Oo][Rr][Ll][Aa][Gg][Ee]'.
,template_categories : {}
// a list of categories which can be removed by removing a template
// key: the category without namespace
// value: A regexp matching the template name, again without namespace
// If you don't have this at your wiki, or don't want this, set it to an empty object {}.
,engine_names : {
searchindex : 'Indexsuche'
,pagelist : 'Seitenliste'
,combined : 'Kombinierte Suche'
,subcat : 'Unterkategorien'
,parentcat : 'Überkategorien'
}