Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
124 changes: 124 additions & 0 deletions locale/af_ZA/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
msgid ""
msgstr ""
"Project-Id-Version: bookwyrm\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-08 05:35+0000\n"
"PO-Revision-Date: 2025-09-08 07:09\n"
"Last-Translator: \n"
"Language-Team: Afrikaans\n"
"Language: af_ZA\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: bookwyrm\n"
"X-Crowdin-Project-ID: 479239\n"
"X-Crowdin-Language: af\n"
"X-Crowdin-File: /[bookwyrm-social.documentation] main/locale/en_US/LC_MESSAGES/messages.po\n"
"X-Crowdin-File-ID: 1636\n"

#: templates/index.html:5 templates/layout.html:6
msgid "BookWyrm Documentation"
msgstr ""

#: templates/index.html:6
msgid "Your guide to using and contributing to BookWyrm"
msgstr ""

#: templates/index.html:6
msgid "How to Use and Contribute"
msgstr ""

#: templates/layout.html:4
msgid "BookWyrm: Social Reading and Reviewing"
msgstr ""

#: templates/layout.html:35 templates/layout.html:39 templates/layout.html:40
#: templates/layout.html:48
msgid "Join"
msgstr ""

#: templates/layout.html:38 templates/layout.html:42 templates/layout.html:43
#: templates/layout.html:51
msgid "Get involved"
msgstr ""

#: templates/layout.html:41 templates/layout.html:45 templates/layout.html:46
#: templates/layout.html:54
msgid "Support"
msgstr ""

#: templates/layout.html:44 templates/layout.html:48 templates/layout.html:49
#: templates/layout.html:57
msgid "Code"
msgstr ""

#: templates/layout.html:47 templates/layout.html:124 templates/layout.html:51
#: templates/layout.html:130 templates/layout.html:52 templates/layout.html:131
#: templates/layout.html:137 templates/layout.html:35 templates/layout.html:138
#: templates/layout.html:145 templates/layout.html:146
msgid "Documentation"
msgstr ""

#: templates/layout.html:95 templates/layout.html:101 templates/layout.html:102
#: templates/layout.html:108 templates/layout.html:109
#: templates/layout.html:116 templates/layout.html:117
msgid "<strong>BookWyrm</strong> is collaborative, anti-corporate software maintained by <a href='https://www.mousereeve.com/'>Mouse Reeve</a>."
msgstr ""

#: templates/layout.html:98 templates/layout.html:104 templates/layout.html:105
#: templates/layout.html:111 templates/layout.html:112
#: templates/layout.html:119 templates/layout.html:120
msgid "Support BookWyrm on <a href='https://www.patreon.com/bookwyrm' target='_blank'>Patreon</a>."
msgstr ""

#: templates/layout.html:102 templates/layout.html:108
#: templates/layout.html:109 templates/layout.html:115
#: templates/layout.html:116 templates/layout.html:123
#: templates/layout.html:124
msgid "Get Involved"
msgstr ""

#: templates/layout.html:104 templates/layout.html:110
#: templates/layout.html:111 templates/layout.html:117
#: templates/layout.html:118 templates/layout.html:125
#: templates/layout.html:126
msgid "BookWyrm on GitHub"
msgstr ""

#: templates/layout.html:107 templates/layout.html:113
#: templates/layout.html:114 templates/layout.html:120
#: templates/layout.html:121 templates/layout.html:128
#: templates/layout.html:129
msgid "Contribute to this page"
msgstr ""

#: templates/layout.html:122 templates/layout.html:128
#: templates/layout.html:129 templates/layout.html:135
#: templates/layout.html:136 templates/layout.html:143
#: templates/layout.html:144
msgid "Learn more"
msgstr ""

#: templates/layout.html:127 templates/layout.html:133
#: templates/layout.html:134 templates/layout.html:140
#: templates/layout.html:141 templates/layout.html:148
#: templates/layout.html:149
msgid "Contact maintainer"
msgstr ""

