Skip to content

Commit 107a604

Browse files
authored
patch: fix some typos and grammar issues (#133)
* patch: minor grammar fixes * patch: grammar and typo fixes
1 parent 185cdac commit 107a604

File tree

46 files changed

+189
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+189
-192
lines changed

docs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ C is not difficult. The Vala library only has to install the generated
3232
header files and C applications may then access the GObject-based API of
3333
the Vala library as usual. It should also be easily possible to write a
3434
bindings generator for access to Vala libraries from applications
35-
written in e.g. C# as the Vala parser is written as a library, so that
35+
written in e.g., C# as the Vala parser is written as a library, so that
3636
all compile-time information is available when generating a binding.
3737

3838
## Why Vala?

docs/contributor-guide/compiler-guide/02-00-environment-setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ coding style.
3333
- Hanging braces.
3434
- Cuddled else.
3535
- Braces necessary for single-line blocks.
36-
- Variable and method identifiers in lowercase, words seperated by
36+
- Variable and method identifiers in lowercase, words separated by
3737
underscores.
3838
- Type identifiers in CamelCase.
39-
- Enum members and constants in ALL_CAPS, words seperated by
39+
- Enum members and constants in ALL_CAPS, words separated by
4040
underscores.
4141
- C-style _/* comments. */_
4242
- Hungarian notation not used.
@@ -45,7 +45,7 @@ coding style.
4545
- No function-length limit.
4646
- Space between method name and parameters' opening parenthesis.
4747
- Property _get_, _set_, _default_
48-
declaration all on one line, seperated by semicolons, if default
48+
declaration all on one line, separated by semicolons, if default
4949
implementations are used.
5050
- If properties have implementations, then _get {_, _set {_ open new lines.
5151
- Attributes on their own line.

docs/contributor-guide/compiler-guide/03-00-the-vala-compiler/03-01-vala-in-a-nutshell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ generator object. This object walks the code tree and generates code.
5252

5353
Vala.CodeContext contains an important method called `accept`, which
5454
initiates a depth-first traversal of the code tree. This method, and the
55-
CodeVisitor pattern will be discussed later.
55+
CodeVisitor pattern, will be discussed later.
5656

5757
**Data diagram**
5858

docs/contributor-guide/compiler-guide/03-00-the-vala-compiler/03-02-parser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ yourself bouncing between different classes.
297297
## 3.2.2. Back to the Parser
298298

299299
Vala.Parser is a highly specialized CodeVisitor - the only type of code
300-
node it visits is a Vala.SourceFile. However the Parser calls back to
300+
node it visits is a Vala.SourceFile. However, the Parser calls back to
301301
the context and uses it to create code nodes (mentioned before), then
302302
adds these code nodes into the context's root code node.
303303

@@ -312,7 +312,7 @@ declarations of a namespace, class, struct, or interface. Fixme.
312312

313313
This grammar is hand-generated from Vala.Parser. Sometimes the structure
314314
of this grammar diverges slightly from the code, for example optional
315-
non-terminal symbols. However the non-terminal symbol names usually
315+
non-terminal symbols. However, the non-terminal symbol names usually
316316
match a parse_ method in Vala.Parser.
317317

318318
More literal-specific grammar at

docs/contributor-guide/compiler-guide/03-00-the-vala-compiler/03-04-symbol-resolution.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ implement themselves.
1111

1212
Every expression has a static type. This is computed by the semantic
1313
analyzer. Vala.DataType is called a "type reference" because it
14-
contains a reference to a Vala.Typesymbol (a class, interface, etc) as
15-
well as information about the expression's type e.g. if it can be null,
16-
if it's an out parameter.
14+
contains a reference to a Vala.Typesymbol (a class, interface, etc.) as
15+
well as information about the expression's type, e.g., if it can be null,
16+
or, if it's an out parameter.
1717

1818
::: info TODO
1919
expand this section
@@ -29,12 +29,12 @@ variables, scope also determines their lifetime. As the code tree is
2929
traversed, SymbolResolver keeps track of the current scope. For example,
3030
when a class is visited, current_scope is set to that class's scope.
3131

32-
When the parser parses a type, e.g. in the statement Gtk.Window
33-
main_window;, the type Gtk.Window is initially a Vala.UnresolvedType. In
32+
When the parser parses a type, e.g., in the statement Gtk.Window
33+
main_window, the type Gtk.Window is initially a Vala.UnresolvedType. In
3434
visit_data_type (), the UnresolvedType code node asks its parent to
3535
replace it with a new Vala.DataType created with resolve_type ().
3636

37-
UnresolvedTypes have UnresolvedSymbols.resolve_type () uses
37+
UnresolvedTypes have UnresolvedSymbols. resolve_type () uses
3838
resolve_symbol () to find the Typesymbol referred to, and then wraps it
3939
in a new DataType object.
4040

docs/contributor-guide/compiler-guide/09-00-build-system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Vala is built using the standard GNU Autotools. The built executables
44
are actually stored in .libs directories and wrapped by scripts.
5-
Therefore to debug, follow these instructions:
5+
Therefore, to debug, follow these instructions:
66

77
::: info TODO
88
Add Vala debug instructions.
@@ -47,5 +47,5 @@ fixme fixme fixme fixme
4747
rodney@solaria:~/dev/buildvala % make
4848
```
4949

50-
All Makefiles, etc, generated by configure will be put in the buildvala
51-
directory and you can run make directly from there.
50+
All Makefiles generated by configure will be put in the buildvala
51+
directory, and you can run make directly from there.

docs/developer-guides/bindings/generating-a-vapi-with-gobject-introspection.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ library uses GTK+ and GConf, use:
202202
vapigen --pkg gtk+-2.0 --pkg gconf-2.0 --library [...]
203203
```
204204

205-
Otherwise you'll get errors like that, or an incomplete binding:
205+
Otherwise, you'll get errors like that, or an incomplete binding:
206206

207207
```shell
208208
error: The type name ``GLib.tkWidget' could not be found
@@ -309,7 +309,7 @@ values. For example,
309309
has an [event signal](https://developer-old.gnome.org/clutter/stable/ClutterActor.html#ClutterActor-event),
310310
which takes a single argument: a
311311
[ClutterEvent](http://developer-old.gnome.org/clutter/stable/clutter-Events.html#ClutterEvent)
312-
intance. It also has an [event method](http://developer-old.gnome.org/clutter/stable/ClutterActor.html#clutter-actor-event)
312+
instance. It also has an [event method](http://developer-old.gnome.org/clutter/stable/ClutterActor.html#clutter-actor-event)
313313
which takes two arguments: a ClutterEvent instance and a boolean. In
314314
this case, we resolve the conflict by renaming the method to
315315
"emit_event":
@@ -353,7 +353,7 @@ GIR assumes all pointer return values are nullable ("allow-none" in
353353
G-I terminology) and does not provide a way to override this assumption
354354
([bug #660879](https://bugzilla.gnome.org/show_bug.cgi?id=660879)).
355355
Vala, on the other hand, assumes return values are not nullable unless
356-
otherwise otherwise specified, and comparing a non-nullable value to
356+
otherwise specified, and comparing a non-nullable value to
357357
null (e.g., to check for validity) will cause a warning. Luckily, making
358358
a value nullable is easy to do from a metadata file, as you can see from
359359
this example (for
@@ -401,7 +401,7 @@ annotations to the metadata.
401401
### Abstract/Virtual Distinction
402402
403403
Vala distinguishes between abstract and virtual methods (virtual methods
404-
do not need to be implemented by an class which implements the interface
404+
do not need to be implemented by a class which implements the interface
405405
whereas abstract methods do require an implementation) while GIR does
406406
not. In order to mark a method as virtual instead of abstract, you could
407407
do something like this (from
@@ -419,7 +419,7 @@ types which should be generic ([bug #639908](https://bugzilla.gnome.org/show_bug
419419
example,
420420
[GDataList](http://developer-old.gnome.org/glib/unstable/glib-Keyed-Data-Lists.html)
421421
is a generic in Vala but is not supported as such by GObject
422-
Introspection, so the the following is necessary for
422+
Introspection, so the following is necessary for
423423
[soup_form_encode_datalist](http://developer.gnome.org/libsoup/stable/libsoup-2.4-HTML-Form-Support.html#soup-form-encode-datalist):
424424
425425
```xml
@@ -455,8 +455,8 @@ Buffer base_type="Gst.MiniObject"
455455
456456
GObject Introspection does not currently offer a way to annotate the
457457
relationship between an async function and its corresponding finish
458-
function ([bug #623635](https://bugzilla.gnome.org/show_bug.cgi?id=623635)). By default
459-
Vala will look for function with the same base name, but a "_finish"
458+
function ([bug #623635](https://bugzilla.gnome.org/show_bug.cgi?id=623635)). By default,
459+
Vala will look for a function with the same base name, but a "_finish"
460460
suffix, but you can point it to other functions in metadata using
461461
"finish_name":
462462

docs/developer-guides/bindings/upstream-guide.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ errors.
3434

3535
## Higher quality bindings
3636

37-
You know your library better than the Vala developers do and you can
38-
make sure your APIs look, and behave, as you intended.
37+
You know your library better than the Vala developers do, and you can
38+
make sure your APIs look and behave as you intended.
3939

4040
## API documentation
4141

42-
We provide documentation for many libraries which ship a VAPI on
42+
We provide documentation for many libraries that ship a VAPI on
4343
[Valadoc.org](https://www.valadoc.org/).
4444

4545
**But...**
@@ -64,7 +64,7 @@ valac automatically handle dependencies for them.
6464

6565
GObject Introspection also allows for some things which Vala does not,
6666
which is where the real problems begin. These issues can cause errors
67-
from Vala's GIR parser (like the ones mentioned earier from GIO),
67+
from Vala's GIR parser (like the ones mentioned earlier from GIO),
6868
resulting in your GIR being useless to valac. The classic example of
6969
this is duplicate symbols; GObject Introspection allows for methods,
7070
virtual methods, and signals with the same name but different signatures
@@ -172,7 +172,7 @@ similar to what GI provides for g-ir-scanner in the form of an autoconf
172172
macro and a Makefile. In order to avoid introducing a hard dependency to
173173
your project, it is recommended you copy the
174174
[vapigen.m4](https://gitlab.gnome.org/GNOME/vala/-/blob/master/vapigen/vapigen.m4)
175-
file into your macro directory (usually an m4/ folder in the top level
175+
file into your macro directory (usually a m4/ folder in the top level
176176
of your project). The macro has the following signature:
177177

178178
```shell
@@ -202,8 +202,7 @@ FOUND-INTROSPECTION
202202

203203
DEFAULT
204204

205-
> The default value of the argument (yes, no, or auto). The default
206-
default is auto.
205+
> The default value of the argument (yes, no, or auto). The default value of default is auto.
207206
208207
This macro will define three variables for you to use in your automake
209208
files:
@@ -214,7 +213,7 @@ VAPIGEN
214213
215214
VAPIGEN_VAPIDIR
216215

217-
> The location to install the your bindings to
216+
> The location to install your bindings to
218217
219218
VAPIGEN_MAKEFILE
220219

@@ -267,7 +266,7 @@ FILES
267266

268267
> The GIR file to generate the VAPI from
269268
270-
To use our "Foo" example from eariler:
269+
To use our "Foo" example from earlier:
271270

272271
```make
273272
if ENABLE_VAPIGEN

docs/developer-guides/bindings/writing-a-vapi-manually.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This document intends to be a tutorial and reference on how to write a
44
Vala binding to an existing C library. If the library uses GLib, do not
5-
follow this document. Instead read
5+
follow this document. Instead, read
66
[Generating a VAPI with GObject Introspection](generating-a-vapi-with-gobject-introspection).
77
A library may not follow the GLib coding practices
88
precisely, but it is better to fix the library to work with GObject
@@ -20,9 +20,9 @@ would be to:
2020

2121
1. Bind an enum first because enums are easy to test.
2222

23-
> Once your test gives the expected result you know that the build
23+
> Once your test gives the expected result, you know that the build
2424
process works. This means working through the "Getting Started"
25-
section and the "Enums and Flags" sub-section. Binding an enum
25+
section and the "Enums and Flags" subsection. Binding an enum
2626
also introduces the idea that there isn't a straight mapping from
2727
C to Vala
2828

@@ -42,9 +42,9 @@ would be to:
4242
document becomes more of a reference for solving tricky function
4343
bindings
4444

45-
The above assumes that the library is written in an object oriented
45+
The above assumes that the library is written in an object-oriented
4646
style of C. A C binding, however, is only made up of structs and
47-
functions so understanding that in enough detail is the purpose of the
47+
functions, so understanding that in enough detail is the purpose of the
4848
approach.
4949

5050
#### [1. Prerequisites](writing-a-vapi-manually/01-00-prerequisites){style="color: white;"}

docs/developer-guides/bindings/writing-a-vapi-manually/02-00-getting-started/02-08-documentation-and-valadoc-org.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ valadoc --directory docs --force --package-name mybinding mybinding.vapi
5151

5252
This will generate the HTML documentation in the `docs` directory.
5353
`valadoc` expects the `docs` directory to not exist, but `--force`
54-
overrides this. `--package-name mybinding` will create a sub-directory
54+
overrides this. `--package-name mybinding` will create a subdirectory
5555
called `mybinding` in `docs` that contains the generated documentation
5656
for `mybinding.vapi`.
5757

0 commit comments

Comments
 (0)