Ver código fonte

docs typos fixed

Peter Kokot 13 anos atrás
pai
commit
0824f9415e

+ 3 - 3
README.md

@@ -3,14 +3,14 @@ SonataAdminBundle - The missing Symfony2 Admin Generator
 
 The online documentation of the bundle is in http://sonata-project.org/bundles/admin
 
-For contribution to the documentation you cand find it on [Resources/doc](https://github.com/sonata-project/SonataAdminBundle/tree/master/Resources/doc).
+For contribution to the documentation you can find it on [Resources/doc](https://github.com/sonata-project/SonataAdminBundle/tree/master/Resources/doc).
 
 **Warning**: documentation files are not rendering correctly in Github (reStructuredText format)
 and some content might be broken or hidden, make sure to read raw files.
 
 **Warning**: The bundle has been split into 4 bundles :
 
-* SonataAdminBundle : the current one, contains core librairies and services
+* SonataAdminBundle : the current one, contains core libraries and services
 * [SonataDoctrineORMAdminBundle](https://github.com/sonata-project/SonataDoctrineORMAdminBundle) 
 : Integrates the admin bundle into with the Doctrine ORM project
 * [SonataDoctrineMongoDBAdminBundle](https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle) 
@@ -96,7 +96,7 @@ class PostAdmin extends Admin
 Screenshots : http://www.dropbox.com/gallery/581816/2/BaseApplicationBundle/preview?h=59b2e8
 
 Of course, power users will be happy as an ``Admin`` class is very flexible as all dependencies are
-injected by the DIC.
+injected by the DIC (dependency injection container).
 
 Features
 --------

+ 1 - 1
Resources/doc/index.rst

@@ -3,7 +3,7 @@ Admin Bundle
 
 **Warning**: The bundle has been split into 4 bundles :
 
-* SonataAdminBundle : the current one, contains core librairies and services
+* SonataAdminBundle : the current one, contains core libraries and services
 * `SonataDoctrineORMAdminBundle <https://github.com/sonata-project/SonataDoctrineORMAdminBundle>`_: Integrates the admin bundle with the Doctrine ORM project
 * `SonataDoctrineMongoDBAdminBundle <https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle>`_: Integrates the admin bundle with MongoDB (early stage)
 * `SonataDoctrinePhpcrAdminBundle <https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle>`_: Integrates the admin bundle with PHPCR (early stage)

+ 6 - 6
Resources/doc/reference/architecture.rst

@@ -29,7 +29,7 @@ The admin class is a service implementing the ``AdminInterface`` interface,
 meaning that the following required dependencies are automatically injected:
 
 * ``ListBuilder``: builds the list fields
-* ``FormContractor``: constructs the form using the Symfony ``FormBuilder``
+* ``FormContractor``: builds the form using the Symfony ``FormBuilder``
 * ``DatagridBuilder``: builds the filter fields
 * ``Router``: generates the different urls
 * ``Request``
@@ -65,7 +65,7 @@ The definition contains:
 
 * ``name``: The name of the field definition;
 * ``type``: The field type;
-* ``template``: The template to use to display the field;
+* ``template``: The template used for displaying the field;
 * ``targetEntity``: The class name of the target entity for relations;
 * ``options``: Certain field types have additional options;
 
@@ -106,7 +106,7 @@ Obtaining an ``Admin`` Service
 ------------------------------
 
 ``Admin`` definitions are accessible through the 'sonata.admin.pool' service or
-directly from the DIC (dependency injector). The ``Admin`` definitions are lazy
+directly from the DIC (dependency injection container). The ``Admin`` definitions are lazy
 loaded from the DIC to reduce overhead.
 
 Declaring a new Admin class
@@ -135,7 +135,7 @@ Examples:
 </service>
 
 If you want to define your own controller for handling CRUD operations, change the last argument
- in the service definition to::
+in the service definition to::
 
   <argument>SonataNewsBundle:PostAdmin</argument>
 
@@ -151,8 +151,8 @@ Or if you're using a YML configuration file,
           arguments: [null, Sonata\NewsBundle\Entity\Post, SonataNewsBundle:PostAdmin]
 
 
-You can extend ``Sonata\AdminBundle\Admin\Admin`` to minimize the amount of
-code to write. This base admin uses the routing services to build routes.
+You can extend ``Sonata\AdminBundle\Admin\Admin`` class to minimize the amount of
+code to write. This base admin class uses the routing services to build routes.
 Note that you can use both the Bundle:Controller format or a `service name`_ to
 specify what controller to load.
 

+ 2 - 2
Resources/doc/reference/conditional_validation.rst

@@ -68,8 +68,8 @@ The method must accept two arguments:
  - ``value``: the object instance
 
 
-Sample with the ``PageBundle``
-------------------------------
+Example from the ``SonataPageBundle``
+-------------------------------------
 
 .. code-block:: php
 

+ 1 - 1
Resources/doc/reference/configuration.rst

@@ -28,7 +28,7 @@ Full Configuration Options
             layout:  SonataAdminBundle::standard_layout.html.twig
             ajax:    SonataAdminBundle::ajax_layout.html.twig
 
-            # default actions templates, should extends a global templates
+            # default actions templates, should extend a global templates
             list:    SonataAdminBundle:CRUD:list.html.twig
             show:    SonataAdminBundle:CRUD:show.html.twig
             edit:    SonataAdminBundle:CRUD:edit.html.twig

+ 1 - 1
Resources/doc/reference/dashboard.rst

@@ -3,7 +3,7 @@ Dashboard
 
 The dashboard is the main landing page. By default the dashboard lists the
 different admin areas available.
-If you want to custom the dashboard, add the following code to your
+If you want to customize the dashboard, add the following code to your
 application's config file:
 
 .. code-block:: yaml

+ 1 - 1
Resources/doc/reference/field_types.rst

@@ -10,7 +10,7 @@ There are many field types that can be used in the list action or show action :
 * boolean: display a green or red picture dependant on the boolean value, this type accepts an ``editable``
   parameter to edit the value from within the list or the show actions
 * date: display a formatted date
-* datetime: display a formatted date
+* datetime: display a formatted date and time
 * text: display a text
 * trans: translate the value with a provided ``catalogue`` option
 * string: display a text

+ 1 - 1
Resources/doc/reference/form_types.rst

@@ -62,7 +62,7 @@ Now, the property can be edited by setting a type for each type
 sonata_type_boolean
 ^^^^^^^^^^^^^^^^^^^
 
-The ``boolean`` type is a specialized ``ChoiceType`` where the choices list is fixed to 'yes' or 'no'.
+The ``boolean`` type is a specialized ``ChoiceType`` where the choices list is locked to 'yes' and 'no'.
 
 
 sonata_type_translatable_choice

+ 4 - 6
Resources/doc/reference/getting-started.rst

@@ -1,8 +1,6 @@
-
 Getting started with the Sonata Admin
 =====================================
 
-
 Here is a checklist of what is needed to create an admin interface for one Entity:
 
 **1. Setup the Sonata Admin dependencies.**
@@ -15,7 +13,7 @@ Either SonataDoctrineORMAdminBundle, SonataDoctrineMongoDBAdminBundle or SonataD
 
 **3. Create an Admin class that extends the Sonata admin class**
 
-The easiest way to do this is to extend the Sonata\AdminBundle\Admin\Admin class. Heres an example from the SonataNewsBundle:
+The easiest way to do this is to extend the Sonata\AdminBundle\Admin\Admin class. Here's an example from the SonataNewsBundle:
 
 ::
    
@@ -95,12 +93,12 @@ The easiest way to do this is to extend the Sonata\AdminBundle\Admin\Admin class
  
 **4. Link the class to the dashboard.**
  
- The easiest way to do this is to create a default group in the dashboard config::
- 
+The easiest way to do this is to create a default group in the dashboard config::
+
     dashboard_groups:
         default: ~
         
-**5. Create an adminservice**
+**5. Create an admin service**
 
 You need to create a service for the new admin class and link it into the framework by setting the sonata.admin tag.
 

+ 1 - 1
Resources/doc/reference/installation.rst

@@ -74,7 +74,7 @@ code to your application's routing file:
 
 Now, install the assets from the different bundles:
 ``php app/console assets:install web --symlink``.
-At this point you can access to the dashboard with the url:
+At this point you can access the admin dashboard with the url:
 ``http://yoursite.local/admin/dashboard``.
 
 .. note::

+ 2 - 1
Resources/doc/reference/saving_hooks.rst

@@ -1,7 +1,7 @@
 Saving hooks
 ============
 
-When the model is persited upon on the object stated two Admin methods are always called. You can extend this
+When the model is persited upon on the stated object two Admin methods are always called. You can extend this
 method to add custom business logic.
 
     - new object : ``prePersist($object)`` / ``postPersist($object)``
@@ -48,6 +48,7 @@ is how the Admin bundle can be used to solve the issue by using the ``prePersist
                 ->end()
             ;
         }
+        
         public function preUpdate($user)
         {
             $this->getUserManager()->updateCanonicalFields($user);

+ 1 - 1
Resources/doc/reference/security.rst

@@ -1,7 +1,7 @@
 Security
 ========
 
-The security part is managed by a ``SecurityHandler``, the bundle comes with 2 handlers
+The security part is managed by a ``SecurityHandler``, the bundle has 2 handlers
 
   - ``sonata.admin.security.handler.acl`` : ACL and ROLES to handle permissions
   - ``sonata.admin.security.handler.noop`` : always returns true, can be used with the Symfony2 firewall

+ 2 - 2
Resources/doc/reference/templates.rst

@@ -1,7 +1,7 @@
 Templates
 =========
 
-By default, an Admin class use a set of templates, it is possible to tweak the default values by editing the configuration
+By default, an Admin class uses a set of templates, it is possible to tweak the default values by editing the configuration
 
 .. code-block:: yaml
 
@@ -11,7 +11,7 @@ By default, an Admin class use a set of templates, it is possible to tweak the d
             layout:  SonataAdminBundle::standard_layout.html.twig
             ajax:    SonataAdminBundle::ajax_layout.html.twig
 
-            # default value if done set, actions templates, should extends a global templates
+            # default values of actions templates, they should extend global templates
             list:    SonataAdminBundle:CRUD:list.html.twig
             show:    SonataAdminBundle:CRUD:show.html.twig
             edit:    SonataAdminBundle:CRUD:edit.html.twig

+ 3 - 3
Resources/doc/reference/translation.rst

@@ -60,7 +60,7 @@ Translate field labels
 The Admin bundle comes with a customized form field template. The most notable changes from the original one is the use
 of the translation domain provided by the Admin instance to translate label.
 
-By default, the label is the field name. However a label can be defined as a the third argument of the ``add`` method:
+By default, the label is the field name. However a label can be defined as third argument of the ``add`` method:
 
 .. code-block:: php
 
@@ -74,7 +74,7 @@ By default, the label is the field name. However a label can be defined as a the
     }
 
 There is another option for rapid prototyping or to avoid spending too much time adding the ``label`` key to all option
-fields: ``Label Strategies``. By default labels are generated by using by using a simple rule ::
+fields: ``Label Strategies``. By default labels are generated by using a simple rule ::
 
     isValid => Is Valid
 
@@ -113,7 +113,7 @@ The strategy can be quickly configured when the Admin class is registered into t
 
 .. note::
 
-    In all cases the label will be used by the ``Translator``. The strategy is just a quick way to generate translable keys.
+    In all cases the label will be used by the ``Translator``. The strategy is just a quick way to generate translatable keys.
     It all depends on the project's requirements.