Page MenuHomeDevCentral

D1008.diff
No OneTemporary

D1008.diff

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

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)

Event Timeline