Browse Source

First batch of fixes

WouterJ 10 năm trước cách đây
mục cha
commit
e21933aa56

+ 10 - 10
Resources/doc/getting_started/creating_an_admin.rst

@@ -29,8 +29,8 @@ After this, you'll need to tweak the entities a bit:
         // ...
 
         /**
-        * @ORM\ManyToOne(targetEntity="Category", inversedBy="blogPosts")
-        */
+         * @ORM\ManyToOne(targetEntity="Category", inversedBy="blogPosts")
+         */
         private $category;
 
         public function setCategory(Category $category)
@@ -90,7 +90,7 @@ After this, create the schema for these entities:
 Step 1: Create an Admin Class
 -----------------------------
 
-SonataAdminBundle helps you manage your data using a graphic interface that
+SonataAdminBundle helps you manage your data using a graphical interface that
 will let you create, update or search your model instances. The bundle relies
 on Admin classes to know which models will be managed and how these actions
 will look like.
@@ -133,22 +133,22 @@ easiest way to do this is by extending ``Sonata\AdminBundle\Admin\Admin``.
 So, what does this code do?
 
 * **Line 11-14**: These lines configure which fields are display on the edit
-  and create actions. The ``FormMapper`` behaves similair to the
-  ``FormBuilder`` of the Symfony Form component;
+  and create actions. The ``FormMapper`` behaves similar to the ``FormBuilder``
+  of the Symfony Form component;
 * **Line 16-19**: This method configures the filters, used to filter and sort
   the list of models;
 * **Line 21-24**: Here you specify which fields are shown when all models are
   listed (the ``addIdentifier()`` method means that this field will link to the
   show/edit page of this particular model).
 
-This is the most basic example of the Admin class. You configure a lot more.
-This will be covered by other, more advanced, articles.
+This is the most basic example of the Admin class. You can configure a lot more
+with the Admin class. This will be covered by other, more advanced, articles.
 
 Step 3: Register the Admin class
 --------------------------------
 
 You've now created an Admin class, but there is currently no way for the
-SonataAdminBundle to know that this Admin class exist. To tell the
+SonataAdminBundle to know that this Admin class exists. To tell the
 SonataAdminBundle of the existence of this Admin class, you have to create a
 service and tag it with the ``sonata.admin`` tag:
 
@@ -166,8 +166,8 @@ service and tag it with the ``sonata.admin`` tag:
 
 The constructor of the base Admin class has many arguments. SonataAdminBundle
 provides a compiler pass which takes care of configuring it correctly for you.
-You can often tweak things using tag attributes. The code shown here is the most
-minimal code needed to get it working.
+You can often tweak things using tag attributes. The code shown here is the
+shortest code needed to get it working.
 
 Step 4: Register SonataAdmin custom Routes
 ------------------------------------------

+ 11 - 10
Resources/doc/getting_started/the_form_view.rst

@@ -1,9 +1,9 @@
 The Form View
 =============
 
-You've seen the absolute top of the ice berg in
+You've seen the absolute top of the iceberg in
 :doc:`the previous chapter <creating_an_admin>`. But there is a lot more to
-discover! In the comming chapters, you'll create an Admin class for the more
+discover! In the coming chapters, you'll create an Admin class for the more
 complex ``BlogPost`` model. Meanwhile, you'll learn how to make things a bit
 more pretty.
 
@@ -73,8 +73,8 @@ The ``BlogPost`` model has 4 properties: ``id``, ``title``, ``body``,
 database. This means the form view just needs 3 fields: title, body and
 category.
 
-The title and body fields are simple text and textarea fields, you can add them
-straight away:
+The title and body fields are simple "text" and "textarea" fields, you can add
+them straight away:
 
 .. code-block:: php
 
@@ -119,7 +119,7 @@ As each blog post will only have one category, it renders as a select list:
 
 .. image:: ../images/getting_started_entity_type.png
 
-When an admin would like to create a new category, it needs to go to the
+When an admin would like to create a new category, they need to go to the
 category admin page and create a new category.
 
 Using the Sonata Model Type
@@ -181,7 +181,7 @@ category field to a Meta data group. To do this, use the ``with()`` method:
     }
 
 The first argument is the name/label of the group and the second argument is an
-array of options. For instance, you can pass HTML classes to the group, in
+array of options. For instance, you can pass HTML classes to the group in
 order to tweak the styling:
 
 .. code-block:: php
@@ -232,16 +232,17 @@ Creating a Blog Post
 You've now finished your nice form view for the ``BlogPost`` model. Now it's
 time to test it out by creating a post.
 
-After pressing the "Create"-button, you probably see a green message like:
+After pressing the "Create" button, you probably see a green message like:
 *Item "AppBundle\Entity\BlogPost:00000000192ba93c000000001b786396" has been
 successfully created.*
 
 While it's very friendly of the SonataAdminBundle to notify the admin of a
-succesvol creation, the classname and some sort of hash aren't really nice to
+succesful creation, the classname and some sort of hash aren't really nice to
 read. This is the default string representation of an object in the
 SonataAdminBundle. You can change it by defining a ``__toString()`` magic
 method on your model or by defining a ``toString()`` (note: no underscore
-prefix) method in the Admin class. This recieves the object:
+prefix) method in the Admin class. This recieves the object to transform to a
+string as the first parameter:
 
 .. code-block:: php
 
@@ -266,7 +267,7 @@ Round Up
 --------
 
 In this tutorial, you've made your first contact with the greatest feature of
-the SonataAdminBundle: Being able to customize literary everything. You've
+the SonataAdminBundle: Being able to customize literally everything. You've
 started by creating a simple form and ended up with a nice edit page for your
 admin.