Fix typos and grammar issues

This commit is contained in:
rubenwardy 2023-06-18 22:07:46 +01:00
parent e8b14709e6
commit f2cfb6c17d
19 changed files with 29 additions and 29 deletions

@ -36,7 +36,7 @@ See [Developer Intro](docs/dev_intro.md) for an overview of the code organisatio
* (optional) Install the [Docker extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker)
* Install the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
* Click no to installing pylint (we don't want it to be installed outside of a virtual env)
* Click no to installing pylint (we don't want it to be installed outside a virtual env)
* Set up a virtual env
* Replace `psycopg2` with `psycopg2_binary` in requirements.txt (because postgresql won't be installed on the system)
* `python3 -m venv env`

@ -46,12 +46,12 @@ def callback(oauth_token):
flash(gettext("Authorization failed [err=gh-oauth-login-failed]"), "danger")
return redirect(url_for("users.login"))
# Get Github username
# Get GitGub username
url = "https://api.github.com/user"
r = requests.get(url, headers={"Authorization": "token " + oauth_token})
username = r.json()["login"]
# Get user by github username
# Get user by GitHub username
userByGithub = User.query.filter(func.lower(User.github_username) == func.lower(username)).first()
# If logged in, connect

@ -24,7 +24,7 @@ licenses, although you should actually read the text as well.
If you use code from other sources (such as mods or games), you'll need to make sure you follow
their license. A common one is attribution, you should do this by adding a comment next to the
code and crediting the author in your README / LICENSE file.
code and crediting the author in your LICENSE file.
It's sometimes fine to copy trivial/small amounts of code under fair use, but this
is a bit of a grey area. It's better to understand the solution and rewrite it yourself.
@ -74,7 +74,7 @@ Your Name, CC BY-SA 4.0:
* [OpenGameArt](https://opengameart.org/) - everything
* [Kenney game assets](https://www.kenney.nl/assets) - everything
* [Free Sound](https://freesound.org/) - sounds
* [PolyHaven](https://polyhaven.com/) - 3d models and textures.
* [PolyHaven](https://polyhaven.com/) - 3d models and textures.
* Other Minetest mods/games
Don't assume the author has correctly licensed their work.
@ -87,7 +87,7 @@ Your Name, CC BY-SA 4.0:
### I made it myself, using X as a guide
Copying by hand is still copying, the law doesn't distinguish this from copy+paste.
Make your own art without copying colors or patterns from existing games/art.
Make your own art without copying colors or patterns from existing games/art.
If you need a good set of colors, see [LOSPEC](https://lospec.com/palette-list).

@ -36,7 +36,7 @@ interface, and can be configured separately in Emails and Notifications.
## Crash Course to being an Editor
The [Package Inclusion Policy and Guidance](/policy_and_guidance/) is our go to resource for making decisions in
The [Package Inclusion Policy and Guidance](/policy_and_guidance/) is our go-to resource for making decisions in
changes needed, similar to how lua_api.txt is the doc for modders to consult.
In the [Editor console](/todo/), the two most important tabs are the Editor Work Queue and the Forum
@ -50,7 +50,7 @@ A simplified process for reviewing a package is as follows:
1. scan the package image if present for any obvious closed source assets.
2. if right to a name warning is present, check its validity and if the package meets
the exceptions.
3. if the forums topic missing warning is present, feel free to check it, but its
3. if the forums topic missing warning is present, feel free to check it, but it's
usually incorrect.
4. check source, etc links to make sure they work and are correct.
5. verify that the package has license file that matches what is on the contentdb fields

@ -12,7 +12,7 @@ be done using a GitHub account or a random string in your forum account signatur
If you don't, then you can just sign up using an email address and password.
GitHub can only be used to login, not to register.
GitHub can only be used to log in, not to register.
<a class="btn btn-primary" href="/user/claim/">Register</a>

@ -24,7 +24,7 @@ Both of these are comma-separated lists of game technical ids. Any `_game` suffi
supported_games = minetest_game, repixture
unsupported_games = lordofthetest, nodecore, whynot
If your package supports all games by default, you can put "*` in supported_games.
If your package supports all games by default, you can put "*" in supported_games.
You can still use unsupported_games to mark games as unsupported.
You can also specify games that you've tested in supported_games.

@ -55,7 +55,7 @@ Here's a quick summary related to Minetest content:
Non-free packages are hidden in the client by default, partly in order to comply
with the rules of various Linux distributions.
Users can opt-in to showing non-free software, if they wish:
Users can opt in to showing non-free software, if they wish:
1. In the main menu, go to Settings > All settings
2. Search for "ContentDB Flag Blacklist".

@ -2,8 +2,8 @@ title: Ranks and Permissions
## Overview
* **New Members** - mostly untrusted, cannot change package meta data or publish releases without approval.
* **Members** - Trusted to change the meta data of their own packages', but cannot approve their own packages.
* **New Members** - mostly untrusted, cannot change package metadata or publish releases without approval.
* **Members** - Trusted to change the metadata of their own packages', but cannot approve their own packages.
* **Trusted Members** - Same as above, but can approve their own releases.
* **Approvers** - Responsible for approving new packages, screenshots, and releases.
* **Editors** - Same as above, and can edit any package or release.

@ -6,7 +6,7 @@ A webhook is a notification from one service to another. Put simply, a webhook
is used to notify ContentDB that the git repository has changed.
ContentDB offers the ability to automatically create releases using webhooks
from either Github or Gitlab. If you're not using either of those services,
from either GitHub or GitLab. If you're not using either of those services,
you can also use the [API](../api) to create releases.
ContentDB also offers the ability to poll a Git repo and check for updates

@ -131,7 +131,7 @@ Public domain is not a valid license in many countries, please use CC0 or MIT in
## 5. Promotions and Advertisements (inc. asking for donations)
You may not place any promotions or advertisements in any meta data including
You may not place any promotions or advertisements in any metadata including
screenshots. This includes asking for donations, promoting online shops,
or linking to personal websites and social media. Please instead use the
fields provided on your user profile page to place links to websites and

@ -64,7 +64,7 @@ class FlaskMailHandler(logging.Handler):
def getSubject(self, record):
fmt = FlaskMailSubjectFormatter(self.subject_template)
subject = fmt.format(record)
# Since templates can cause header problems, and we rather have a incomplete email then an error, we fix this
# Since templates can cause header problems, and we rather have an incomplete email then an error, we fix this
if _is_bad_subject(subject):
subject="FlaskMailHandler log-entry from ContentDB [original subject is replaced, because it would result in a bad header]"
return subject

@ -46,7 +46,7 @@ def checkForumAccount(forums_username):
user.forums_username = forums_username
db.session.add(user)
# Get github username
# Get GitHub username
github_username = profile.get("github")
if github_username is not None and github_username.strip() != "":
print("Updated GitHub username for " + user.display_name + " to " + github_username)

@ -18,7 +18,7 @@ class ContentType(Enum):
def validate_same(self, other):
"""
Whether or not `other` is an acceptable type for this
Whether `other` is an acceptable type for this
"""
assert other

@ -203,22 +203,22 @@ class PackageTreeNode:
self.children.append(child)
def getModNames(self):
return self.fold("name", type=ContentType.MOD)
return self.fold("name", type_=ContentType.MOD)
# attr: Attribute name
# key: Key in attribute
# retval: Accumulator
# type: Filter to type
def fold(self, attr, key=None, retval=None, type=None):
# type_: Filter to type
def fold(self, attr, key=None, retval=None, type_=None):
if retval is None:
retval = set()
# Iterate through children
for child in self.children:
child.fold(attr, key, retval, type)
child.fold(attr, key, retval, type_)
# Filter on type
if type and type != self.type:
if type_ and type_ != self.type:
return retval
# Get attribute

@ -9,7 +9,7 @@
<p class="alert alert-danger">
<b>BE VERY CAREFUL.</b>
This will send an email to all users with email addresses.
This will email all users with email addresses.
</p>
{% from "macros/forms.html" import render_field, render_submit_field %}

@ -8,7 +8,7 @@
<h1>{{ self.title() }}</h1>
<p>
{{ _("We've sent an email to the address you specified.") }}
{{ _("We've emailed the address you specified.") }}
{{ _("You'll need to click the link in the email to confirm it.") }}</p>
<p>
@ -22,4 +22,4 @@
{{ _("My email never arrived") }}
</a>
</p>
{% endblock %}
{% endblock %}

@ -37,7 +37,7 @@
<div class="alert alert-danger">
<p>
<strong>
{{ _("Unsubscribing may prevent you from being able to sign into the account '%(display_name)s'", display_name=user.display_name) }}
{{ _("Unsubscribing may prevent you from being able to log into the account '%(display_name)s'", display_name=user.display_name) }}
</strong>.
</p>
<p class="mb-0">

@ -5,7 +5,7 @@
ContentDB is a Python [Flask](https://flask.palletsprojects.com/en/2.0.x/) webservice.
There's a PostgreSQL database, manipulated using the [SQLAlchemy ORM](https://docs.sqlalchemy.org/en/14/).
When a user makes a request, Python Flask will direct the request to a *route* in an *blueprint*.
When a user makes a request, Python Flask will direct the request to a *route* in a *blueprint*.
A [blueprint](https://flask.palletsprojects.com/en/2.0.x/blueprints/) is a Flask construct to hold a set of routes.
Routes are implemented using Python, and likely to respond by using database *models* and rendering HTML *templates*.

@ -16,7 +16,7 @@ Docker is the recommended way to develop and deploy ContentDB.
Make sure to set `USER_ENABLE_EMAIL` to True.
4. (Optional) Set up GitHub integration
1. Make a Github OAuth Client at <https://github.com/settings/developers>:
1. Make a GitHub OAuth Client at <https://github.com/settings/developers>:
2. Homepage URL - `http://localhost:5123/`
3. Authorization callback URL - `http://localhost:5123/user/github/callback/`
4. Put client id and client secret in `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` in config.cfg.