Skip to content

Commit 32bce8f

Browse files
Copy edit the tutorial (#11049)
- Correct two typos. - Include the ingredient index in the "for example" statement. It's tedious, but the audience is reading to learn.
1 parent 9844162 commit 32bce8f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

doc/development/tutorials/recipe.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ because ``ObjectDescription`` is a special-purpose directive that's intended
8585
for describing things like classes, functions, or, in our case, recipes. More
8686
specifically, ``handle_signature`` implements parsing the signature of the
8787
directive and passes on the object's name and type to its superclass, while
88-
``add_taget_and_index`` adds a target (to link to) and an entry to the index
88+
``add_target_and_index`` adds a target (to link to) and an entry to the index
8989
for this node.
9090

9191
We also see that this directive defines ``has_content``, ``required_arguments``
@@ -122,9 +122,10 @@ all it really is is a list of tuples like ``('tomato', 'TomatoSoup', 'test',
122122
'rec-TomatoSoup',...)``. Refer to the :doc:`domain API guide
123123
</extdev/domainapi>` for more information on this API.
124124

125-
These index pages can be referred by combination of domain name and its
126-
``name`` using :rst:role:`ref` role. For example, ``RecipeIndex`` can be
127-
referred by ``:ref:`recipe-recipe```.
125+
These index pages can be referenced with the :rst:role:`ref` role by combining
126+
the domain name and the index ``name`` value. For example, ``RecipeIndex`` can be
127+
referenced with ``:ref:`recipe-recipe``` and ``IngredientIndex`` can be referenced
128+
with ``:ref:`recipe-ingredient```.
128129

129130
.. rubric:: The domain
130131

@@ -152,7 +153,7 @@ Moving on, we can see that we've defined ``initial_data``. The values defined in
152153
``initial_data`` will be copied to ``env.domaindata[domain_name]`` as the
153154
initial data of the domain, and domain instances can access it via
154155
``self.data``. We see that we have defined two items in ``initial_data``:
155-
``recipes`` and ``recipe2ingredient``. These contain a list of all objects
156+
``recipes`` and ``recipe_ingredients``. Each contains a list of all objects
156157
defined (i.e. all recipes) and a hash that maps a canonical ingredient name to
157158
the list of objects. The way we name objects is common across our extension and
158159
is defined in the ``get_full_qualified_name`` method. For each object created,
@@ -214,7 +215,7 @@ You can now use the extension throughout your project. For example:
214215
215216
The important things to note are the use of the ``:recipe:ref:`` role to
216217
cross-reference the recipe actually defined elsewhere (using the
217-
``:recipe:recipe:`` directive.
218+
``:recipe:recipe:`` directive).
218219

219220

220221
Further reading

0 commit comments

Comments
 (0)