#: templates/layout.html:130 templates/layout.html:136
#: templates/layout.html:137 templates/layout.html:143
#: templates/layout.html:144 templates/layout.html:151
#: templates/layout.html:152
msgid "License"
msgstr ""

#: templates/layout.html:65
msgid "This is the documentation for the current development code. Choose a version from the menu to see documentation for released versions since"
msgstr ""

#: templates/page.html:16
msgid "Page Contents"
msgstr ""

135 changes: 135 additions & 0 deletions locale/af_ZA/content/codebase/activitypub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
- - -
Title: ActivityPub Date: 2025-04-21 Order: 1
- - -

BookWyrm uses the [ActivityPub](http://activitypub.rocks/) protocol to send and receive user activity between other BookWyrm instances and other services that implement ActivityPub, like [Mastodon](https://joinmastodon.org/). To handle book data, BookWyrm has a handful of extended Activity types which are not part of the standard, but are legible to other BookWyrm instances.

To view the ActivityPub data for a BookWyrm entity (user, book, list, etc) you can usually add `.json` to the end of the URL. e.g. `https://www.example.com/user/sam.json` and see the JSON in your web browser or via an http request (e.g. using `curl`).

## Activities and Objects

### Users and relationships
User relationship interactions follow the standard ActivityPub spec.

- `Follow`: request to receive statuses from a user, and view their statuses that have followers-only privacy
- `Accept`: approves a `Follow` and finalizes the relationship
- `Reject`: denies a `Follow`
- `Block`: prevent users from seeing one another's statuses, and prevents the blocked user from viewing the actor's profile
- `Update`: updates a user's profile and settings
- `Delete`: deactivates a user
- `Undo`: reverses a `Follow` or `Block`
- `Move`: communicate that a user has changed their ID and has moved to a new server. Most ActivityPub software will "follow" the user to the new identity. BookWyrm sends a notification to followers and requires them to confirm they want to follow the user to their new identity.

### Statuses
#### Object types

- `Note`: On services like Mastodon, `Note`s are the primary type of status. They contain a message body, attachments, can mention users, and be replies to statuses of any type. Within BookWyrm, `Note`s can only be created as direct messages or as replies to other statuses.
- `Review`: A review is a status in response to a book (indicated by the `inReplyToBook` field), which has a title, body, and numerical rating between 0 (not rated) and 5.
- `Comment`: A comment on a book mentions a book and has a message body.
- `Quotation`: A quote has a message body, an excerpt from a book, and mentions a book.

#### Activities

- `Create`: saves a new status in the database.

**Note**: BookWyrm only accepts `Create` activities if they are:

- Direct messages (i.e., `Note`s with the privacy level `direct`, which mention a local user),
- Related to a book (of a custom status type that includes the field `inReplyToBook`),
- Replies to existing statuses saved in the database

- `Delete`: Removes a status
- `Like`: Creates a favorite on the status
- `Announce`: Boosts the status into the actor's timeline
- `Undo`: Reverses a `Like` or `Announce`

### Collections
User's books and lists are represented by [`OrderedCollection`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection)

#### Objects

- `Shelf`: A user's book collection. By default, every user has a `to-read`, `reading`, `stop-reading` and `read` shelf which are used to track reading progress.
- `List`: A collection of books that may have items contributed by users other than the one who created the list.

#### Activities

- `Create`: Adds a shelf or list to the database.
- `Delete`: Removes a shelf or list.
- `Add`: Adds a book to a shelf or list.
- `Remove`: Removes a book from a shelf or list.

## Alternative Serialization
Because BookWyrm uses custom object types (`Review`, `Comment`, `Quotation`) that aren't supported by ActivityPub, statuses are transformed into standard types when sent to or viewed by non-BookWyrm services. `Review`s are converted into `Article`s, and `Comment`s and `Quotation`s are converted into `Note`s, with a link to the book and the cover image attached.

This may change in future in favor of the more ActivityPub-compliant [extended Object types](https://www.w3.org/TR/activitystreams-core/#fig-following-is-an-example-object-that-uses-the-id-and-type-properties-to-express-the-global-identifier-and-object-type) listed alongside core ActivityPub types.

## Making ActivityPub-aware models

The way BookWyrm sends and receives ActivityPub objects can be confusing for developers who are new to BookWyrm. It is mostly controlled by:

* Functions and [data classes](https://docs.python.org/3/library/dataclasses.html) outlined in the [activitypub](https://github.com/bookwyrm-social/bookwyrm/tree/main/bookwyrm/activitypub) directory
* The [ActivitypubMixin](https://github.com/bookwyrm-social/bookwyrm/blob/c458cdcb992a36f3c4a06752499461c3dd991e07/bookwyrm/models/activitypub_mixin.py#L40) and its children for models that are serializable for ActivityPub requests

### Serializing data to and from ActivityPub JSON

BookWyrm needs to know how to _serialize_ the data from the model into an ActivityPub JSON-LD object.

The `/activitypub/base_activity.py` file provides the core functions that turn ActivityPub JSON-LD strings into usable Django model objects, and vice-versa. We do this by creating a data class in `bookwyrm/activitypub`, and defining how the model should be serialized by providing an `activity_serializer` value in the model, which points to the relevant data class. From `ActivityObject` we inherit `id` and `type`, and two _class methods_:

**`to_model`**

This method takes an ActivityPub JSON string and tries to turn it into a BookWyrm model object, finding an existing object wherever possible. This is how we process **incoming** ActivityPub objects.

**`serialize`**

This method takes a BookWyrm model object, and turns it into a valid ActivityPub JSON string using the dataclass definitions. This is how we process **outgoing** ActivityPub objects.

### Example - Users

A BookWyrm user [is defined in `models/user.py`](https://github.com/bookwyrm-social/bookwyrm/blob/main/bookwyrm/models/user.py):

```py
class User(OrderedCollectionPageMixin, AbstractUser):
"""a user who wants to read books"""
```
Notice that we are inheriting from ("subclassing") `OrderedCollectionPageMixin`. This in turn inherits from `ObjectMixin`, which inherits from `ActivitypubMixin`. This may seem convoluted, but this inheritence chain allows us to avoid duplicating code as our ActivityPub objects become more specific. `AbstractUser` is [a Django model intended to be subclassed](https://docs.djangoproject.com/en/5.1/topics/auth/customizing/#specifying-custom-user-model), giving us things like hashed password logins and permission levels "out of the box".

Because `User` inherits from [`ObjectMixin`](https://github.com/bookwyrm-social/bookwyrm/blob/c458cdcb992a36f3c4a06752499461c3dd991e07/bookwyrm/models/activitypub_mixin.py#L213), when we `save()` a `User` object we will send a `Create` activity (if this is the first time the user was saved) or an `Update` activity (if we're just saving a change – e.g. to the user description or avatar). Any other model you add to BookWyrm will have the same capability if it inherits from `ObjectMixin`.

For BookWyrm users, the `activity_serializer` is defined in the `User` model:

```py
activity_serializer = activitypub.Person
```

The data class definition for `activitypub.Person` is at `/activitypub/person.py`:

```py
@dataclass(init=False)
class Person(ActivityObject):
"""actor activitypub json"""

preferredUsername: str
inbox: str
publicKey: PublicKey
followers: str = None
following: str = None
outbox: str = None
endpoints: Dict = None
name: str = None
summary: str = None
icon: Image = None
bookwyrmUser: bool = False
manuallyApprovesFollowers: str = False
discoverable: str = False
hideFollows: str = False
movedTo: str = None
alsoKnownAs: dict[str] = None
type: str = "Person"
```

You might notice that some of these fields are not a perfect match to the fields in the `User` model. If you have a field name in your model that needs to be called something different in the ActivityPub object (e.g. to comply with Python naming conventions in the model but JSON naming conventions in JSON string), you can define an `activitypub_field` in the model field definition:

```py
followers_url = fields.CharField(max_length=255, activitypub_field="followers")
```
21 changes: 21 additions & 0 deletions locale/af_ZA/content/codebase/permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- - -
Title: Permissions Date: 2021-04-18 Order: 2
- - -

User access to different features is controlled using Django's [built-in authentication system](https://docs.djangoproject.com/en/3.2/topics/auth/default/). When an instance is created, the `initdb` script creates a set of permissions, which are assinged to groups. By default, all new users are assigned the `editor` group, which allows them to edit book metadata.

The instance administrator should have `superuser` status, which gives them access to Django admin (`/admin`) and confers all permissions to that user.

## Permissions and groups
This table shows the four groups (admin, moderator, editor, and user) and what permissions users in that group have:

| | admin | moderator | editor | user |
| ---------------------- | ----- | --------- | ------ | ---- |
| edit instance settings | ✔️ | - | - | - |
| change user level | ✔️ | - | - | - |
| manage federation | ✔️ | ✔️ | - | - |
| issue invites | ✔️ | ✔️ | - | - |
| deactivate users | ✔️ | ✔️ | - | - |
| delete posts | ✔️ | ✔️ | - | - |
| edit books | ✔️ | ✔️ | ✔️ | - |
upload covers | ✔️ | ✔️ | ✔️ | ✔️
19 changes: 19 additions & 0 deletions locale/af_ZA/content/contributing/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- - -
Title: How to Contribute Date: 2021-04-12 Order: 1
- - -

There are many ways you can contribute to this project, regardless of your level of technical expertise.

## Feedback and feature requests
Please feel encouraged and welcome to point out bugs, suggestions, feature requests, and ideas for how things ought to work using [GitHub issues](https://github.com/bookwyrm-social/bookwyrm/issues).

## Code contributions
Code contributions are gladly welcomed! If you're not sure where to start, take a look at the ["Good first issue"](https://github.com/bookwyrm-social/bookwyrm/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag. Because BookWyrm is a small project, there isn't a lot of formal structure, but there is a huge capacity for one-on-one support, which can look like asking questions as you go, pair programming, video chats, et cetera, so please feel free to reach out.

If you have questions about the project or contributing, you can join the [BookWyrm matrix chat](https://app.element.io/#/room/#bookwyrm:matrix.org).

## Translation
Do you speak a language besides English? BookWyrm needs localization! You can add and edit translations at [translate.joinbookwyrm.com](http://translate.joinbookwyrm.com/)

## Financial Support
BookWyrm is an ad-free passion project with no intentions of seeking out venture funding or corporate financial relationships. If you want to help keep the project going, you can become a sustaining contributor via [Patreon](https://www.patreon.com/bookwyrm) or [OpenCollective](https://opencollective.com/bookwyrm), or make a one time gift via [PayPal](https://paypal.me/oulipo).
12 changes: 12 additions & 0 deletions locale/af_ZA/content/contributing/debug_toolbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- - -
Title: Django Debug Toolbar Date: 2022-05-16 Order: 5
- - -

BookWyrm has a branch that is configured to run [Django Debug Toolbar](https://django-debug-toolbar.readthedocs.io/en/latest/). This branch will never get merged into `main` and has a few tweaks that make it work with the toolbar, but unsafe to use in anything resembling a production environment. To use this branch, you will need to go through a few steps to get it running.

## Set up

- Using git, checkout out the [`debug-toolbar`](https://github.com/bookwyrm-social/bookwyrm/tree/debug-toolbar) branch
- Update the branch relative to `main` using `git merge main`. The branch is updated periodically but will likely be behind latest.
- Re-build the Docker images using `docker-compose up --build` to ensure that the Debug Toolbar library is installed from `requirements.txt`
- Access the application `web` image directly (instead of via `nginx`) using port `8000`
Loading