From 9ab39904e851cbb228eaa53960ce330803b4f0ef Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Mon, 11 Dec 2017 11:41:59 +0100 Subject: [PATCH] Implement automatic spell-check for docs (#688) * [WIP] Implement automatic spell-check for docs fixes #663 The only thing unclear to me so far is how the output of `make spelling` should be checked - is there a possibility to check for a file (i.e. `_build/spelling/output.txt`) to be empty, and report a failed build otherwise? * fix typo in requirements.txt * add enchant library * travis should report errors, order spelling wordlist * change travis.yml to easier troubleshoot build issues * fixed more typos, added more words * add more words, fix more typos * added more words * added more words * revert changes to .travis.yml --- .travis.sh | 8 ++ .travis.yml | 5 + doc/Makefile | 6 + doc/admin/config.rst | 4 +- doc/admin/installation/general.rst | 2 + doc/api/resources/checkinlists.rst | 2 +- doc/api/resources/invoices.rst | 2 +- doc/api/resources/items.rst | 2 +- doc/api/resources/orders.rst | 4 +- doc/api/resources/quotas.rst | 2 +- doc/conf.py | 16 +++ doc/development/api/customview.rst | 2 +- doc/development/implementation/logging.rst | 2 +- doc/development/implementation/models.rst | 2 + doc/development/implementation/settings.rst | 4 +- doc/development/implementation/urlconfig.rst | 4 +- doc/development/setup.rst | 4 +- doc/plugins/list.rst | 3 + doc/requirements.txt | 2 + doc/spelling_wordlist.txt | 118 +++++++++++++++++++ doc/user/events/create.rst | 4 +- doc/user/events/display.rst | 4 +- doc/user/events/subevents.rst | 2 +- doc/user/events/taxes.rst | 2 +- doc/user/events/widget.rst | 4 +- doc/user/faq.rst | 4 +- doc/user/markdown.rst | 2 +- doc/user/organizers/teams.rst | 4 +- doc/user/payments/fees.rst | 2 +- doc/user/payments/overview.rst | 5 +- doc/user/payments/settings.rst | 4 +- src/pretix/base/exporter.py | 2 +- src/pretix/base/models/invoices.py | 4 +- src/pretix/base/models/items.py | 4 +- src/pretix/base/models/orders.py | 4 +- src/pretix/base/payment.py | 12 +- src/pretix/base/signals.py | 2 +- src/pretix/control/forms/global_settings.py | 2 +- src/pretix/control/signals.py | 4 +- src/pretix/plugins/paypal/payment.py | 4 +- src/pretix/presale/signals.py | 2 +- 41 files changed, 217 insertions(+), 54 deletions(-) create mode 100644 doc/spelling_wordlist.txt diff --git a/.travis.sh b/.travis.sh index e6af0b22ef..6f3833ca69 100755 --- a/.travis.sh +++ b/.travis.sh @@ -25,6 +25,14 @@ if [ "$1" == "doctests" ]; then cd doc make doctest fi +if [ "$1" == "spelling" ]; then + XDG_CACHE_HOME=/cache pip3 install -Ur doc/requirements.txt + cd doc + make spelling + if [ -s _build/spelling/output.txt ]; then + exit 1 + fi +fi if [ "$1" == "tests" ]; then pip3 install -r src/requirements.txt -Ur src/requirements/dev.txt -r src/requirements/py34.txt cd src diff --git a/.travis.yml b/.travis.yml index d9e81e34bc..7faa2f18a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,5 +36,10 @@ matrix: env: JOB=tests PRETIX_CONFIG_FILE=tests/travis_postgres.cfg - python: 3.6 env: JOB=plugins + - python: 3.6 + env: JOB=spelling addons: postgresql: "9.4" + apt: + packages: + - enchant diff --git a/doc/Makefile b/doc/Makefile index ce42bb172c..dc30ffc9c3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -175,3 +175,9 @@ pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + +spelling: + $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling + @echo + @echo "Spelling check finished, look at the results in " \ + "$(BUILDDIR)/spelling/output.txt." diff --git a/doc/admin/config.rst b/doc/admin/config.rst index e89fa23dff..93adda2c1f 100644 --- a/doc/admin/config.rst +++ b/doc/admin/config.rst @@ -2,6 +2,8 @@ .. _`config`: +.. spelling:: Galera + Configuration file ================== @@ -45,7 +47,7 @@ Example:: ``datadir`` The local path to a data directory that will be used for storing user uploads and similar - data. Defaults to thea value of the environment variable ``DATA_DIR`` or ``data``. + data. Defaults to the value of the environment variable ``DATA_DIR`` or ``data``. ``plugins_default`` A comma-separated list of plugins that are enabled by default for all new events. diff --git a/doc/admin/installation/general.rst b/doc/admin/installation/general.rst index b30ad3d7a2..e16d4ad0b2 100644 --- a/doc/admin/installation/general.rst +++ b/doc/admin/installation/general.rst @@ -1,5 +1,7 @@ .. highlight:: ini +.. spelling:: SQL + General remarks =============== diff --git a/doc/api/resources/checkinlists.rst b/doc/api/resources/checkinlists.rst index 4b65e60976..08fb11c496 100644 --- a/doc/api/resources/checkinlists.rst +++ b/doc/api/resources/checkinlists.rst @@ -165,7 +165,7 @@ Endpoints .. http:patch:: /api/v1/organizers/(organizer)/events/(event)/checkinlists/(id)/ Update a check-in list. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of - the resource, other fields will be resetted to default. With ``PATCH``, you only need to provide the fields that you + the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you want to change. You can change all fields of the resource except the ``id`` field and the ``checkin_count`` and ``position_count`` diff --git a/doc/api/resources/invoices.rst b/doc/api/resources/invoices.rst index 11ee5580a0..3a176c26f4 100644 --- a/doc/api/resources/invoices.rst +++ b/doc/api/resources/invoices.rst @@ -221,5 +221,5 @@ Endpoints :statuscode 200: no error :statuscode 401: Authentication failure :statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource. - :statuscode 409: The file is not yet ready and will now be prepared. Retry the request after waiting vor a few + :statuscode 409: The file is not yet ready and will now be prepared. Retry the request after waiting for a few seconds. diff --git a/doc/api/resources/items.rst b/doc/api/resources/items.rst index 49cb2a88d0..7e2c72a140 100644 --- a/doc/api/resources/items.rst +++ b/doc/api/resources/items.rst @@ -70,7 +70,7 @@ addons list of objects Definition of a ├ addon_category integer Internal ID of the item category the add-on can be chosen from. ├ min_count integer The minimal number of add-ons that need to be chosen. -├ max_count integer The maxima number of add-ons that can be chosen. +├ max_count integer The maximal number of add-ons that can be chosen. └ position integer An integer, used for sorting ===================================== ========================== ======================================================= diff --git a/doc/api/resources/orders.rst b/doc/api/resources/orders.rst index ea70cdb357..b5ff94ae9d 100644 --- a/doc/api/resources/orders.rst +++ b/doc/api/resources/orders.rst @@ -79,7 +79,7 @@ downloads list of objects List of ticket The attributes ``invoice_address.vat_id_validated`` and ``invoice_address.is_business`` have been added. The attributes ``order.payment_fee``, ``order.payment_fee_tax_rate`` and ``order.payment_fee_tax_value`` have been - deprecated in favour of the new ``fees`` attribute but will still be served and removed in 1.9. + deprecated in favor of the new ``fees`` attribute but will still be served and removed in 1.9. .. versionchanged:: 1.9 @@ -342,7 +342,7 @@ Order endpoints Download tickets for an order, identified by its order code. Depending on the chosen output, the response might be a ZIP file, PDF file or something else. The order details response contains a list of output options for this - partictular order. + particular order. Tickets can be only downloaded if the order is paid and if ticket downloads are active. Note that in some cases the ticket file might not yet have been created. In that case, you will receive a status code :http:statuscode:`409` and diff --git a/doc/api/resources/quotas.rst b/doc/api/resources/quotas.rst index aab3fc2915..768c0205b7 100644 --- a/doc/api/resources/quotas.rst +++ b/doc/api/resources/quotas.rst @@ -158,7 +158,7 @@ Endpoints .. http:patch:: /api/v1/organizers/(organizer)/events/(event)/quotas/(id)/ Update a quota. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of - the resource, other fields will be resetted to default. With ``PATCH``, you only need to provide the fields that you + the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you want to change. You can change all fields of the resource except the ``id`` field. diff --git a/doc/conf.py b/doc/conf.py index 419f4fb505..608521c54e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -45,6 +45,7 @@ extensions = [ 'sphinx.ext.coverage', 'sphinxcontrib.httpdomain', 'sphinxcontrib.images', + 'sphinxcontrib.spelling', ] # Add any paths that contain templates here, relative to this directory. @@ -290,3 +291,18 @@ texinfo_documents = [ images_config = { 'default_image_width': '250px' } + +# -- Options for Spelling output ------------------------------------------ + +# String specifying the language, as understood by PyEnchant and enchant. +# Defaults to en_US for US English. +spelling_lang = 'en_US' + +# String specifying a file containing a list of words known to be spelled +# correctly but that do not appear in the language dictionary selected by +# spelling_lang. The file should contain one word per line. +spelling_word_list_filename='spelling_wordlist.txt' + +# Boolean controlling whether suggestions for misspelled words are printed. +# Defaults to False. +spelling_show_suggestions=True diff --git a/doc/development/api/customview.rst b/doc/development/api/customview.rst index 3e64555075..710b804b2b 100644 --- a/doc/development/api/customview.rst +++ b/doc/development/api/customview.rst @@ -25,7 +25,7 @@ If you want to add a custom view to the control area of an event, just register views.admin_view, name='backend'), ] -It is required that your URL paramaters are called ``organizer`` and ``event``. If you want to +It is required that your URL parameters are called ``organizer`` and ``event``. If you want to install a view on organizer level, you can leave out the ``event``. You can then implement the view as you would normally do. Our middleware will automatically diff --git a/doc/development/implementation/logging.rst b/doc/development/implementation/logging.rst index 78bb6e82dd..58b908b843 100644 --- a/doc/development/implementation/logging.rst +++ b/doc/development/implementation/logging.rst @@ -19,7 +19,7 @@ To actually log an action, you can just call the ``log_action`` method on your o order.log_action('pretix.event.order.canceled', user=user, data={}) The positional ``action`` argument should represent the type of action and should be globally unique, we -recomment do prefix it with your packagename, e.g. ``paypal.payment.rejected``. The ``user`` argument is +recommend to prefix it with your package name, e.g. ``paypal.payment.rejected``. The ``user`` argument is optional and may contain the user who performed the action. The optional ``data`` argument can contain additional information about this action. diff --git a/doc/development/implementation/models.rst b/doc/development/implementation/models.rst index 80a761a2f9..38730d60a0 100644 --- a/doc/development/implementation/models.rst +++ b/doc/development/implementation/models.rst @@ -1,6 +1,8 @@ .. highlight:: python :linenothreshold: 5 +.. spelling:: answ contrib + Data model ========== diff --git a/doc/development/implementation/settings.rst b/doc/development/implementation/settings.rst index 9da127ba07..d6a1646059 100644 --- a/doc/development/implementation/settings.rst +++ b/doc/development/implementation/settings.rst @@ -35,7 +35,7 @@ Forms ----- Hierarkey also provides a base class for forms that allow the modification of settings. pretix contains a -subclass that also adds suport for internationalized fields: +subclass that also adds support for internationalized fields: .. autoclass:: pretix.base.forms.SettingsForm @@ -65,4 +65,4 @@ Plugins can add custom hardcoded defaults in the following way:: Make sure that you include this code in a module that is imported at app loading time. .. _django-hierarkey: https://github.com/raphaelm/django-hierarkey -.. _documentation: https://django-hierarkey.readthedocs.io/en/latest/ \ No newline at end of file +.. _documentation: https://django-hierarkey.readthedocs.io/en/latest/ diff --git a/doc/development/implementation/urlconfig.rst b/doc/development/implementation/urlconfig.rst index 9f99db1a34..78dceb8ccb 100644 --- a/doc/development/implementation/urlconfig.rst +++ b/doc/development/implementation/urlconfig.rst @@ -67,7 +67,7 @@ available as ``plugins:sendmail:send``. Generating a URL for the frontend is a complicated task, because you need to know whether the event's organizer uses a custom URL or not and then generate the URL with a different domain and different arguments based on this information. pretix provides some helpers to make this easier. The first helper -is a python method that emulates a behaviour similar to ``reverse``: +is a python method that emulates a behavior similar to ``reverse``: .. autofunction:: pretix.multidomain.urlreverse.eventreverse @@ -82,5 +82,5 @@ Implementation details ---------------------- There are some other caveats when using a design like this, e.g. you have to care about cookie domains -and referer verification yourself. If you want to see how we built this, look into the ``pretix/multidomain/`` +and referrer verification yourself. If you want to see how we built this, look into the ``pretix/multidomain/`` sub-tree. diff --git a/doc/development/setup.rst b/doc/development/setup.rst index 6d1e69bf36..b7ab1b53b6 100644 --- a/doc/development/setup.rst +++ b/doc/development/setup.rst @@ -106,7 +106,7 @@ Execute the following commands to check for code style errors:: isort -c -rc . python manage.py check -Execute the following command to run pretix' test suite (might take a coumple of minutes):: +Execute the following command to run pretix' test suite (might take a couple of minutes):: py.test @@ -122,7 +122,7 @@ for example:: flake8 . || exit 1 isort -q -rc -c . || exit 1 -This keeps you from accidentally creating commits violating the sdtyle guide. +This keeps you from accidentally creating commits violating the style guide. Working with mails ^^^^^^^^^^^^^^^^^^ diff --git a/doc/plugins/list.rst b/doc/plugins/list.rst index 4998e01f9e..ac8848f9c4 100644 --- a/doc/plugins/list.rst +++ b/doc/plugins/list.rst @@ -1,3 +1,6 @@ +.. spelling:: + Analytics + List of plugins =============== diff --git a/doc/requirements.txt b/doc/requirements.txt index d44735a935..e9992a8db2 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,3 +3,5 @@ sphinx sphinx-rtd-theme sphinxcontrib-httpdomain sphinxcontrib-images +sphinxcontrib-spelling +pyenchant diff --git a/doc/spelling_wordlist.txt b/doc/spelling_wordlist.txt new file mode 100644 index 0000000000..03ec897f85 --- /dev/null +++ b/doc/spelling_wordlist.txt @@ -0,0 +1,118 @@ +addon +addons +api +auth +autobuild +backend +backends +banktransfer +boolean +booleans +cancelled +casted +checkbox +checkin +checkins +checksum +config +contenttypes +contextmanager +cron +cronjob +debian +deduplication +discoverable +django +dockerfile +durations +eu +filename +filesystem +fontawesome +frontend +frontpage +gettext +gunicorn +hardcoded +invalidations +iterable +libsass +linters +memcached +metadata +middleware +mixin +mixins +multi +multidomain +namespace +namespaced +namespaces +namespacing +natively +nginx +ons +optimizations +param +percental +positionid +pre +prepend +prepended +prepending +preprocessor +presale +pretix +pretixdroid +pretixpresale +prometheus +proxied +proxying +queryset +redemptions +redis +refactored +regex +renderer +renderers +reportlab +screenshot +serializers +serializers +sexualized +startup +stdout +stylesheet +subdirectories +subdirectory +subdomain +subdomains +subevent +subevents +submodule +subpath +systemd +testutils +timestamp +un +unconfigured +unix +unprefixed +untrusted +username +url +viewset +viewsets +webhook +webhooks +webserver +webservice +workflow +zipcode +Datetime +Embeddable +Hierarkey +OAuth +SSL +Uptime +Yay diff --git a/doc/user/events/create.rst b/doc/user/events/create.rst index 5054ba3a45..4d98fe996d 100644 --- a/doc/user/events/create.rst +++ b/doc/user/events/create.rst @@ -30,13 +30,13 @@ available products, quotas, prices and some meta information, but most settings We recommend to use this feature only if you really know that you need it and if you really run a lot of events, not if you run e.g. a yearly conference. You can read more on this feature :ref:`here `. -Once you set these values, you can procede to the next step: +Once you set these values, you can proceed to the next step: .. thumbnail:: ../../screens/event/create_step2.png :align: center :class: screenshot -In this step, you will be asked more detailled questions about your event. In particular, you can fill in the +In this step, you will be asked more detailed questions about your event. In particular, you can fill in the following fields: Name diff --git a/doc/user/events/display.rst b/doc/user/events/display.rst index b86af33530..88386d4051 100644 --- a/doc/user/events/display.rst +++ b/doc/user/events/display.rst @@ -14,7 +14,7 @@ Logo image This logo will be shown as a banner above your shop. If you set it, the event name and date will no longer be displayed by the shop, so we suggest to include them in the image yourself. The maximal height of the image is 120 pixels and if you want to use the full width, make your image 1140 pixels wide. If the user's screen is - smaller, the logo will be scaled down automatically, so it should still be legigible at smaller sizes. + smaller, the logo will be scaled down automatically, so it should still be legible at smaller sizes. Frontpage text This text will be shown on the front page of your ticket shop, above the list of products. You can use it to explain @@ -39,4 +39,4 @@ Font Choose one of multiple fonts to use for your web shop. .. note:: Both the color and font settings can take a few seconds up to a few minutes before they become active on your - shop. \ No newline at end of file + shop. diff --git a/doc/user/events/subevents.rst b/doc/user/events/subevents.rst index f745e1a271..3fbd54eea6 100644 --- a/doc/user/events/subevents.rst +++ b/doc/user/events/subevents.rst @@ -103,7 +103,7 @@ End of presale Quotas As for all events, no tickets will be available unless there is a quota created for them that specifies the number - of tickets available. You can create multiple quotas that are assinged to this date directly from this interface. + of tickets available. You can create multiple quotas that are assigned to this date directly from this interface. Item prices This is a table of all products configured for your shop. If you want, you can enter a new price for each one of them diff --git a/doc/user/events/taxes.rst b/doc/user/events/taxes.rst index f68f717ddd..d856d66c32 100644 --- a/doc/user/events/taxes.rst +++ b/doc/user/events/taxes.rst @@ -18,7 +18,7 @@ your event, go to the respective section in your event's settings: :class: screenshot On this page, you can create, edit and delete your tax rules. Clicking on the name of a tax rule will take you to its -detailled settings: +detailed settings: .. thumbnail:: ../../screens/event/tax_detail.png :align: center diff --git a/doc/user/events/widget.rst b/doc/user/events/widget.rst index 02707e43e2..6f497b1c84 100644 --- a/doc/user/events/widget.rst +++ b/doc/user/events/widget.rst @@ -67,7 +67,7 @@ SSL --- Since buying a ticket normally involves entering sensitive data, we strongly suggest that you use SSL/HTTPS for the page -that includes the widget. Initiatives like `Let's Encrypt`_ allow you to obtain a SSL certificat free of charge. +that includes the widget. Initiatives like `Let's Encrypt`_ allow you to obtain a SSL certificate free of charge. All data transferred to pretix will be made over SSL, even if using the widget on a non-SSL site. However, without using SSL for your site, a man-in-the-middle attacker could potentially alter the widget in dangerous ways. Moreover, @@ -75,7 +75,7 @@ using SSL is becoming standard practice and your customers might want expect see granted to SSL-enabled web pages. By default, the checkout process will open in a new tab in your customer's browsers if you don't use SSL for your -website. If you confident to have a good reason for not using SSL, you can override this behaviour with the +website. If you confident to have a good reason for not using SSL, you can override this behavior with the ``skip-ssl-check`` attribute:: diff --git a/doc/user/faq.rst b/doc/user/faq.rst index 69b6bff051..2cf2ded7ff 100644 --- a/doc/user/faq.rst +++ b/doc/user/faq.rst @@ -9,7 +9,7 @@ There are multiple ways to do this. First, you could just create some orders in your real shop and cancel/refund them later. If you don't want to process real payments for the tests, you can either use a "manual" payment method like bank transfer and just mark the orders as paid with the button in the backend, or if you want to use e.g. Stripe, you can configure pretix to use your keys -for the Stripe test sytem and use their test credit cars. Read our :ref:`Stripe documentation ` for more +for the Stripe test system and use their test credit cars. Read our :ref:`Stripe documentation ` for more information. Second, you could create a separate event, just for testing. In the last step of the :ref:`event creation process `, @@ -48,4 +48,4 @@ If you created a product and it doesn't show up, please follow the following ste variation is contained in a quota. If your event is an event series, make sure that the product is contained in a quota that is assigned to the series date that you access the shop for. 6. If the sale period has not started yet or is already over, check the "Show items outside presale period" setting of - your event. \ No newline at end of file + your event. diff --git a/doc/user/markdown.rst b/doc/user/markdown.rst index 4a5074c5b9..f2c880cc0f 100644 --- a/doc/user/markdown.rst +++ b/doc/user/markdown.rst @@ -163,4 +163,4 @@ All other elements and attributes will be stripped during parsing. .. _Markdown: https://en.wikipedia.org/wiki/Markdown -.. _Wikipedia: https://en.wikipedia.org \ No newline at end of file +.. _Wikipedia: https://en.wikipedia.org diff --git a/doc/user/organizers/teams.rst b/doc/user/organizers/teams.rst index b6bb22418b..620d6fb682 100644 --- a/doc/user/organizers/teams.rst +++ b/doc/user/organizers/teams.rst @@ -47,11 +47,11 @@ Permissions separate into two areas: * Can change product settings – This permission allows to create and modify products and objects that are closely related to products, such as product categories, quotas, and questions. - * Can view orders – This permission allows viewing the list of orders and allindividual order details, but not + * Can view orders – This permission allows viewing the list of orders and all individual order details, but not changing anything about it. This also includes the various exports offered. * Can change orders – This permission allows all actions that involve changing an order, such as changing the products - in an order, marking an order as paid or refunden, importing banking data, etc. This only works properly if the + in an order, marking an order as paid or refunded, importing banking data, etc. This only works properly if the same users also have the "Can view orders" permission. * Can view vouchers – This permission allows viewing the list of vouchers including the voucher codes themselves and diff --git a/doc/user/payments/fees.rst b/doc/user/payments/fees.rst index 1b19840b1b..e952260112 100644 --- a/doc/user/payments/fees.rst +++ b/doc/user/payments/fees.rst @@ -60,4 +60,4 @@ same 5 %, such that for a ticket with a list price of 100 € you will get your ===================================================== ============= Due to the various rounding steps performed by pretix and by the payment provider, the end total on - your bank account might stil vary by one cent. + your bank account might still vary by one cent. diff --git a/doc/user/payments/overview.rst b/doc/user/payments/overview.rst index d15eec7d10..e6a7a97926 100644 --- a/doc/user/payments/overview.rst +++ b/doc/user/payments/overview.rst @@ -2,7 +2,7 @@ Payment method overview ======================= pretix allows you to accept payments using a variety of payment methods to fit the needs of very different events. -This page gives you a short overview over them and links to more detailled descriptions in some cases. +This page gives you a short overview over them and links to more detailed descriptions in some cases. Payment methods are built as pretix plugins. For this reason, you might first need to enable a certain plugin at "Settings" → "Plugins" in your event settings. Then, you can configure them in detail at "Settings" -> "Payment". @@ -13,5 +13,4 @@ on this page as well as for additional ones. To get an overview of the officially supported payment methods and their pros and cons, head to the `pretix website`_. On these pages, you get more information on how to configure :ref:`stripe`, :ref:`paypal`, and :ref:`banktransfer`. - -.. _pretix website: https://pretix.eu/about/en/payments \ No newline at end of file +.. _pretix website: https://pretix.eu/about/en/payments diff --git a/doc/user/payments/settings.rst b/doc/user/payments/settings.rst index 40359a2ed8..0b6776fcee 100644 --- a/doc/user/payments/settings.rst +++ b/doc/user/payments/settings.rst @@ -11,7 +11,7 @@ of the page shows a number of general settings that affect all payment methods: In particular, these are: Payment term in days - If a order has been created, it is supposed to be paid within this number of days. Of course, some payment mehtods + If a order has been created, it is supposed to be paid within this number of days. Of course, some payment methods (like credit card) succeed immediately in most cases, but others don't (like bank transfer) and even credit card payments might fail and you might want to give the customer a chance to try another credit card before losing their ticket. Therefore, we recommend setting a few days here. If you are accepting bank transfers, we wouldn't recommend @@ -19,7 +19,7 @@ Payment term in days Last date of payments There is probably no use for payments received after your event, so you can set a date that the payment deadline of - a new order will never exceed. This has precendence over the number of days configured above, so if I create an order + a new order will never exceed. This has precedence over the number of days configured above, so if I create an order two days before the configured last date of payments, my payment term will only be two days, not ten. If you have payment methods that always require some time (like bank transfer), you will later be able to selectively disable them once the event comes closer. diff --git a/src/pretix/base/exporter.py b/src/pretix/base/exporter.py index 9566eada49..f68ead6b98 100644 --- a/src/pretix/base/exporter.py +++ b/src/pretix/base/exporter.py @@ -25,7 +25,7 @@ class BaseExporter: """ A short and unique identifier for this exporter. This should only contain lowercase letters and in most - cases will be the same as your packagename. + cases will be the same as your package name. """ raise NotImplementedError() # NOQA diff --git a/src/pretix/base/models/invoices.py b/src/pretix/base/models/invoices.py index 9a54dec06f..8b96595bb8 100644 --- a/src/pretix/base/models/invoices.py +++ b/src/pretix/base/models/invoices.py @@ -55,9 +55,9 @@ class Invoice(models.Model): :type footer_text: str :param foreign_currency_display: A different currency that taxes should also be displayed in. :type foreign_currency_display: str - :param foreign_currency_rate: The rate of a forein currency that the taxes should be displayed in. + :param foreign_currency_rate: The rate of a foreign currency that the taxes should be displayed in. :type foreign_currency_rate: Decimal - :param foreign_currency_rate_date: The date of the forein currency exchange rates. + :param foreign_currency_rate_date: The date of the foreign currency exchange rates. :type foreign_currency_rate_date: date :param file: The filename of the rendered invoice :type file: File diff --git a/src/pretix/base/models/items.py b/src/pretix/base/models/items.py index aa65b264f3..1a60f7b577 100644 --- a/src/pretix/base/models/items.py +++ b/src/pretix/base/models/items.py @@ -550,7 +550,7 @@ class Question(LoggedModel): :param question: The question text. This will be displayed next to the input field. :type question: str :param type: One of the above types - :param required: Whether answering this question is required for submiting an order including + :param required: Whether answering this question is required for submitting an order including items associated with this question. :type required: bool :param items: A set of ``Items`` objects that this question should be applied to @@ -667,7 +667,7 @@ class Quota(LoggedModel): again if those people do not proceed to the checkout. AVAILABILITY_ORDERED - This item is currently not availalbe for sale because all available + This item is currently not available for sale because all available items are ordered. It might become available again if those people do not pay. diff --git a/src/pretix/base/models/orders.py b/src/pretix/base/models/orders.py index c2a3b66e81..76f214a3e2 100644 --- a/src/pretix/base/models/orders.py +++ b/src/pretix/base/models/orders.py @@ -188,7 +188,7 @@ class Order(LoggedModel): def full_code(self): """ An order code which is unique among all events of a single organizer, - built by contatenating the event slug and the order code. + built by concatenating the event slug and the order code. """ return '{event}-{code}'.format(event=self.event.slug.upper(), code=self.code) @@ -519,7 +519,7 @@ class AbstractPosition(models.Model): :type variation: ItemVariation :param datetime: The datetime this item was put into the cart :type datetime: datetime - :param expires: The date until this item is guarenteed to be reserved + :param expires: The date until this item is guaranteed to be reserved :type expires: datetime :param price: The price of this item :type price: decimal.Decimal diff --git a/src/pretix/base/payment.py b/src/pretix/base/payment.py index bca9e46ca6..2341bfdba0 100644 --- a/src/pretix/base/payment.py +++ b/src/pretix/base/payment.py @@ -324,7 +324,7 @@ class BasePaymentProvider: at least store the user's input into his session. This method should return ``False`` if the user's input was invalid, ``True`` - if the input was valid and the frontend should continue with default behaviour + if the input was valid and the frontend should continue with default behavior or a string containing a URL if the user should be redirected somewhere else. On errors, you should use Django's message framework to display an error message @@ -375,7 +375,7 @@ class BasePaymentProvider: """ After the user has confirmed their purchase, this method will be called to complete the payment process. This is the place to actually move the money if applicable. - If you need any special behaviour, you can return a string + If you need any special behavior, you can return a string containing the URL the user will be redirected to. If you are done with your process you should return the user to the order's detail page. @@ -523,8 +523,8 @@ class BasePaymentProvider: Will be called if the event administrator confirms the refund. This should transfer the money back (if possible). You can return the URL the - user should be redirected to if you need special behaviour or None to continue - with default behaviour. + user should be redirected to if you need special behavior or None to continue + with default behavior. On failure, you should use Django's message framework to display an error message to the user. @@ -588,8 +588,8 @@ class FreeOrderProvider(BasePaymentProvider): Will be called if the event administrator confirms the refund. This should transfer the money back (if possible). You can return the URL the - user should be redirected to if you need special behaviour or None to continue - with default behaviour. + user should be redirected to if you need special behavior or None to continue + with default behavior. On failure, you should use Django's message framework to display an error message to the user. diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py index a265f4d4fc..06879f5b0c 100644 --- a/src/pretix/base/signals.py +++ b/src/pretix/base/signals.py @@ -315,7 +315,7 @@ This signal allows you to implement a middleware-style filter on all outgoing em return a (possibly modified) copy of the message object passed to you. As with all event-plugin signals, the ``sender`` keyword argument will contain the event. -The ``message`` argument will contian an ``EmailMultiAlternatives`` object. +The ``message`` argument will contain an ``EmailMultiAlternatives`` object. If the email is associated with a specific order, the ``order`` argument will be passed as well, otherwise it will be ``None``. """ diff --git a/src/pretix/control/forms/global_settings.py b/src/pretix/control/forms/global_settings.py index 88c73eb8c7..63c3d34bbd 100644 --- a/src/pretix/control/forms/global_settings.py +++ b/src/pretix/control/forms/global_settings.py @@ -43,7 +43,7 @@ class UpdateSettingsForm(SettingsForm): "the current version of pretix and your installed plugins and the number of active and " "inactive events in your installation to servers operated by the pretix developers. We " "will only store anonymous data, never any IP addresses and we will not know who you are " - "or where to find your instance. You can disable this behaviour here at any time.") + "or where to find your instance. You can disable this behavior here at any time.") ) update_check_email = forms.EmailField( required=False, diff --git a/src/pretix/control/signals.py b/src/pretix/control/signals.py index 9bfe7aa6a1..5a393fc939 100644 --- a/src/pretix/control/signals.py +++ b/src/pretix/control/signals.py @@ -176,7 +176,7 @@ as active. If your linked view should stay in the tab-like context of this page, we recommend that you use ``pretix.control.views.organizer.OrganizerDetailViewMixin`` for your view -and your tempalte inherits from ``pretixcontrol/organizers/base.html``. +and your template inherits from ``pretixcontrol/organizers/base.html``. This is a regular django signal (no pretix event signal). Receivers will be passed the keyword arguments ``organizer`` and ``request``. @@ -205,7 +205,7 @@ as active. If your linked view should stay in the tab-like context of this page, we recommend that you use ``pretix.control.views.event.EventSettingsViewMixin`` for your view -and your tempalte inherits from ``pretixcontrol/event/settings_base.html``. +and your template inherits from ``pretixcontrol/event/settings_base.html``. As with all plugin signals, the ``sender`` keyword argument will contain the event. A second keyword argument ``request`` will contain the request object. diff --git a/src/pretix/plugins/paypal/payment.py b/src/pretix/plugins/paypal/payment.py index 2532446763..673b1d43d3 100644 --- a/src/pretix/plugins/paypal/payment.py +++ b/src/pretix/plugins/paypal/payment.py @@ -166,8 +166,8 @@ class Paypal(BasePaymentProvider): Will be called if the user submitted his order successfully to initiate the payment process. - It should return a custom redirct URL, if you need special behaviour, or None to - continue with default behaviour. + It should return a custom redirct URL, if you need special behavior, or None to + continue with default behavior. On errors, it should use Django's message framework to display an error message to the user (or the normal form validation error messages). diff --git a/src/pretix/presale/signals.py b/src/pretix/presale/signals.py index 221cdc6b31..d9f540dd7e 100644 --- a/src/pretix/presale/signals.py +++ b/src/pretix/presale/signals.py @@ -64,7 +64,7 @@ order_meta_from_request = EventPluginSignal( """ This signal is sent before an order is created through the pretixpresale frontend. It allows you to return a dictionary that will be merged in the meta_info attribute of the order. -You will recieve the request triggering the order creation as the ``request`` keyword argument. +You will receive the request triggering the order creation as the ``request`` keyword argument. As with all event-plugin signals, the ``sender`` keyword argument will contain the event. """