[Checkins] SVN: z3c.form/trunk/ Fix spelling mistake: emtpy -> empty

Dan Korostelev nadako at gmail.com
Tue Dec 2 18:03:09 EST 2008


Log message for revision 93557:
  Fix spelling mistake: emtpy -> empty

Changed:
  U   z3c.form/trunk/CHANGES.txt
  U   z3c.form/trunk/src/z3c/form/browser/orderedselect.txt
  U   z3c.form/trunk/src/z3c/form/browser/select.txt
  U   z3c.form/trunk/src/z3c/form/browser/textlines.txt
  U   z3c.form/trunk/src/z3c/form/converter.txt
  U   z3c.form/trunk/src/z3c/form/util.py
  U   z3c.form/trunk/src/z3c/form/util.txt

-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/CHANGES.txt	2008-12-02 23:03:09 UTC (rev 93557)
@@ -5,6 +5,11 @@
 Version 2.0.0 (2008-??-??)
 --------------------------
 
+- Fix: IMPORTANT - the signature of z3c.form.util.extractFileName function changed
+  because of spelling mistake fix in argument name. The ``allowEmtpyPostFix`` is
+  now called ``allowEmptyPostfix`` (note ``Empty`` instead of ``Emtpy`` and
+  ``Postfix`` instead of ``PostFix``).
+
 - Changes: around objectwidget
   - zcml objectWidgetTemplate to be able to register widget templates for
     specific field schemas

Modified: z3c.form/trunk/src/z3c/form/browser/orderedselect.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/browser/orderedselect.txt	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/src/z3c/form/browser/orderedselect.txt	2008-12-02 23:03:09 UTC (rev 93557)
@@ -41,7 +41,7 @@
   ...     (None, None, None, None, interfaces.IOrderedSelectWidget),
   ...     IPageTemplate, name=interfaces.INPUT_MODE)
 
-If we render the widget we get an emtpy widget:
+If we render the widget we get an empty widget:
 
   >>> print widget.render()
   <script type="text/javascript">

Modified: z3c.form/trunk/src/z3c/form/browser/select.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/browser/select.txt	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/src/z3c/form/browser/select.txt	2008-12-02 23:03:09 UTC (rev 93557)
@@ -41,7 +41,7 @@
   ...     (None, None, None, None, interfaces.ISelectWidget),
   ...     IPageTemplate, name=interfaces.INPUT_MODE)
 
-If we render the widget we get an emtpy widget:
+If we render the widget we get an empty widget:
 
   >>> print widget.render()
   <select id="widget-id" name="widget.name:list"

Modified: z3c.form/trunk/src/z3c/form/browser/textlines.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/browser/textlines.txt	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/src/z3c/form/browser/textlines.txt	2008-12-02 23:03:09 UTC (rev 93557)
@@ -40,7 +40,7 @@
   ...     (None, None, None, None, interfaces.ITextLinesWidget),
   ...     IPageTemplate, name=interfaces.INPUT_MODE)
 
-If we render the widget we get an emtpy textarea widget:
+If we render the widget we get an empty textarea widget:
 
   >>> print widget.render()
   <textarea id="id" name="name" class="textarea-widget"></textarea>

Modified: z3c.form/trunk/src/z3c/form/converter.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/converter.txt	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/src/z3c/form/converter.txt	2008-12-02 23:03:09 UTC (rev 93557)
@@ -432,7 +432,7 @@
 This allows machinery later to ignore the field without sending all the data
 around.
 
-If we get an emtpy filename in a ``FileUpload`` obejct, we also get the
+If we get an empty filename in a ``FileUpload`` obejct, we also get the
 ``missing_value``. But this really means that there was an error somewhere in
 the upload, since you are normaly not able to upload a file without a filename:
 

Modified: z3c.form/trunk/src/z3c/form/util.py
===================================================================
--- z3c.form/trunk/src/z3c/form/util.py	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/src/z3c/form/util.py	2008-12-02 23:03:09 UTC (rev 93557)
@@ -93,23 +93,23 @@
     return zope.contenttype.guess_content_type(widget.filename)[0]
 
 
-def extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False):
+def extractFileName(form, id, cleanup=True, allowEmptyPostfix=False):
     """Extract the filename of the widget with the given id.
 
     Uploads from win/IE need some cleanup because the filename includes also
     the path. The option ``cleanup=True`` will do this for you. The option
-    ``allowEmtpyPostFix`` allows to have a filename without extensions. By
+    ``allowEmptyPostfix`` allows to have a filename without extensions. By
     default this option is set to ``False`` and will raise a ``ValueError`` if
     a filename doesn't contain a extension.
     """
     widget = getWidgetById(form, id)
-    if not allowEmtpyPostFix or cleanup:
+    if not allowEmptyPostfix or cleanup:
         # We need to strip out the path section even if we do not reomve them
         # later, because we just need to check the filename extension.
         cleanFileName = widget.filename.split('\\')[-1]
         cleanFileName = cleanFileName.split('/')[-1]
         dottedParts = cleanFileName.split('.')
-    if not allowEmtpyPostFix:
+    if not allowEmptyPostfix:
         if len(dottedParts) <= 1:
             raise ValueError(_('Missing filename extension.'))
     if cleanup:

Modified: z3c.form/trunk/src/z3c/form/util.txt
===================================================================
--- z3c.form/trunk/src/z3c/form/util.txt	2008-12-02 22:51:20 UTC (rev 93556)
+++ z3c.form/trunk/src/z3c/form/util.txt	2008-12-02 23:03:09 UTC (rev 93557)
@@ -88,7 +88,7 @@
   True
 
 
-``extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False)`` Function
+``extractFileName(form, id, cleanup=True, allowEmptyPostfix=False)`` Function
 -----------------------------------------------------------------------------
 
 Test the filename extraction method:
@@ -177,17 +177,17 @@
 
   >>> uploadForm.setFakeFileName(u'minimal')
   >>> util.extractFileName(uploadForm, 'form.widgets.data', cleanup=True,
-  ...     allowEmtpyPostFix=True)
+  ...     allowEmptyPostfix=True)
   u'minimal'
 
   >>> uploadForm.setFakeFileName(u'/tmp/minimal')
   >>> util.extractFileName(uploadForm, 'form.widgets.data', cleanup=True,
-  ...     allowEmtpyPostFix=True)
+  ...     allowEmptyPostfix=True)
   u'minimal'
 
   >>> uploadForm.setFakeFileName(u'D:\\some\\folder\\minimal')
   >>> util.extractFileName(uploadForm, 'form.widgets.data', cleanup=True,
-  ...     allowEmtpyPostFix=True)
+  ...     allowEmptyPostfix=True)
   u'minimal'
 
 There will be a ValueError if we get a empty filename by default:



More information about the Checkins mailing list