Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3765489
D1008.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1008.diff
View Options
diff --git a/create_given_name b/create_given_name
--- a/create_given_name
+++ b/create_given_name
@@ -82,11 +82,25 @@
labels = {lang: givenname for lang in labels_languages}
item.editLabels(labels, summary='Adding given name labels')
-item.editDescriptions(descriptions, summary='Adding given name descriptions')
+# Instance of: "[gender] given name"
claim = pywikibot.Claim(repo, 'P31')
target = pywikibot.ItemPage(repo, genre_items[genre])
claim.setTarget(target)
item.addClaim(claim)
+# Native label: <the given name>
+claim = pywikibot.Claim(repo, 'P1705')
+target = pywikibot.WbMonolingualText(text=givenname, language='mul')
+claim.setTarget(target)
+item.addClaim(claim)
+
+# Writing system: "latin"
+claim = pywikibot.Claim(repo, 'P282')
+target = pywikibot.ItemPage(repo, 'Q8229')
+claim.setTarget(target)
+item.addClaim(claim)
+
+item.editDescriptions(descriptions, summary='Adding given name descriptions')
+
print(title)
diff --git a/create_surname b/create_surname
--- a/create_surname
+++ b/create_surname
@@ -51,11 +51,25 @@
labels = {lang: surname for lang in latin_languages}
item.editLabels(labels, summary='Adding surname labels')
-item.editDescriptions(descriptions, summary='Adding surname descriptions')
+# Instance of "surname"
claim = pywikibot.Claim(repo, 'P31')
target = pywikibot.ItemPage(repo, 'Q101352')
claim.setTarget(target)
item.addClaim(claim)
+# Native label: <the surname>
+claim = pywikibot.Claim(repo, 'P1705')
+target = pywikibot.WbMonolingualText(text=surname, language='mul')
+claim.setTarget(target)
+item.addClaim(claim)
+
+# Writing system: "latin"
+claim = pywikibot.Claim(repo, 'P282')
+target = pywikibot.ItemPage(repo, 'Q8229')
+claim.setTarget(target)
+item.addClaim(claim)
+
+item.editDescriptions(descriptions, summary='Adding surname descriptions')
+
print(title)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 12:36 (18 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258006
Default Alt Text
D1008.diff (1 KB)
Attached To
Mode
D1008: Add native label and writing system claims to names
Attached
Detach File
Event Timeline
Log In to Comment