jenkins-bot has submitted this change and it was merged.
Change subject: 45 typo fixes ......................................................................
45 typo fixes
* 15 occurence → occurrence * 15 occurences → occurrences * 4 insenstive → insensitive * 4 overriden → overridden * 2 return a the → return the * 2 splitted → split * 1 chache → cache * 1 generator which yield → generator which yields * 1 langauge → language
Change-Id: I960e5e8dc107f3f1d3eb59a5088f4fc73aa1b191 --- M pywikibot/__init__.py M pywikibot/bot.py M pywikibot/config2.py M pywikibot/editor.py M pywikibot/i18n.py M pywikibot/logentries.py M pywikibot/site.py M pywikibot/textlib.py M pywikibot/userinterfaces/gui.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/version.py M scripts/category.py M scripts/commonscat.py M scripts/image.py M scripts/noreferences.py M scripts/nowcommons.py M scripts/protect.py M scripts/replace.py M scripts/replicate_wiki.py M scripts/solve_disambiguation.py M scripts/template.py M scripts/upload.py M tests/__init__.py M tests/i18n_tests.py M tests/site_tests.py 25 files changed, 45 insertions(+), 45 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index feee966..2e32da1 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -513,7 +513,7 @@
Site objects are cached and reused by this method.
- By default rely on config settings. These defaults may all be overriden + By default rely on config settings. These defaults may all be overridden using the method parameters.
@param code: language code (override config.mylang) diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 5ac275f..8643081 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -899,7 +899,7 @@ @param kwargs: options @type kwargs: dict """ - # contains the options overriden from defaults + # contains the options overridden from defaults self.options = {}
validOptions = set(self.availableOptions) diff --git a/pywikibot/config2.py b/pywikibot/config2.py index c9bc252..2a2be84 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -677,7 +677,7 @@ # 'wikipedia:li': {'Hoofdpagina': 'Veurblaad'} # } # -# to replace all occurences of 'Hoofdpagina' with 'Veurblaad' when writing to +# to replace all occurrences of 'Hoofdpagina' with 'Veurblaad' when writing to # liwiki. Note that this does not take the origin wiki into account. replicate_replace = {}
diff --git a/pywikibot/editor.py b/pywikibot/editor.py index 0243717..1f877e3 100644 --- a/pywikibot/editor.py +++ b/pywikibot/editor.py @@ -27,8 +27,8 @@ """Return editor selected in user-config.py.""" command = config.editor if jumpIndex: - # Some editors make it possible to mark occurences of substrings, - # or to jump to the line of the first occurence. + # Some editors make it possible to mark occurrences of substrings, + # or to jump to the line of the first occurrence. # TODO: Find a better solution than hardcoding these, e.g. a config # option. line = text[:jumpIndex].count('\n') @@ -83,7 +83,7 @@ @type text: unicode @param jumpIndex: position at which to put the caret @type jumpIndex: int - @param highlight: each occurence of this substring will be highlighted + @param highlight: each occurrence of this substring will be highlighted @type highlight: unicode @return: the modified text, or None if the user didn't save the text file in his text editor diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py index 23f218e..6b0dede 100644 --- a/pywikibot/i18n.py +++ b/pywikibot/i18n.py @@ -250,7 +250,7 @@ if len(plural_items) > 1 and isinstance(parameters, (tuple, list)) and \ len(plural_items) != len(parameters): raise ValueError("Length of parameter does not match PLURAL " - "occurences.") + "occurrences.") i = 0 for selector, variants in plural_items: if isinstance(parameters, dict): diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 8bfb0a6..750279b 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -34,7 +34,7 @@
# Log type expected. None for every type, or one of the (letype) str : # block/patrol/etc... - # Overriden in subclasses. + # Overridden in subclasses. _expectedType = None
def __init__(self, apidata, site): diff --git a/pywikibot/site.py b/pywikibot/site.py index e0f4b49..66cc068 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -285,11 +285,11 @@ return u'' + name + u':'
def __str__(self): - """Return a the canonical string representation.""" + """Return the canonical string representation.""" return self.canonical_prefix()
def __unicode__(self): - """Return a the custom string representation.""" + """Return the custom string representation.""" return self.custom_prefix()
def canonical_prefix(self): @@ -2091,7 +2091,7 @@
Use L{has_extension} instead!
- @param name: The extension to check for, case insenstive + @param name: The extension to check for, case insensitive @type name: str @param unknown: Old parameter which shouldn't be used anymore. @return: If the extension is loaded @@ -2106,7 +2106,7 @@ def has_extension(self, name): """ Determine whether extension `name` is loaded.
- @param name: The extension to check for, case insenstive + @param name: The extension to check for, case insensitive @type name: str @return: If the extension is loaded @rtype: bool diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py index 33003b4..f27163c 100644 --- a/pywikibot/textlib.py +++ b/pywikibot/textlib.py @@ -1349,7 +1349,7 @@
# all fields matched -> date valid if all(g in dateDict for g in self.groups): - # remove 'time' key, now splitted in hour/minute and not needed by datetime + # remove 'time' key, now split in hour/minute and not needed by datetime del dateDict['time']
# replace month name in original language with month number diff --git a/pywikibot/userinterfaces/gui.py b/pywikibot/userinterfaces/gui.py index 85bda15..517178f 100644 --- a/pywikibot/userinterfaces/gui.py +++ b/pywikibot/userinterfaces/gui.py @@ -196,17 +196,17 @@ # start from the beginning (and when we come to the end, stop) idx = '1.0' while True: - # find next occurence, exit loop if no more + # find next occurrence, exit loop if no more idx = self.search(s, idx, nocase=1, stopindex=Tkinter.END) if not idx: break - # index right after the end of the occurence + # index right after the end of the occurrence lastidx = '%s+%dc' % (idx, len(s)) - # tag the whole occurence (start included, stop excluded) + # tag the whole occurrence (start included, stop excluded) self.tag_add('found', idx, lastidx) - # prepare to search for next occurence + # prepare to search for next occurrence idx = lastidx - # use a red foreground for all the tagged occurences + # use a red foreground for all the tagged occurrences self.tag_config('found', foreground='red') found = self.tag_nextrange('found', 1.0) if found: @@ -336,7 +336,7 @@ @type text: unicode @param jumpIndex: position at which to put the caret @type jumpIndex: int - @param highlight: each occurence of this substring will be highlighted + @param highlight: each occurrence of this substring will be highlighted @type highlight: unicode @return: the modified text, or None if the user didn't save the text file in his text editor diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 5f37e69..3336392 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -314,7 +314,7 @@ @type text: unicode @param jumpIndex: position at which to put the caret @type jumpIndex: int - @param highlight: each occurence of this substring will be highlighted + @param highlight: each occurrence of this substring will be highlighted @type highlight: unicode @return: the modified text, or None if the user didn't save the text file in his text editor diff --git a/pywikibot/version.py b/pywikibot/version.py index e82f0c5..c0a93dd 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -35,7 +35,7 @@
@param online: (optional) Include information obtained online """ - data = dict(getversiondict()) # copy dict to prevent changes in 'chache' + data = dict(getversiondict()) # copy dict to prevent changes in 'cache' data['cmp_ver'] = 'n/a'
if online: diff --git a/scripts/category.py b/scripts/category.py index 04faa05..58df1b6 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -497,7 +497,7 @@ def run(self): """The main bot function that does all the work.
- For readability it is splitted into several helper functions: + For readability it is split into several helper functions: - _movecat() - _movetalk() - _hist() diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 3605fae..1a970e3 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -4,7 +4,7 @@ With this tool you can add the template {{commonscat}} to categories.
The tool works by following the interwiki links. If the template is present on -another langauge page, the bot will use it. +another language page, the bot will use it.
You could probably use it at articles as well, but this isn't tested.
diff --git a/scripts/image.py b/scripts/image.py index 6053795..009478d 100644 --- a/scripts/image.py +++ b/scripts/image.py @@ -14,7 +14,7 @@ surround it with single quotes, such as: -summary:'My edit summary' -always Don't prompt to make changes, just do them. --loose Do loose replacements. This will replace all occurences of the name +-loose Do loose replacements. This will replace all occurrences of the name of the image (and not just explicit image syntax). This should work to catch all instances of the image, including where it is used as a template parameter or in image galleries. However, it can also make @@ -48,7 +48,7 @@
class ImageRobot(Bot):
- """This bot will replace or remove all occurences of an old image.""" + """This bot will replace or remove all occurrences of an old image."""
# Summary messages for replacing images msg_replace = { diff --git a/scripts/noreferences.py b/scripts/noreferences.py index d0e7ce0..8d0a84c 100755 --- a/scripts/noreferences.py +++ b/scripts/noreferences.py @@ -582,7 +582,7 @@ interwikiPattern = r'[[([a-zA-Z-]+)\s?:([^[]\n]*)]]\s*' # won't work with nested templates # the negative lookahead assures that we'll match the last template - # occurence in the temp text. + # occurrence in the temp text. # FIXME: # {{commons}} or {{commonscat}} are part of Weblinks section # * {{template}} is mostly part of a section diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py index a016b3d..ebdf184 100644 --- a/scripts/nowcommons.py +++ b/scripts/nowcommons.py @@ -24,7 +24,7 @@ -replacealways replace links if the files are equal and the file names differ without asking for confirmation
- -replaceloose Do loose replacements. This will replace all occurences + -replaceloose Do loose replacements. This will replace all occurrences of the name of the image (and not just explicit image syntax). This should work to catch all instances of the file, including where it is used as a template parameter diff --git a/scripts/protect.py b/scripts/protect.py index e1040c6..154493f 100644 --- a/scripts/protect.py +++ b/scripts/protect.py @@ -27,7 +27,7 @@
For all protection types (edit, move, etc.) it chooses the default protection level. This is "sysop" or "none" if -unprotect was selected. If multiple --unprotect or -default are used, only the last occurence is applied. +-unprotect or -default are used, only the last occurrence is applied.
Usage: python protect.py <OPTIONS>
diff --git a/scripts/replace.py b/scripts/replace.py index c68b161..7c6809f 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -44,11 +44,11 @@ argument is given, XYZ will be regarded as a regular expression.
--exceptinside:XYZ Skip occurences of the to-be-replaced text which lie +-exceptinside:XYZ Skip occurrences of the to-be-replaced text which lie within XYZ. If the -regex argument is given, XYZ will be regarded as a regular expression.
--exceptinsidetag:XYZ Skip occurences of the to-be-replaced text which lie +-exceptinsidetag:XYZ Skip occurrences of the to-be-replaced text which lie within an XYZ tag.
-summary:XYZ Set the summary message text for the edit to XYZ, bypassing @@ -74,7 +74,7 @@ -recursive Recurse replacement as long as possible. Be careful, this might lead to an infinite loop.
--allowoverlap When occurences of the pattern overlap, replace all of them. +-allowoverlap When occurrences of the pattern overlap, replace all of them. Be careful, this might lead to an infinite loop.
-fullsummary Use one large summary for all command line replacements. @@ -296,7 +296,7 @@ compiled regular expression) and replacement text (as a string). * exceptions - A dictionary which defines when to ignore an - occurence. See docu of the ReplaceRobot + occurrence. See docu of the ReplaceRobot constructor below. """
@@ -395,7 +395,7 @@ compiled regular expression) and replacement text (as a string). * exceptions - A dictionary which defines when not to change an - occurence. See below. + occurrence. See below. * acceptall - If True, the user won't be prompted before changes are made. * allowoverlap - If True, when matches overlap, all of them are @@ -414,7 +414,7 @@ contains a part which is matched by one of these regular expressions are skipped. inside - A list of regular expressions. All occurences are skipped which + A list of regular expressions. All occurrences are skipped which lie within a text region which is matched by one of these regular expressions. inside-tags diff --git a/scripts/replicate_wiki.py b/scripts/replicate_wiki.py index 7d4da0f..41d7a11 100644 --- a/scripts/replicate_wiki.py +++ b/scripts/replicate_wiki.py @@ -17,7 +17,7 @@ 'wikipedia:li': {'Hoofdpagina': 'Veurblaad'} }
-to replace all occurences of 'Hoofdpagina' with 'Veurblaad' when writing to +to replace all occurrences of 'Hoofdpagina' with 'Veurblaad' when writing to liwiki. Note that this does not take the origin wiki into account.
The following parameters are supported: diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py index 34ef463..a0a9aa1 100644 --- a/scripts/solve_disambiguation.py +++ b/scripts/solve_disambiguation.py @@ -430,7 +430,7 @@
def ignore(self, refPage): if self.enabled: - # Skip this occurence next time. + # Skip this occurrence next time. filename = config.datafilepath( 'disambiguations', self.disambPage.title(asUrl=True) + '.txt') @@ -716,7 +716,7 @@ # skip this page if self.primary: # If run with the -primary argument, skip this - # occurence next time. + # occurrence next time. self.primaryIgnoreManager.ignore(refPage) return True elif choice in ['q', 'Q']: diff --git a/scripts/template.py b/scripts/template.py index 5eaa837..de98b32 100755 --- a/scripts/template.py +++ b/scripts/template.py @@ -13,7 +13,7 @@
Command line options:
--remove Remove every occurence of the template from every article +-remove Remove every occurrence of the template from every article
-subst Resolves the template by putting its text directly into the article. This is done by changing {{...}} or {{msg:...}} into @@ -147,7 +147,7 @@ class XmlDumpTemplatePageGenerator:
""" - Generator which yield Pages that transclude a template. + Generator which yields Pages that transclude a template.
These pages will be retrieved from a local XML dump file (cur table), and may not still transclude the template. @@ -194,7 +194,7 @@
class TemplateRobot(Bot):
- """This bot will replace, remove or subst all occurences of a template.""" + """This bot will replace, remove or subst all occurrences of a template."""
def __init__(self, generator, templates, **kwargs): """ diff --git a/scripts/upload.py b/scripts/upload.py index 2d86ddb..91e1976 100755 --- a/scripts/upload.py +++ b/scripts/upload.py @@ -21,7 +21,7 @@ 'M': Megabytes (1000000 B) 'Ki': Kibibytes (1024 B) 'Mi': Mebibytes (1024x1024 B) - The suffixes are case insenstive. + The suffixes are case insensitive.
If any other arguments are given, the first is the URL or filename to upload, and the rest is a proposed description to go with the upload. If none of these diff --git a/tests/__init__.py b/tests/__init__.py index 32eaa93..d32f9f1 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -189,7 +189,7 @@ # of 'red' builds caused by intermittant server problems, while also avoiding # the builds taking a long time due to retries. # The following allows builds to retry twice, but higher default values are -# overriden here to restrict retries to only 1, so developer builds fail more +# overridden here to restrict retries to only 1, so developer builds fail more # frequently in code paths resulting from mishandled server problems. if config.max_retries > 2: print('max_retries reduced from %d to 1 for tests' % config.max_retries) diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py index 63b18dc..f5dc65f 100644 --- a/tests/i18n_tests.py +++ b/tests/i18n_tests.py @@ -225,13 +225,13 @@
def testMultipleWrongParameterLength(self): """Test wrong parameter length.""" - with self.assertRaisesRegex(ValueError, "Length of parameter does not match PLURAL occurences"): + with self.assertRaisesRegex(ValueError, "Length of parameter does not match PLURAL occurrences"): self.assertEqual( i18n.twntranslate('de', 'test-multiple-plurals', (1, 2)) % {'action': u'Ändere', 'line': u'drei'}, u'Bot: Ändere drei Zeilen von mehreren Seiten.')
- with self.assertRaisesRegex(ValueError, "Length of parameter does not match PLURAL occurences"): + with self.assertRaisesRegex(ValueError, "Length of parameter does not match PLURAL occurrences"): self.assertEqual( i18n.twntranslate('de', 'test-multiple-plurals', ["321"]) % {'action': u'Ändere', 'line': u'dreihunderteinundzwanzig'}, diff --git a/tests/site_tests.py b/tests/site_tests.py index 4b56794..224f76d 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -149,7 +149,7 @@ self.assertTrue(mysite.sametitle('Test name', 'Test name')) self.assertFalse(mysite.sametitle('Test name', 'Test Name')) # User, MediaWiki (both since 1.16) and Special are always - # first-letter (== only first non-namespace letter is case insenstive) + # first-letter (== only first non-namespace letter is case insensitive) # See also: https://www.mediawiki.org/wiki/Manual:$wgCapitalLinks self.assertTrue(mysite.sametitle("Special:Always", "Special:always")) if LV(mysite.version()) >= LV('1.16'):
pywikibot-commits@lists.wikimedia.org