Bugs item #1782842, was opened at 2007-08-27 21:10
Message generated for change (Settings changed) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1782842&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 6
Private: No
Submitted By: Francesco Cosoleto (cosoleto)
Assigned to: Nobody/Anonymous (nobody)
Summary: NoPage error in getEditPage() when page exists
Initial Comment:
In getEditPage() a NoPage error can occur when HTML page isn't 100% downloaded due to bad connection. Maybe we can replace 'RversionTab' related code with a simple "if len(text[i1:i2]) <= 1" or "if text[i1:i2] == '\n')". Good? Better idea?
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-10-09 21:55
Message:
I think current revision works, due to content-length check, though a new
download always start from the beginning when "</textarea>" is recevied
correctly. This isn't often a good choice, but the issue is closeable.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-30 16:31
Message:
Logged In: YES
user_id=181280
Originator: YES
Using this fix:
if not matchVersionTab:
- raise NoPage(self.site(), self.aslink(forceInterwiki =
True))
+ if not (len(text[i1:i2].rstrip()) > 0 and self._namespace !=
8):
+ raise NoPage(self.site(), self.aslink(forceInterwiki =
True))
An incorrect NoPage error still can occur when those conditions are
satisfied: you get a blanked page, <textarea> field correctly recevied,
then connection closed before version history tab code is transmitted. But
that is extremely rare, I guess.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-14 20:14
Message:
Logged In: YES
user_id=181280
Originator: YES
Example of bug consequence:
http://it.wikipedia.org/w/index.php?title=Utente:RevertBot/Report_agosto_20…
copyright_put.py overwrite original page with new text instead of work in
append mode.
Suggested patch don't work with 'MediaWiki' namespace. Anyway if textarea
field is filled getEditPage() should not raise a NoPage exception.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-14 20:11
Message:
Logged In: YES
user_id=181280
Originator: YES
Example of bug consequence:
http://it.wikipedia.org/w/index.php?title=Utente:RevertBot/Report_agosto_20…
copyright_put.py overwrite original page with new text instead of work in
append mode.
Suggested patch don't work with 'MediaWiki' namespace. Anyway if textarea
field is filled getEditPage() should not raise a NoPage exception.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1782842&group_…
Bugs item #1782842, was opened at 2007-08-27 21:10
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1782842&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 6
Private: No
Submitted By: Francesco Cosoleto (cosoleto)
Assigned to: Nobody/Anonymous (nobody)
Summary: NoPage error in getEditPage() when page exists
Initial Comment:
In getEditPage() a NoPage error can occur when HTML page isn't 100% downloaded due to bad connection. Maybe we can replace 'RversionTab' related code with a simple "if len(text[i1:i2]) <= 1" or "if text[i1:i2] == '\n')". Good? Better idea?
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-10-09 21:55
Message:
I think current revision works, due to content-length check, though a new
download always start from the beginning when "</textarea>" is recevied
correctly. This isn't often a good choice, but the issue is closeable.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-30 16:31
Message:
Logged In: YES
user_id=181280
Originator: YES
Using this fix:
if not matchVersionTab:
- raise NoPage(self.site(), self.aslink(forceInterwiki =
True))
+ if not (len(text[i1:i2].rstrip()) > 0 and self._namespace !=
8):
+ raise NoPage(self.site(), self.aslink(forceInterwiki =
True))
An incorrect NoPage error still can occur when those conditions are
satisfied: you get a blanked page, <textarea> field correctly recevied,
then connection closed before version history tab code is transmitted. But
that is extremely rare, I guess.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-14 20:14
Message:
Logged In: YES
user_id=181280
Originator: YES
Example of bug consequence:
http://it.wikipedia.org/w/index.php?title=Utente:RevertBot/Report_agosto_20…
copyright_put.py overwrite original page with new text instead of work in
append mode.
Suggested patch don't work with 'MediaWiki' namespace. Anyway if textarea
field is filled getEditPage() should not raise a NoPage exception.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-14 20:11
Message:
Logged In: YES
user_id=181280
Originator: YES
Example of bug consequence:
http://it.wikipedia.org/w/index.php?title=Utente:RevertBot/Report_agosto_20…
copyright_put.py overwrite original page with new text instead of work in
append mode.
Suggested patch don't work with 'MediaWiki' namespace. Anyway if textarea
field is filled getEditPage() should not raise a NoPage exception.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1782842&group_…
Revision: 5941
Author: filnik
Date: 2008-10-09 16:18:16 +0000 (Thu, 09 Oct 2008)
Log Message:
-----------
Updating the duplicate function, improve a bit the smartdetection
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2008-10-07 20:09:06 UTC (rev 5940)
+++ trunk/pywikipedia/checkimages.py 2008-10-09 16:18:16 UTC (rev 5941)
@@ -2,9 +2,7 @@
# -*- coding: utf-8 -*-
"""
Script to check recently uploaded files. This script checks if a file
-description is present and if there is only a {{PD}} tag in the description.
-It will tag a file "no source" in the former case, and request the uploader
-to choose a more specific license in the latter case.
+description is present and if there are other problems in the image's description.
This script will have to be configured for each language. Please submit
translations as addition to the pywikipediabot framework.
@@ -18,7 +16,9 @@
-commons - The Bot will check if an image on Commons has the same name
and if true it report the image.
- -duplicates - Checking if the image has duplicates.
+ -duplicates[:#] - Checking if the image has duplicates (if arg, set how many rollback
+ wait before reporting the image in the report instead of tag the image)
+ default: 1 rollback.
-duplicatesreport - Report the duplicates in a log *AND* put the template in the images.
@@ -357,10 +357,11 @@
'ta': None,
}
# Stub - will make it better in future, work in progress.
+# put __image__ if you want only one image, __images__ if you want the whole list
duplicatesText = {
'commons':u'\n{{Dupe|__image__}}',
'en':None,
- 'it':u'\n{{Cancella subito|Immagine doppia di [[:__image__]]}}',
+ 'it':u'\n{{Progetto:Coordinamento/Immagini/Bot/Template duplicati|__images__}}',
'ko':'분류:그림 저작권 틀',
}
duplicate_user_talk_head = {
@@ -386,7 +387,7 @@
duplicatesRegex = {
'commons':r'\{\{(?:[Tt]emplate:|)[Dd]upe[|}]',
'en':None,
- 'it':r'\{\{(?:[Tt]emplate:|)[Cc]ancella[ _]subito[|}]',
+ 'it':r'\{\{(?:[Tt]emplate:|)[Pp]rogetto:[Cc]oordinamento/Immagini/Bot/Template duplicati[|}]',
}
category_with_licenses = {
@@ -481,7 +482,8 @@
# Here there is the main class.
class main:
- def __init__(self, site, logFulNumber = 25000, sendemailActive = False, duplicatesReport = False):
+ def __init__(self, site, logFulNumber = 25000, sendemailActive = False,
+ duplicatesReport = False, smartdetection = False):
""" Constructor, define some global variable """
self.site = site
self.logFulNumber = logFulNumber
@@ -506,7 +508,10 @@
self.duplicatesReport = duplicatesReport
image_n = self.site.image_namespace()
self.image_namespace = "%s:" % image_n # Example: "User_talk:"
- self.list_licenses = self.load_licenses()
+ # Load the licenses only once, so do it once
+ self.smartdetection = smartdetection
+ if self.smartdetection:
+ self.list_licenses = self.load_licenses()
def setParameters(self, image):
""" Function to set parameters, now only image but maybe it can be used for others in "future" """
self.image = image
@@ -757,6 +762,20 @@
encodedTitle = title.encode(self.site.encoding())
return urllib.quote(encodedTitle)
+ def countEdits(self, pagename, userlist):
+ # self.botolist
+ if type(userlist) == type(''):
+ userlist = [userlist]
+ page = wikipedia.Page(self.site, pagename)
+ history = page.getVersionHistory()
+ user_list = list()
+ for data in history:
+ user_list.append(data[2])
+ number_edits = 0
+ for username in userlist:
+ number_edits += user_list.count(username)
+ return number_edits
+
def checkImageOnCommons(self):
""" Checking if the image is on commons """
wikipedia.output(u'Checking if %s is on commons...' % self.image)
@@ -789,13 +808,12 @@
# Problems? No, return True
return True
- def checkImageDuplicated(self):
+ def checkImageDuplicated(self, duplicates_rollback):
""" Function to check the duplicated images. """
# {{Dupe|Image:Blanche_Montel.jpg}}
# Skip the stub images
- # FIXME: Fix this part, this can be really improved
- if 'stub' in self.image.lower() and self.project == 'wikipedia' and self.site.lang == 'it':
- return True # Skip the stub, ok
+ #if 'stub' in self.image.lower() and self.project == 'wikipedia' and self.site.lang == 'it':
+ # return True # Skip the stub, ok
dupText = wikipedia.translate(self.site, duplicatesText)
dupRegex = wikipedia.translate(self.site, duplicatesRegex)
dupTalkHead = wikipedia.translate(self.site, duplicate_user_talk_head)
@@ -813,15 +831,6 @@
wikipedia.output(u'%s has a duplicate! Reporting it...' % self.image)
else:
wikipedia.output(u'%s has %s duplicates! Reporting them...' % (self.image, len(duplicates) - 1))
- if self.duplicatesReport:
- repme = "\n*[[:Image:%s]] has the following duplicates:" % self.convert_to_url(self.image)
- for duplicate in duplicates:
- if self.convert_to_url(duplicate) == self.convert_to_url(self.image):
- continue # the image itself, not report also this as duplicate
- repme += "\n**[[:Image:%s]]" % self.convert_to_url(duplicate)
- result = self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = duplicateRegex)
- if not result:
- return True # If Errors, exit (but continue the check)
if not dupText == None and not dupRegex == None:
time_image_list = list()
time_list = list()
@@ -859,16 +868,50 @@
wikipedia.output(u"Already put the dupe-template in the image's page or in the dupe's page. Skip.")
return True # Ok - No problem. Let's continue the checking phase
older_image_ns = '%s%s' % (self.image_namespace, older_image) # adding the namespace
+ only_report = False # true if the image are not to be tagged as dupes
+
+ # put only one image or the whole list according to the request
+ if '__images__' in dupText:
+ text_for_the_report = re.sub(r'__images__', r'\n%s*[[:%s]]\n' % (string, older_image_ns), dupText)
+ else:
+ text_for_the_report = re.sub(r'__image__', r'%s' % older_image_ns, dupText)
+ # Two iteration: report the "problem" to the user only once (the last)
if len(images_to_tag_list) > 1:
for image_to_tag in images_to_tag_list[:-1]:
- self.report(re.sub(r'__image__', r'%s' % older_image_ns, dupText), image_to_tag,
+ already_reported_in_past = self.countEdits('Image:%s' % image_to_tag, self.botolist)
+ # if you want only one edit, the edit found should be more than 0 -> num - 1
+ if already_reported_in_past > duplicates_rollback - 1:
+ only_report = True
+ break
+ # Delete the image in the list where we're write on
+ text_for_the_report = re.sub(r'\n\*\[\[:%s\]\]' % (self.image_namespace + image_to_tag), '', text_for_the_report)
+ self.report(text_for_the_report, image_to_tag,
commImage = dupComment_image, unver = True)
- if len(images_to_tag_list) != 0:
- self.report(re.sub(r'__image__', r'%s' % older_image_ns, dupText), images_to_tag_list[-1],
- dupTalkText % (older_image_ns, string), dupTalkHead, commTalk = dupComment_talk,
- commImage = dupComment_image, unver = True)
+ if len(images_to_tag_list) != 0 and not only_report:
+ already_reported_in_past = self.countEdits('Image:%s' % images_to_tag_list[-1], self.botolist)
+ # Delete the image in the list where we're write on
+ text_for_the_report = re.sub(r'\n\*\[\[:%s\]\]' % (self.image_namespace + images_to_tag_list[-1]), '', text_for_the_report)
+ # if you want only one edit, the edit found should be more than 0 -> num - 1
+ if already_reported_in_past > duplicates_rollback - 1:
+ only_report = True
+ else:
+ self.report(text_for_the_report, images_to_tag_list[-1],
+ dupTalkText % (older_image_ns, string), dupTalkHead, commTalk = dupComment_talk,
+ commImage = dupComment_image, unver = True)
+ if self.duplicatesReport or only_report:
+ if only_report:
+ repme = "\n*[[:Image:%s]] has the following duplicates ('''forced mode'''):" % self.convert_to_url(self.image)
+ else:
+ repme = "\n*[[:Image:%s]] has the following duplicates:" % self.convert_to_url(self.image)
+ for duplicate in duplicates:
+ if self.convert_to_url(duplicate) == self.convert_to_url(self.image):
+ continue # the image itself, not report also this as duplicate
+ repme += "\n**[[:Image:%s]]" % self.convert_to_url(duplicate)
+ result = self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = duplicateRegex)
+ if not result:
+ return True # If Errors, exit (but continue the check)
if older_image != self.image:
- return False # The image is a duplicate, it will be deleted.
+ return False # The image is a duplicate, it will be deleted. So skip the check-part, useless
return True # Ok - No problem. Let's continue the checking phase
def report_image(self, image_to_report, rep_page = None, com = None, rep_text = None, addings = True, regex = None):
@@ -939,7 +982,7 @@
categories = [page.title() for page in pagegenerators.SubCategoriesPageGenerator(cat)]
categories.append(catName)
list_licenses = list()
- wikipedia.output(u'\n\t...Loading the names of the licenses allowed...\n')
+ wikipedia.output(u'\n\t...Loading the licenses allowed...\n')
for catName in categories:
cat = catlib.Category(wikipedia.getSite(), catName)
gen = pagegenerators.CategorizedPageGenerator(cat)
@@ -1024,8 +1067,12 @@
repeat = False
elif arg == '-commons':
commonsActive = True
- elif arg == '-duplicates':
+ elif arg.startswith('-duplicates'):
duplicatesActive = True
+ if len(arg) == 11:
+ duplicates_rollback = 1
+ elif len(arg) > 11:
+ duplicates_rollback = int(arg[12:])
elif arg == '-duplicatereport':
duplicatesReport = True
elif arg == '-sendemail':
@@ -1150,7 +1197,7 @@
# Main Loop
while 1:
# Defing the Main Class.
- mainClass = main(site, sendemailActive = sendemailActive, duplicatesReport = duplicatesReport)
+ mainClass = main(site, sendemailActive = sendemailActive, duplicatesReport = duplicatesReport, smartdetection = smartdetection)
# Untagged is True? Let's take that generator
if untagged == True:
generator = mainClass.untaggedGenerator(projectUntagged, limit)
@@ -1270,7 +1317,7 @@
continue
# Check if there are duplicates of the image on the project selected
if duplicatesActive == True:
- response2 = mainClass.checkImageDuplicated()
+ response2 = mainClass.checkImageDuplicated(duplicates_rollback)
if response2 == False:
continue
# Is the image already tagged? If yes, no need to double-check, skip
Revision: 5939
Author: filnik
Date: 2008-10-07 16:45:31 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
Fixing the right path where to save the savedata, in order not to save the file outside the right foulder
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2008-10-07 14:45:46 UTC (rev 5938)
+++ trunk/pywikipedia/welcome.py 2008-10-07 16:45:31 UTC (rev 5939)
@@ -653,7 +653,8 @@
numberlog = int(arg[11:])
# TODO: Maybe it's better change the tuple with a dictionary..
wsite = wikipedia.getSite()
- filename = 'welcome-%s-%s.data' % (wsite.family.name, wsite.lang) # file where is stored the random signature index
+ # Filename and pywikipedia path
+ filename = wikipedia.config.datafilepath('welcome-%s-%s.data' % (wsite.family.name, wsite.lang)) # file where is stored the random signature index
if offset_variable and timeoffset_variable:
wikipedia.output('WARING: both -offset and -timeoffset were provided, ignoring -offset')
offset_variable = 0
@@ -722,8 +723,7 @@
welcomer = u'{{subst:Benvenuto}} %s'
welcomed_users = list()
- if savedata and os.path.exists(
- wikipedia.config.datafilepath(filename)):
+ if savedata and os.path.exists(filename):
f = file(filename)
number_user = cPickle.load(f)
yield number_user
@@ -971,6 +971,7 @@
# If recursive, just wait some error or something to get the number
# and save it, otherwise just save the first one.
for number_user in main(settingsBot):
+ #print number_user
pass # number_user get with the for cicle the value
#except wikipedia.BadTitle:
# If the server is down, pywikipediabot raise that error.
Revision: 5938
Author: filnik
Date: 2008-10-07 14:45:46 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
Bugfix, script didn't handle when the hash (in the checkImageOnCommons function) is none. Now it does
Modified Paths:
--------------
trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2008-10-07 14:45:39 UTC (rev 5937)
+++ trunk/pywikipedia/checkimages.py 2008-10-07 14:45:46 UTC (rev 5938)
@@ -764,32 +764,36 @@
regexOnCommons = r"\n\*\[\[:Image:%s\]\] is also on '''Commons''': \[\[commons:Image:.*?\]\]$" % self.image
imagePage = wikipedia.ImagePage(self.site, 'Image:%s' % self.image)
hash_found = imagePage.getHash()
- commons_image_with_this_hash = commons_site.getImagesFromAnHash(hash_found)
- if commons_image_with_this_hash != []:
- wikipedia.output(u'%s is on commons!' % self.image)
- imagePage = wikipedia.ImagePage(self.site, 'Image:%s' % self.image)
- on_commons_text = imagePage.getImagePageHtml()
- if "<div class='sharedUploadNotice'>" in on_commons_text:
- wikipedia.output(u"But, the image doesn't exist on your project! Skip...")
- # Problems? Yes! We have to skip the check part for that image!
- # Because it's on commons but someone has added something on your project.
- return False
- elif 'stemma' in self.image.lower() and self.site.lang == 'it':
- wikipedia.output(u'%s has "stemma" inside, means that it\'s ok.' % self.image)
- return True # Problems? No, it's only not on commons but the image needs a check
+ if hash_found == None:
+ return False # Problems? Yes! Image deleted, no hash found. Skip the image.
+ else:
+ commons_image_with_this_hash = commons_site.getImagesFromAnHash(hash_found)
+ if commons_image_with_this_hash != []:
+ wikipedia.output(u'%s is on commons!' % self.image)
+ imagePage = wikipedia.ImagePage(self.site, 'Image:%s' % self.image)
+ on_commons_text = imagePage.getImagePageHtml()
+ if "<div class='sharedUploadNotice'>" in on_commons_text:
+ wikipedia.output(u"But, the image doesn't exist on your project! Skip...")
+ # Problems? Yes! We have to skip the check part for that image!
+ # Because it's on commons but someone has added something on your project.
+ return False
+ elif 'stemma' in self.image.lower() and self.site.lang == 'it':
+ wikipedia.output(u'%s has "stemma" inside, means that it\'s ok.' % self.image)
+ return True # Problems? No, it's only not on commons but the image needs a check
+ else:
+ repme = "\n*[[:Image:%s]] is also on '''Commons''': [[commons:Image:%s]]" % (self.image, commons_image_with_this_hash[0])
+ self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = regexOnCommons)
+ # Problems? No, return True
+ return True
else:
- repme = "\n*[[:Image:%s]] is also on '''Commons''': [[commons:Image:%s]]" % (self.image, commons_image_with_this_hash[0])
- self.report_image(self.image, self.rep_page, self.com, repme, addings = False, regex = regexOnCommons)
# Problems? No, return True
return True
- else:
- # Problems? No, return True
- return True
def checkImageDuplicated(self):
""" Function to check the duplicated images. """
# {{Dupe|Image:Blanche_Montel.jpg}}
# Skip the stub images
+ # FIXME: Fix this part, this can be really improved
if 'stub' in self.image.lower() and self.project == 'wikipedia' and self.site.lang == 'it':
return True # Skip the stub, ok
dupText = wikipedia.translate(self.site, duplicatesText)
@@ -803,7 +807,7 @@
hash_found = imagePage.getHash()
duplicates = self.site.getImagesFromAnHash(hash_found)
if duplicates == None:
- return False # Error, we need to skip the page.
+ return False # Error, image deleted, no hash found. Skip the image.
if len(duplicates) > 1:
if len(duplicates) == 2:
wikipedia.output(u'%s has a duplicate! Reporting it...' % self.image)
Bugs item #2151078, was opened at 2008-10-07 10:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2151078&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Laurence Parry (greenreaper)
Assigned to: Nobody/Anonymous (nobody)
Summary: _default required for sample disambiguationTemplates
Initial Comment:
I think this or something like it needs to be added to families/README-family.txt as without a _default a crash results when the family is used:
self.disambiguationTemplates = {
'_default': [], # REQUIRED
----
Pywikipedia [http] trunk/pywikipedia (r5935, Oct 05 2008, 15:18:40)
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
----
Traceback (most recent call last):
File "C:\Program Files\Accessories\pywikipedia\interwiki.py", line 1735, in <module>
bot.run()
File "C:\Program Files\Accessories\pywikipedia\interwiki.py", line 1486, in run
self.queryStep()
File "C:\Program Files\Accessories\pywikipedia\interwiki.py", line 1460, in queryStep
self.oneQuery()
File "C:\Program Files\Accessories\pywikipedia\interwiki.py", line 1456, in oneQuery
subject.workDone(self)
File "C:\Program Files\Accessories\pywikipedia\interwiki.py", line 797, in workDone
(skip, alternativePage) = self.disambigMismatch(page)
File "C:\Program Files\Accessories\pywikipedia\interwiki.py", line 670, in disambigMismatch
if self.originPage.isDisambig() and not page.isDisambig():
File "C:\Program Files\Accessories\pywikipedia\wikipedia.py", line 1015, in isDisambig
self.site()._disambigtemplates = self.site().family.disambig(self.site().lang)
File "C:\Program Files\Accessories\pywikipedia\family.py", line 2837, in disambig
return self.disambiguationTemplates[fallback]
KeyError: '_default'
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2151078&group_…
---------- Forwarded message ----------
From: Brion Vibber <brion(a)wikimedia.org>
Date: Mon, Oct 6, 2008 at 8:24 PM
Subject: [Wikitech-l] Canonical namespace change coming: Image: -> File:
To: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As per long-time wistful desire, we're planning to rename the 'Image:'
namespace to 'File:'. This will reduce confusion with audio, video, and
document file uploads being called 'images' -- they're now all
first-class citizens. :)
This should go smoothly and transparently for most purposes. 'Image:'
will continue to be an alias, and perhaps even recommended for inline usage.
But some user scripts and bots might get confused, so we're giving
warning first!
Image description pages will now sit at the 'File:' title rather than
the 'Image:' title, and the JavaScript variables and HTML body classes
will reflect this, such as:
var wgCanonicalNamespace = "File";
var wgPageName = "File:Wiki.png";
<body class="mediawiki ltr ns-6 ns-subject
page-File_Wiki_png skin-monobook">
If your script or bot relies on wgCanonicalNamespace being 'Image', or
the value of the language-specific prefix, consider updating it to allow
both 'Image' and 'File' or check the number instead (6).
I've made a patch against r41626 and attached it to the bug:
https://bugzilla.wikimedia.org/show_bug.cgi?id=44
Unless there's a major issue, my plan is to commit it one week from
today. Once the core English namespace is changed, other localizations
may update their localized namespace names and aliases at their convenience.
Please *do not* update localizations before it's been committed!
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjqV84ACgkQwRnhpk1wk45odgCdEj4f0EWh3/l5+a1txTQbUJOu
uEsAoLDS32CQK7J/cHnwK84N01Afnk2Q
=oSxs
-----END PGP SIGNATURE-----
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l