From bcd7c38e4efe438064aa9d798019dba103d3c5cc Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sat, 17 Dec 2011 21:04:50 +0000 Subject: [PATCH] typos svn: r18617 --- src/Utils.py | 16 ++++++++-------- src/cli/argparser.py | 13 +++++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Utils.py b/src/Utils.py index 3e45858b4..63e5ce3be 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -276,7 +276,7 @@ def encodingdefs(): pass if constfunc.win(): - # python encoding is ascii, but C functions need to recieve the + # python encoding is ascii, but C functions need to receive the # windows codeset, so convert over to it conv_utf8_tosrtkey = lambda x: locale.strxfrm(x.decode("utf-8").encode( codeset)) @@ -287,7 +287,7 @@ if constfunc.win(): codeset)) conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x.encode(codeset,'replace')) else: - # on unix C functions need to recieve utf-8. Default conversion would + # on unix C functions need to receive utf-8. Default conversion would # use ascii, so it is needed to be explicit about the resulting encoding conv_utf8_tosrtkey = lambda x: locale.strxfrm(x) conv_unicode_tosrtkey = lambda x: locale.strxfrm(x.encode("utf-8")) @@ -343,7 +343,7 @@ def find_folder( filename): except: pass - # Build list of elternate encodings + # Build list of alternate encodings try: encodings = [sys.getfilesystemencoding(), locale.getpreferredencoding(), @@ -371,7 +371,7 @@ def get_unicode_path_from_file_chooser(path): :rtype: unicode :returns: The Unicode version of path. """ - # make omly unicode of path of type 'str' + # make only unicode of path of type 'str' if not (isinstance(path, str)): return path @@ -398,12 +398,12 @@ def get_unicode_path_from_env_var(path): :rtype: unicode :returns: The Unicode version of path. """ - # make omly unicode of path of type 'str' + # make only unicode of path of type 'str' if not (isinstance(path, str)): return path if constfunc.win(): - # In Windows path/filename returned from a emvironment variable is in filesystemencoding + # In Windows path/filename returned from a environment variable is in filesystemencoding try: new_path = unicode(path, sys.getfilesystemencoding()) return new_path @@ -890,7 +890,7 @@ def probably_alive(person, db, """ Return true if the person may be alive on current_date. - This works by a process of emlimination. If we can't find a good + This works by a process of elimination. If we can't find a good reason to believe that someone is dead then we assume they must be alive. @@ -952,7 +952,7 @@ def probably_alive_range(person, db, def get_referents(handle, db, primary_objects): """ Find objects that refer to an object. - This function is the base for other get__referents finctions. + This function is the base for other get__referents functions. """ # Use one pass through the reference map to grab all the references diff --git a/src/cli/argparser.py b/src/cli/argparser.py index 22894431a..f2976d0fc 100644 --- a/src/cli/argparser.py +++ b/src/cli/argparser.py @@ -339,16 +339,17 @@ class ArgParser(object): if len(options) > 0 and self.open is None and self.imports == [] \ and not (self.list or self.list_more or self.help or self.runqml): # Extract and convert to unicode the arguments in the list. - # The % operator replaces the list elements with repr() of the list elemements - # which is OK for latin characters, but not for non latin characters in list elements + # The % operator replaces the list elements with repr() of + # the list elements, which is OK for latin characters + # but not for non-latin characters in list elements cliargs = "[ " for arg in range(len(self.args) - 1): cliargs += Utils.get_unicode_path_from_env_var(self.args[arg + 1]) + " " cliargs += "]" - self.errors += [(_('Error parsing the arguments'), - _("Error parsing the arguments: %s \n" - "To use in the command-line mode," \ - "supply at least one input file to process.") % cliargs)] + self.errors += [(_('Error parsing the arguments'), + _("Error parsing the arguments: %s \n" + "To use in the command-line mode, supply at " + "least one input file to process.") % cliargs)] if need_to_quit: sys.exit(0)