Skip to content

Commit

Permalink
Spelling typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed May 2, 2012
1 parent 064053a commit 62ebfab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions ckan/config/environment.py
Expand Up @@ -30,12 +30,12 @@ class _Helpers(object):
def __init__(self, helpers, restrict=True):
functions = {}
allowed = helpers.__allowed_functions__
# list of functions due to be depreciated
self.depreciated = []
# list of functions due to be deprecated
self.deprecated = []

for helper in dir(helpers):
if helper not in allowed:
self.depreciated.append(helper)
self.deprecated.append(helper)
if restrict:
continue
functions[helper] = getattr(helpers, helper)
Expand Down Expand Up @@ -63,14 +63,14 @@ def null_function(cls, *args, **kw):
def __getattr__(self, name):
''' return the function/object requested '''
if name in self.functions:
if name in self.depreciated:
msg = 'Template helper function `%s` is depriciated' % name
if name in self.deprecated:
msg = 'Template helper function `%s` is deprecated' % name
self.log.warn(msg)
return self.functions[name]
else:
if name in self.depreciated:
if name in self.deprecated:
msg = 'Template helper function `%s` is not available ' \
'as it has been depriciated.\nYou can enable it ' \
'as it has been deprecated.\nYou can enable it ' \
'by setting ckan.restrict_template_vars = true ' \
'in your .ini file.' % name
self.log.critical(msg)
Expand Down
14 changes: 7 additions & 7 deletions ckan/lib/helpers.py
Expand Up @@ -254,7 +254,7 @@ def are_there_flash_messages():

def nav_link(*args, **kwargs):
# nav_link() used to need c passing as the first arg
# this is depriciated as pointless
# this is deprecated as pointless
# throws error if ckan.restrict_template_vars is True
# When we move to strict helpers then this should be removed as a wrapper
if len(args) > 2 or (len(args) > 1 and 'controller' in kwargs):
Expand All @@ -277,7 +277,7 @@ def _nav_link(text, controller, **kwargs):

def nav_named_link(*args, **kwargs):
# subnav_link() used to need c passing as the first arg
# this is depriciated as pointless
# this is deprecated as pointless
# throws error if ckan.restrict_template_vars is True
# When we move to strict helpers then this should be removed as a wrapper
if len(args) > 3 or (len(args) > 0 and 'text' in kwargs) or \
Expand All @@ -298,7 +298,7 @@ def _nav_named_link(text, name, **kwargs):

def subnav_link(*args, **kwargs):
# subnav_link() used to need c passing as the first arg
# this is depriciated as pointless
# this is deprecated as pointless
# throws error if ckan.restrict_template_vars is True
# When we move to strict helpers then this should be removed as a wrapper
if len(args) > 2 or (len(args) > 1 and 'action' in kwargs):
Expand All @@ -316,7 +316,7 @@ def _subnav_link(text, action, **kwargs):

def subnav_named_route(*args, **kwargs):
# subnav_link() used to need c passing as the first arg
# this is depriciated as pointless
# this is deprecated as pointless
# throws error if ckan.restrict_template_vars is True
# When we move to strict helpers then this should be removed as a wrapper
if len(args) > 2 or (len(args) > 0 and 'text' in kwargs) or \
Expand Down Expand Up @@ -373,7 +373,7 @@ def facet_items(*args, **kwargs):
"""
_log.warning('Deprecated function: ckan.lib.helpers:facet_items(). Will be removed in v1.8')
# facet_items() used to need c passing as the first arg
# this is depriciated as pointless
# this is deprecated as pointless
# throws error if ckan.restrict_template_vars is True
# When we move to strict helpers then this should be removed as a wrapper
if len(args) > 2 or (len(args) > 0 and 'name' in kwargs) or (len(args) > 1 and 'limit' in kwargs):
Expand Down Expand Up @@ -724,7 +724,7 @@ def dump_json(obj, **kw):

def auto_log_message(*args):
# auto_log_message() used to need c passing as the first arg
# this is depriciated as pointless
# this is deprecated as pointless
# throws error if ckan.restrict_template_vars is True
# When we move to strict helpers then this should be removed as a wrapper
if len(args) and asbool(config.get('ckan.restrict_template_vars', 'false')):
Expand Down Expand Up @@ -811,7 +811,7 @@ def process_names(items):
'default_group_type',
'facet_items',
'facet_title',
# am_authorized, # depreciated
# am_authorized, # deprecated
'check_access',
'linked_user',
'linked_authorization_group',
Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/__init__.py
Expand Up @@ -227,7 +227,7 @@ def get_action(action):

def get_or_bust(data_dict, keys):
'''Try and get values from dictionary and if they are not there
raise a validataion error.
raise a validation error.
data_dict: a dictionary
keys: either a single string key in which case will return a single value,
Expand Down
2 changes: 1 addition & 1 deletion doc/configuration.rst
Expand Up @@ -673,7 +673,7 @@ This is a directory where SQL database backups are to be written, assuming a scr



Compatability
Compatibility
-------------

.. index::
Expand Down

0 comments on commit 62ebfab

Please sign in to comment.