lists.wikimedia.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
List overview
Download
Pywikipedia-svn
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
pywikipedia-svn@lists.wikimedia.org
5163 discussions
Start a n
N
ew thread
SVN: [11662] branches/rewrite/pywikibot/families/wikia_family.py
by legoktm@svn.wikimedia.org
18 Jun '13
18 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11662
Revision: 11662 Author: legoktm Date: 2013-06-18 07:30:56 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Bump version, update from trunk r11655 Modified Paths: -------------- branches/rewrite/pywikibot/families/wikia_family.py Modified: branches/rewrite/pywikibot/families/wikia_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikia_family.py 2013-06-18 07:23:06 UTC (rev 11661) +++ branches/rewrite/pywikibot/families/wikia_family.py 2013-06-18 07:30:56 UTC (rev 11662) @@ -20,7 +20,7 @@ return u'
www.wikia.com
' def version(self, code): - return "1.16.5" + return "1.19.6" def scriptpath(self, code): return ''
1
0
0
0
SVN: [11661] branches/rewrite/tests/page_tests.py
by legoktm@svn.wikimedia.org
18 Jun '13
18 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11661
Revision: 11661 Author: legoktm Date: 2013-06-18 07:23:06 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Add a unit test to verify datatype and the datavalue formatter Modified Paths: -------------- branches/rewrite/tests/page_tests.py Modified: branches/rewrite/tests/page_tests.py =================================================================== --- branches/rewrite/tests/page_tests.py 2013-06-18 06:57:42 UTC (rev 11660) +++ branches/rewrite/tests/page_tests.py 2013-06-18 07:23:06 UTC (rev 11661) @@ -310,6 +310,10 @@ prop = pywikibot.PropertyPage(repo, 'Property:P21') self.assertEqual(prop.getType(), 'wikibase-item') self.assertEqual(prop.namespace(), 120) + claim = pywikibot.Claim(repo, 'p21') + self.assertRaises(ValueError, claim.setTarget, value="test") + claim.setTarget(pywikibot.ItemPage(repo, 'q1')) + self.assertEqual(claim._formatDataValue(), {'entity-type': 'item', 'numeric-id': 1}) def testItemPageExtensionability(self): class MyItemPage(pywikibot.ItemPage):
1
0
0
0
SVN: [11660] branches/rewrite/pywikibot
by legoktm@svn.wikimedia.org
18 Jun '13
18 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11660
Revision: 11660 Author: legoktm Date: 2013-06-18 06:57:42 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Move the datavalue formatting into a single function in the claim class Modified Paths: -------------- branches/rewrite/pywikibot/page.py branches/rewrite/pywikibot/site.py Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-06-18 06:28:08 UTC (rev 11659) +++ branches/rewrite/pywikibot/page.py 2013-06-18 06:57:42 UTC (rev 11660) @@ -2737,7 +2737,26 @@ self.on_item.lastrevid = data['pageinfo']['lastrevid'] self.sources.append(source) + def _formatDataValue(self): + """ + Format the target into the proper JSON datavalue that Wikibase wants + """ + if self.getType() == 'wikibase-item': + value = {'entity-type': 'item', + 'numeric-id': self.getTarget().getID(numeric=True)} + elif self.getType() == 'string': + value = self.getTarget() + elif self.getType() == 'commonsMedia': + value = self.getTarget().title(withNamespace=False) + elif self.getType() == 'globecoordinate': + value = self.getTarget().toWikibase() + else: + raise NotImplementedError('%s datatype is not supported yet.' % self.getType()) + return value + + + class Revision(object): """A structure holding information about a single revision of a Page.""" def __init__(self, revid, timestamp, user, anon=False, comment=u"", Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2013-06-18 06:28:08 UTC (rev 11659) +++ branches/rewrite/pywikibot/site.py 2013-06-18 06:57:42 UTC (rev 11660) @@ -3403,17 +3403,7 @@ if bot: params['bot'] = 1 if claim.getSnakType() == 'value': - if claim.getType() == 'wikibase-item': - params['value'] = json.dumps({'entity-type': 'item', - 'numeric-id': claim.getTarget().getID(numeric=True)}) - elif claim.getType() == 'string': - params['value'] = json.dumps(claim.getTarget()) - elif claim.getType() == 'commonsMedia': - params['value'] = json.dumps(claim.getTarget().title(withNamespace=False)) - elif claim.getType() == 'globecoordinate': - params['value'] = json.dumps(claim.getTarget().toWikibase()) - else: - raise NotImplementedError('%s datatype is not supported yet.' % claim.getType()) + params['value'] = json.dumps(claim._formatDataValue()) params['token'] = self.token(item, 'edit') req = api.Request(site=self, **params) data = req.submit() @@ -3444,18 +3434,7 @@ params['bot'] = 1 params['token'] = self.token(claim, 'edit') if snaktype == 'value': - #This code is repeated from above, maybe it should be it's own function? - if claim.getType() == 'wikibase-item': - params['value'] = json.dumps({'entity-type': 'item', - 'numeric-id': claim.getTarget().getID(numeric=True)}) - elif claim.getType() == 'string': - params['value'] = json.dumps(claim.getTarget()) - elif claim.getType() == 'commonsMedia': - params['value'] = json.dumps(claim.getTarget().title(withNamespace=False)) - elif claim.getType() == 'globecoordinate': - params['value'] = json.dumps(claim.getTarget().toWikibase()) - else: - raise NotImplementedError('%s datatype is not supported yet.' % claim.getType()) + params['value'] = json.dumps(claim._formatDataValue()) for arg in kwargs: #TODO: Get the lastrevid from the item @@ -3491,13 +3470,11 @@ #build up the snak if source.getType() == 'wikibase-item': datavalue = {'type': 'wikibase-entityid', - 'value': {'entity-type': 'item', - 'numeric-id': source.getTarget().getID(numeric=True), - }, + 'value': source._formatDataValue(), } elif source.getType() == 'string': datavalue = {'type': 'string', - 'value': source.getTarget(), + 'value': source._formatDataValue(), } else: raise NotImplementedError('%s datatype is not supported yet.' % claim.getType())
1
0
0
0
SVN: [11659] branches/rewrite/pywikibot/data/api.py
by legoktm@svn.wikimedia.org
18 Jun '13
18 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11659
Revision: 11659 Author: legoktm Date: 2013-06-18 06:28:08 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Convert the dim to int since the API provides a string Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2013-06-18 06:25:19 UTC (rev 11658) +++ branches/rewrite/pywikibot/data/api.py 2013-06-18 06:28:08 UTC (rev 11659) @@ -978,7 +978,7 @@ lon=co['lon'], typ=co.get('type', ''), name=co['name'], - dim=co['dim'], + dim=int(co['dim']), globe=co.get('globe', 'earth'), # See [[gerrit:67886]] ) coords.append(coord)
1
0
0
0
SVN: [11658] branches/rewrite/pywikibot
by legoktm@svn.wikimedia.org
18 Jun '13
18 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11658
Revision: 11658 Author: legoktm Date: 2013-06-18 06:25:19 +0000 (Tue, 18 Jun 2013) Log Message: ----------- Fix bug with bots editconflicting themselves on Wikidata By ensuring that the claim knows what page it's on, we can pass the correct revid when adding sources/stuff Modified Paths: -------------- branches/rewrite/pywikibot/page.py branches/rewrite/pywikibot/site.py Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-06-17 11:38:24 UTC (rev 11657) +++ branches/rewrite/pywikibot/page.py 2013-06-18 06:25:19 UTC (rev 11658) @@ -2468,7 +2468,9 @@ for pid in self._content['claims']: self.claims[pid] = list() for claim in self._content['claims'][pid]: - self.claims[pid].append(Claim.fromJSON(self.repo, claim)) + c = Claim.fromJSON(self.repo, claim) + c.on_item = self + self.claims[pid].append(c) #sitelinks self.sitelinks = {} @@ -2555,6 +2557,7 @@ @type bot bool """ self.repo.addClaim(self, claim, bot=bot) + claim.on_item = self def removeClaims(self, claims, **kwargs): """ @@ -2617,6 +2620,7 @@ self.sources = [] self.target = None self.snaktype = 'value' + self.on_item = None # The item it's on @staticmethod def fromJSON(site, data): @@ -2730,6 +2734,7 @@ """ data = self.repo.editSource(self, source, new=True, **kwargs) source.hash = data['reference']['hash'] + self.on_item.lastrevid = data['pageinfo']['lastrevid'] self.sources.append(source) Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2013-06-17 11:38:24 UTC (rev 11657) +++ branches/rewrite/pywikibot/site.py 2013-06-18 06:25:19 UTC (rev 11658) @@ -3481,6 +3481,8 @@ params = dict(action='wbsetreference', statement=claim.snak, ) + if claim.on_item: # I can't think of when this would be false, but lets be safe + params['baserevid'] = claim.on_item.lastrevid if bot: params['bot'] = 1 params['token'] = self.token(claim, 'edit')
1
0
0
0
SVN: [11657] branches/rewrite/scripts/i18n
by siebrand@svn.wikimedia.org
17 Jun '13
17 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11657
Revision: 11657 Author: siebrand Date: 2013-06-17 11:38:24 +0000 (Mon, 17 Jun 2013) Log Message: ----------- Localisation updates from
http://translatewiki.net
. Modified Paths: -------------- branches/rewrite/scripts/i18n/archivebot.py branches/rewrite/scripts/i18n/category.py branches/rewrite/scripts/i18n/delete.py branches/rewrite/scripts/i18n/editarticle.py branches/rewrite/scripts/i18n/featured.py branches/rewrite/scripts/i18n/pywikibot.py branches/rewrite/scripts/i18n/thirdparty.py branches/rewrite/scripts/i18n/unlink.py branches/rewrite/scripts/i18n/weblinkchecker.py Modified: branches/rewrite/scripts/i18n/archivebot.py =================================================================== --- branches/rewrite/scripts/i18n/archivebot.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/archivebot.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -239,6 +239,10 @@ 'et': { 'archivebot-older-than': u'vanem kui', }, + # Author: Theklan + 'eu': { + 'archivebot-older-than': u'hau baino zaharragoak:', + }, # Author: Mjbmr # Author: ZxxZxxZ 'fa': { Modified: branches/rewrite/scripts/i18n/category.py =================================================================== --- branches/rewrite/scripts/i18n/category.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/category.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -386,7 +386,7 @@ 'category-removing': u'Bot: Yn ei dynnu o %(oldcat)s', 'category-was-moved': u'Robot: Symudwyd y categori i [[:Category:%(newcat)s|%(title)s]]', 'category-renamed': u'Robot: Symudwyd o %s. Awduron: %s', - 'category-section-title': u'Hanes hen dudalennau %(oldcat)', + 'category-section-title': u'Hanes tudalen y cyn-gategori %(oldcat)s', 'category-listifying': u'Bot: Yn rhestru cynnwys %(fromcat)s (%(num)d o gofnodion)', }, # Author: Christian List @@ -1022,9 +1022,11 @@ # Author: Cyklopas # Author: Eitvys200 # Author: Hugo.arg + # Author: Mantak111 'lt': { 'category-changing': u'Robotas: Keičiama %(oldcat)s į %(newcat)s', 'category-adding': u'Robotas: Pridedama kategorija [[:Category:%(newcat)s|%(newcat)s]]', + 'category-also-in': u'(taip pat ir %(alsocat)s)', 'category-was-disbanded': u'robotas: kategorija išformuota', 'category-replacing': u'robotas: kategorija %(oldcat)s keičiama į %(newcat)s', 'category-removing': u'robotas: šalinama iš %(oldcat)s', @@ -1754,8 +1756,9 @@ 'ur': { 'category-adding': u'روبالہ: جمع category [[:Category:%(newcat)s|%(newcat)s]]', }, + # Author: Sociologist 'uz': { - 'category-adding': u'Bot: Qoʻshdi category [[:Category:%(newcat)s|%(newcat)s]]', + 'category-adding': u'Bot: Turkum qoʻshish [[:Category:%(newcat)s|%(newcat)s]]', }, # Author: Alunardon90 # Author: Candalua Modified: branches/rewrite/scripts/i18n/delete.py =================================================================== --- branches/rewrite/scripts/i18n/delete.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/delete.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -124,14 +124,15 @@ 'delete-from-file': u'Robot smazal podle seznamu', 'delete-linked-pages': u'Robot smazal vše odkazované z %(page)s', }, + # Author: Lloffiwr # Author: Pwyll # Author: Robin Owain 'cy': { - 'delete-images': u'Robot:Wrthi\'n dileu pob delwedd ar dudalen %(tudalen)nau', - 'delete-referring-pages': u'Robot:Wrthi\'n dileu pob tudalen sy\'n cyfeirio wrth % (tudalen)nau', - 'delete-from-category': u'Robot: Wrthi\'n dileu pob tudalen o gategori %(page)', + 'delete-images': u'Robot: Yn dileu pob delwedd ar y dudalen %(page)s', + 'delete-referring-pages': u'Robot: Yn dileu pob tudalen sy\'n cysylltu oddi wrth %(page)s', + 'delete-from-category': u'Robot: Yn dileu pob tudalen yn y categori %(page)s', 'delete-from-file': u'Robot: Yn dileu rhestr o ffeiliau.', - 'delete-linked-pages': u'Robot: Yn dileu tudalennau wedi\'u cysylltu o %(page)', + 'delete-linked-pages': u'Robot: Yn dileu yr holl dudalennau wedi\'u cysylltu o %(page)s', }, # Author: Christian List # Author: Kaare Modified: branches/rewrite/scripts/i18n/editarticle.py =================================================================== --- branches/rewrite/scripts/i18n/editarticle.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/editarticle.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -49,7 +49,7 @@ }, # Author: Aftab1995 'bn': { - 'editarticle-edit': u'রোবোট সহ ম্যানুয়াল সম্পাদনা: %(description)s', + 'editarticle-edit': u'রোবটের সাথে ম্যানুয়াল সম্পাদনা: %(description)s', }, # Author: Fulup 'br': { Modified: branches/rewrite/scripts/i18n/featured.py =================================================================== --- branches/rewrite/scripts/i18n/featured.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/featured.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -119,12 +119,13 @@ 'featured-featured': u'робот: суйласа илнӗ статья %(page)s', 'featured-former': u'робот: суйласа илнӗ статья пулнӑ %(page)s', }, + # Author: Lloffiwr # Author: Robin Owain 'cy': { 'featured-good': u'Robot: Mae %(page)s yn erthygl dda', 'featured-list': u'Robot: Mae %(page)s yn rhestr arbennig', 'featured-featured': u'Robot: Mae %(page)s yn erthygl ddethol', - 'featured-former': u'Robot: Mae %(pages)s yn gyn-erthygl arbennig', + 'featured-former': u'Robot: Mae %(page)s yn gyn-erthygl arbennig', }, # Author: Christian List # Author: Emaus Modified: branches/rewrite/scripts/i18n/pywikibot.py =================================================================== --- branches/rewrite/scripts/i18n/pywikibot.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/pywikibot.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -135,11 +135,12 @@ 'pywikibot-enter-category-name': u'Prosím, zadejte jméno kategorie:', 'pywikibot-enter-finished-browser': u'Po ukončení práce v prohlížeči zmáčněte Enter.', }, + # Author: Lloffiwr # Author: Robin Owain 'cy': { 'pywikibot-enter-xml-filename': u'Nodwch enwffeil y gronfa XML', 'pywikibot-enter-page-processing': u'Pa dudalen ddylem ei phrosesu?', - 'pywikibot-enter-file-links-processing': u'Dolennau i ba tudalen delwedd ddylid gael ei phrosesu?', + 'pywikibot-enter-file-links-processing': u'I ba dudalen ffeil y dylid prosesu\'r dolenni?', 'pywikibot-enter-namespace-number': u'Nodwch rif y "namespace"', 'pywikibot-enter-new-text': u'Nodwch y testun newydd', 'pywikibot-enter-category-name': u'Nodwch enw\'r categori:', @@ -397,6 +398,7 @@ # Author: Hugo.arg # Author: Mantak111 'lt': { + 'pywikibot-enter-xml-filename': u'Prašome įvesti XML iškelties failo vardą:\n:', 'pywikibot-enter-page-processing': u'Kuris puslapis turėtų būti tvarkomas?', 'pywikibot-enter-namespace-number': u'Įvestkite vardų srities numerį:', 'pywikibot-enter-new-text': u'Įveskite naują tekstą:', @@ -561,11 +563,12 @@ 'pywikibot-enter-new-text': u'කරුණාකර නව පෙළ යොදන්න:', 'pywikibot-enter-category-name': u'කරුණාකර ප්රවර්ග නාමය යොදන්න:', }, + # Author: Dbc334 # Author: Irena Plahuta 'sl': { 'pywikibot-enter-xml-filename': u'Prosimo, vstavite XML ime shranjene datoteke.', 'pywikibot-enter-page-processing': u'Katera stran naj bo obdelana?', - 'pywikibot-enter-file-links-processing': u'Povezava do katere strani naj bo obdelana?', + 'pywikibot-enter-file-links-processing': u'Povezava do katere strani datoteke naj bo obdelana?', 'pywikibot-enter-namespace-number': u'Prosimo, vnesite številko imenskega prostora.', 'pywikibot-enter-new-text': u'Prosimo, vnesite novo besedilo:', 'pywikibot-enter-category-name': u'Prosimo, vnesite ime kategorije:', Modified: branches/rewrite/scripts/i18n/thirdparty.py =================================================================== --- branches/rewrite/scripts/i18n/thirdparty.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/thirdparty.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -373,9 +373,16 @@ 'cv': { 'thirdparty-drtrigonbot-sum_disc-summary-head': u'робот', }, + # Author: Lloffiwr # Author: Robin Owain 'cy': { 'thirdparty-drtrigonbot-sum_disc-summary-head': u'robot', + 'thirdparty-drtrigonbot-sum_disc-parse-warning': u':* Neges rhybuddio oddi wrth robot: %(page)s "\'\'%(warning)s\'\'"', + 'thirdparty-drtrigonbot-sum_disc-notify-new': u'Trafodaeth newydd', + 'thirdparty-drtrigonbot-sum_disc-parse-notify': u':* %(notify)s: <span class="plainlinks">[%(page_link)s %(page)s]</span> - y golygiad diweddaraf gan [[User:%(user)s]] (%(time)s)', + 'thirdparty-drtrigonbot-sum_disc-notify-notify': u'Hysbysiad', + 'thirdparty-drtrigonbot-subster-summary-mod': u'yn diweddaru %(tags)s tag(s)', + 'thirdparty-drtrigonbot-sum_disc-notify-closed': u'Caewyd y drafodaeth', }, # Author: Christian List # Author: Kaare @@ -524,8 +531,11 @@ 'thirdparty-drtrigonbot-sum_disc-notify-changed': u'Arutelulehte muudeti', 'thirdparty-drtrigonbot-sum_disc-notify-maintmsg': u'ROBOTI SÕNUM', }, + # Author: Theklan # Author: Unai Fdz. de Betoño 'eu': { + 'thirdparty-drtrigonbot-sum_disc-summary-head': u'bota', + 'thirdparty-drtrigonbot-sum_disc-parse-nonhuman': u'(ez da giza editorerik aurkitu)', 'thirdparty-drtrigonbot-sum_disc-notify-notify': u'Jakinarazpena', }, # Author: Huji Modified: branches/rewrite/scripts/i18n/unlink.py =================================================================== --- branches/rewrite/scripts/i18n/unlink.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/unlink.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -59,6 +59,10 @@ 'cs': { 'unlink-unlinking': u'Robot: Odlinkovávám "%s"', }, + # Author: Lloffiwr + 'cy': { + 'unlink-unlinking': u'Robot: Yn datgysylltu "%s"', + }, # Author: Peter Alberti 'da': { 'unlink-unlinking': u'Robot: fjerner henvisning til "%s"', Modified: branches/rewrite/scripts/i18n/weblinkchecker.py =================================================================== --- branches/rewrite/scripts/i18n/weblinkchecker.py 2013-06-17 05:43:02 UTC (rev 11656) +++ branches/rewrite/scripts/i18n/weblinkchecker.py 2013-06-17 11:38:24 UTC (rev 11657) @@ -71,6 +71,10 @@ 'weblinkchecker-summary': u'Robot: Ohlašuji nedostupný externí odkaz.', 'weblinkchecker-report': u'Během několika automatizovaných běhů byl následující externí odkaz nedostupný. Prosím, ověřte, zda je skutečně nedostupný, a pokud ano, pak jej opravte nebo odstraňte!', }, + # Author: Lloffiwr + 'cy': { + 'weblinkchecker-caption': u'Dolen ddiffrwyth', + }, # Author: Steenth 'da': { 'weblinkchecker-archive_msg': u'Websiden er blevet gemt af Internet Archive. Overvej sammenkædning til en passende arkiverede version: [%(URL)s].', @@ -114,6 +118,10 @@ 'weblinkchecker-summary': u'Teadaanne mittetöötavast välislingist', 'weblinkchecker-report': u'Korduval kontrollimisel on leitud, et järgnev välislink ei tööta. Kontrolli selle toimimist ja vajadusel paranda vigane link.', }, + # Author: Theklan + 'eu': { + 'weblinkchecker-caption': u'Hildako lotura', + }, 'fa': { 'weblinkchecker-archive_msg': u'وبگاه اینترنت آرشیو یک نسخه بایگانی شده از این پیوند دارد لطفا از آن استفاده نمایید:[%(URL)s]', 'weblinkchecker-caption': u'پیوند مرده', @@ -313,6 +321,7 @@ # Author: Dbc334 'sl': { 'weblinkchecker-caption': u'Mrtva povezava', + 'weblinkchecker-summary': u'Robot: Poročanje o nedosegljivi zunanji povezavi', }, # Author: Rancher 'sr': {
1
0
0
0
SVN: [11656] branches/rewrite/pywikibot/page.py
by legoktm@svn.wikimedia.org
17 Jun '13
17 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11656
Revision: 11656 Author: legoktm Date: 2013-06-17 05:43:02 +0000 (Mon, 17 Jun 2013) Log Message: ----------- The ID should always be lowercase, was accidentally removed in r11600. Modified Paths: -------------- branches/rewrite/pywikibot/page.py Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-06-16 19:23:36 UTC (rev 11655) +++ branches/rewrite/pywikibot/page.py 2013-06-17 05:43:02 UTC (rev 11656) @@ -2430,7 +2430,7 @@ site=pywikibot.Site & title=Main Page """ super(ItemPage, self).__init__(site, title, ns=0) - self.id = title + self.id = title.lower() @classmethod def fromPage(cls, page):
1
0
0
0
SVN: [11655] trunk/pywikipedia/families/wikia_family.py
by lcawte@svn.wikimedia.org
16 Jun '13
16 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11655
Revision: 11655 Author: lcawte Date: 2013-06-16 19:23:36 +0000 (Sun, 16 Jun 2013) Log Message: ----------- Bump version Modified Paths: -------------- trunk/pywikipedia/families/wikia_family.py Modified: trunk/pywikipedia/families/wikia_family.py =================================================================== --- trunk/pywikipedia/families/wikia_family.py 2013-06-16 08:32:31 UTC (rev 11654) +++ trunk/pywikipedia/families/wikia_family.py 2013-06-16 19:23:36 UTC (rev 11655) @@ -39,7 +39,7 @@ return u'
www.wikia.com
' def version(self, code): - return "1.16.5" + return "1.19.6" def scriptpath(self, code): return ''
1
0
0
0
SVN: [11654] branches/rewrite/pywikibot/data/api.py
by legoktm@svn.wikimedia.org
16 Jun '13
16 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11654
Revision: 11654 Author: legoktm Date: 2013-06-16 08:32:31 +0000 (Sun, 16 Jun 2013) Log Message: ----------- Bugfix for r11653, "type" parameter might not always be set Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2013-06-16 07:49:27 UTC (rev 11653) +++ branches/rewrite/pywikibot/data/api.py 2013-06-16 08:32:31 UTC (rev 11654) @@ -976,7 +976,7 @@ for co in pagedict['coordinates']: coord = pywikibot.Coordinate(lat=co['lat'], lon=co['lon'], - typ=co['type'], + typ=co.get('type', ''), name=co['name'], dim=co['dim'], globe=co.get('globe', 'earth'), # See [[gerrit:67886]]
1
0
0
0
SVN: [11653] branches/rewrite/pywikibot
by legoktm@svn.wikimedia.org
16 Jun '13
16 Jun '13
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11653
Revision: 11653 Author: legoktm Date: 2013-06-16 07:49:27 +0000 (Sun, 16 Jun 2013) Log Message: ----------- Overhaul Coordinate support, implement GeoData extension * Added support for fetching a page's coordinates * Wikidata globes are now stored in the family file * Conversion between GeoData's "dim" to Wikibase's "precision" needs work Modified Paths: -------------- branches/rewrite/pywikibot/__init__.py branches/rewrite/pywikibot/data/api.py branches/rewrite/pywikibot/families/wikidata_family.py branches/rewrite/pywikibot/page.py branches/rewrite/pywikibot/site.py Modified: branches/rewrite/pywikibot/__init__.py =================================================================== --- branches/rewrite/pywikibot/__init__.py 2013-06-16 07:39:06 UTC (rev 11652) +++ branches/rewrite/pywikibot/__init__.py 2013-06-16 07:49:27 UTC (rev 11653) @@ -93,60 +93,90 @@ For now its just being used for DataSite, but in the future we can use it for the GeoData extension. """ - def __init__(self, lat, lon, alt=None, precision=0.1, globe='earth'): + def __init__(self, lat, lon, alt=None, precision=None, globe='earth', + typ="", name="", dim=None, site=None): """ @param lat: Latitude @type lat: float @param lon: Longitute - @param lon: float + @type lon: float @param alt: Altitute? TODO FIXME @param precision: precision @type precision: float - @param globe: Which Wikidata globe to use + @param globe: Which globe the point is on @type globe: str + @param typ: The type of coordinate point + @type typ: str + @param name: The name + @type name: str + @param dim: Dimension (in meters) + @type dim: int """ self.lat = lat self.lon = lon self.alt = alt self.precision = precision - self.globe = globe + self.globe = globe.lower() + self.type = typ + self.name = name + self.dim = dim + if not site: + self.site = Site().data_repository() + else: + self.site = site #Copied from [[mw:Extension:GeoData]] - if not globe in ['earth', 'mercury', 'venus', 'moon', - 'mars', 'phobos', 'deimos', 'ganymede', - 'callisto', 'io', 'europa', 'mimas', - 'enceladus', 'tethys', 'dione', - 'rhea', 'titan', 'hyperion', 'iapetus', - 'phoebe', 'miranda', 'ariel', 'umbriel', - 'titania', 'oberon', 'triton', 'pluto']: - raise ValueError(u"%s is not a supported globe." % globe) + if not self.globe in ['earth', 'mercury', 'venus', 'moon', + 'mars', 'phobos', 'deimos', 'ganymede', + 'callisto', 'io', 'europa', 'mimas', + 'enceladus', 'tethys', 'dione', + 'rhea', 'titan', 'hyperion', 'iapetus', + 'phoebe', 'miranda', 'ariel', 'umbriel', + 'titania', 'oberon', 'triton', 'pluto']: + raise ValueError(u"%s is not a supported globe." % self.globe) + def __repr__(self): + string = 'Coordinate(%s, %s' % (self.lat, self.lon) + if self.globe != 'earth': + string += ', globe="%s"' % self.globe + string += ')' + return string + def toWikibase(self): """ Function which converts the data to a JSON object for the Wikibase API. FIXME Should this be in the DataSite object? """ - globes = {'earth': '
http://www.wikidata.org/entity/Q2
'} - if not self.globe in globes: + if not self.globe in self.site.globes(): raise NotImplementedError(u"%s is not supported in Wikibase yet." % self.globe) return {'latitude': self.lat, 'longitude': self.lon, 'altitude': self.alt, - 'globe': globes[self.globe], + 'globe': self.site.globes()[self.globe], 'precision': self.precision, } @staticmethod - def fromWikibase(data): + def fromWikibase(data, site): """Constructor to create an object from Wikibase's JSON output""" - globes = {'
http://www.wikidata.org/entity/Q2
': 'earth'} - # TODO FIXME ^ + globes = {} + for k in site.globes(): + globes[site.globes()[k]] = k + return Coordinate(data['latitude'], data['longitude'], - data['altitude'], data['precision'], - globes[data['globe']]) + data['altitude'], data['precision'], + globes[data['globe']], site=site) + def dimToPrecision(self): + """Convert dim from GeoData to Wikibase's Precision""" + raise NotImplementedError + def precisionToDim(self): + """Convert precision from Wikibase to GeoData's dim""" + raise NotImplementedError + + def deprecated(instead=None): """Decorator to output a method deprecation warning. Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2013-06-16 07:39:06 UTC (rev 11652) +++ branches/rewrite/pywikibot/data/api.py 2013-06-16 07:49:27 UTC (rev 11653) @@ -971,7 +971,20 @@ links.append(link) page._langlinks = links + if "coordinates" in pagedict: + coords = [] + for co in pagedict['coordinates']: + coord = pywikibot.Coordinate(lat=co['lat'], + lon=co['lon'], + typ=co['type'], + name=co['name'], + dim=co['dim'], + globe=co.get('globe', 'earth'), # See [[gerrit:67886]] + ) + coords.append(coord) + page._coords = coords + if __name__ == "__main__": from pywikibot import Site, logging logging.getLogger("pywiki.data.api").setLevel(logging.DEBUG) Modified: branches/rewrite/pywikibot/families/wikidata_family.py =================================================================== --- branches/rewrite/pywikibot/families/wikidata_family.py 2013-06-16 07:39:06 UTC (rev 11652) +++ branches/rewrite/pywikibot/families/wikidata_family.py 2013-06-16 07:49:27 UTC (rev 11653) @@ -26,3 +26,7 @@ else: return ('wikidata', 'wikidata') if code == 'wikidata' else ('repo', 'wikidata') + + def globes(self, code): + """Supported globes for Coordinate datatype""" + return {'earth': '
http://www.wikidata.org/entity/Q2
'} Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-06-16 07:39:06 UTC (rev 11652) +++ branches/rewrite/pywikibot/page.py 2013-06-16 07:49:27 UTC (rev 11653) @@ -1088,6 +1088,20 @@ """ return self.site.page_extlinks(self, step=step, total=total) + def coordinates(self, primary_only=False): + """Return a list of Coordinate objects for points + on the page using [[mw:Extension:GeoData]] + + @param primary_only: Only return the coordinate indicated to be primary + @return: A list of Coordinate objects + """ + if not hasattr(self, '_coords'): + self.site.loadcoordinfo(self) + if primary_only: + return self._coords[0] + else: + return self._coords + def getRedirectTarget(self): """Return a Page object for the target this Page redirects to. @@ -2624,7 +2638,7 @@ claim.target = ImagePage(site.image_repository(), 'File:' + data['mainsnak']['datavalue']['value']) elif claim.getType() == 'globecoordinate': - claim.target = pywikibot.Coordinate.fromWikibase(data['mainsnak']['datavalue']['value']) + claim.target = pywikibot.Coordinate.fromWikibase(data['mainsnak']['datavalue']['value'], site) else: #This covers string type claim.target = data['mainsnak']['datavalue']['value'] Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2013-06-16 07:39:06 UTC (rev 11652) +++ branches/rewrite/pywikibot/site.py 2013-06-16 07:49:27 UTC (rev 11653) @@ -1182,6 +1182,24 @@ continue api.update_page(page, pageitem) + def loadcoordinfo(self, page): + """Load [[mw:Extension:GeoData]] info""" + #prop=coordinates&titles=Wikimedia Foundation&format=jsonfm&coprop=type|name|dim|country|region&coprimary=all + title = page.title(withSection=False) + query = self._generator(api.PropertyGenerator, + type_arg="coordinates", + titles=title.encode(self.encoding()), + coprop=['type', 'name', 'dim', + 'country', 'region'], + coprimary='all') + for pageitem in query: + if not self.sametitle(pageitem['title'], title): + pywikibot.warning( + u"loadcoordinfo: Query on %s returned data on '%s'" + % (page, pageitem['title'])) + continue + api.update_page(page, pageitem) + def loadimageinfo(self, page, history=False): """Load image info from api and save in page attributes
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
517
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
Results per page:
10
25
50
100
200