Wikidata:Namescript
Warning: Since September 2024, it is encouraged to use default labels and aliases in Wikidata items for names, thus adding labels and aliases separately for each language is no longer necessary. However, the gadget is still useful for adding descriptions. |
namescript is a user script to clean up items for names (given names, family names, or others).
Based on the data in the item’s statements, it will fill in any missing labels, descriptions, or aliases automatically.
Setup
[edit]Add the following to your common.js:
mw.loader.load( '//www.wikidata.org/w/index.php?title=User:Harmonia_Amanda/namescript.js&action=raw&ctype=text/javascript' );
Usage
[edit]Before using namescript, the item should have a instance of (P31) statement with one of the following values: male given name (Q12308941), female given name (Q11879590), family name (Q101352), double family name (Q29042997), or unisex given name (Q3409032).
It also needs to have valid native label (P1705) and writing system (P282) statements (and, for Japanese names, a valid name in kana (P1814) statement).
If all these statements are there, there is a link “add labels and descriptions” below the instance of (P31) statement. It won't overwrite any existing labels/descriptions, so you need to remove the wrong ones before using the script. The script will add all missing labels, descriptions and aliases.
Not all writing systems are handled yet. The script handle right now: Latin script (Q8229), kanji (Q82772), Greek alphabet (Q8216), Georgian scripts (Q161428), Hangul (Q8222), Arabic alphabet (Q8196), Hebrew alphabet (Q33513), Cyrillic script (Q8209), Armenian alphabet (Q11932), Devanagari (Q38592).
Standalone version
[edit]Administrators can also run a stand-alone version of namescript on their computers, which is a lot more efficient for large numbers of names. Go to https://github.com/lucaswerkmeister/namescript and follow the instructions there.