From b16824ec2bc58a22426ac8779b65dc0887e28947 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 4 Jan 2017 22:10:06 +0100 Subject: [PATCH] Rename readme, fix packaging --- README.md => README.rst | 22 ++- src/.gitignore | 2 +- src/MANIFEST.in | 1 + .../static/jsi18n/de-informal/djangojs.js | 156 ------------------ src/pretix/static/jsi18n/de/djangojs.js | 156 ------------------ src/setup.py | 4 +- 6 files changed, 19 insertions(+), 322 deletions(-) rename README.md => README.rst (65%) delete mode 100644 src/pretix/static/jsi18n/de-informal/djangojs.js delete mode 100644 src/pretix/static/jsi18n/de/djangojs.js diff --git a/README.md b/README.rst similarity index 65% rename from README.md rename to README.rst index 02f21b66c..5ad97dfdf 100644 --- a/README.md +++ b/README.rst @@ -1,9 +1,14 @@ pretix ====== -[![Docs](https://readthedocs.org/projects/pretix/badge/?version=latest)](http://docs.pretix.eu/en/latest/) -[![Build Status](https://travis-ci.org/pretix/pretix.svg?branch=master)](https://travis-ci.org/pretix/pretix) -[![Coverage Status](https://img.shields.io/coveralls/pretix/pretix.svg)](https://coveralls.io/r/pretix/pretix) +.. image:: https://readthedocs.org/projects/pretix/badge/?version=latest + :target: https://docs.pretix.eu/en/latest/ + +.. image:: https://travis-ci.org/pretix/pretix.svg?branch=master + :target: https://travis-ci.org/pretix/pretix + +.. image:: https://coveralls.io/repos/github/pretix/pretix/badge.svg?branch=master + :target: https://coveralls.io/r/pretix/pretix Reinventing ticket presales, one bit at a time. @@ -20,12 +25,11 @@ like, but we try to keep the changes to documented APIs as small as possible. If in production or develop a plugin now, I invite you to send me an email so that I can notify you of changes and bugs that require your attention. -Since very recently we now have an [installation guide](https://docs.pretix.eu/en/latest/admin/installation/index.html) -in our documentation. +Since very recently we now have an `installation guide`_ in our documentation. Contributing ------------ -If you want to contribute to pretix, please read the [developer documentation](https://docs.pretix.eu/en/latest/development/index.html) +If you want to contribute to pretix, please read the `developer documentation`_ in our documentation. If you have any further questions, please do not hesitate to ask! License @@ -38,4 +42,8 @@ AUTHORS file for a list of all the awesome folks who contributed to this project This project is 100 percent free and open source software. If you are interested in commercial support, hosting services or supporting this project financially, please -go to [pretix.eu](https://pretix.eu) or contact Raphael directly. +go to `pretix.eu`_ or contact Raphael directly. + +.. _installation guide: https://docs.pretix.eu/en/latest/admin/installation/index.html +.. _developer documentation: https://docs.pretix.eu/en/latest/development/index.html +.. _pretix.eu: https://pretix.eu diff --git a/src/.gitignore b/src/.gitignore index cb5e9fb6b..57e167277 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -7,4 +7,4 @@ build/ dist/ *.egg-info/ *.bak -static/jsi18n/ +pretix/static/jsi18n/ diff --git a/src/MANIFEST.in b/src/MANIFEST.in index 7f14bcaea..0f99efb6c 100644 --- a/src/MANIFEST.in +++ b/src/MANIFEST.in @@ -7,6 +7,7 @@ recursive-include pretix/base/templates * recursive-include pretix/control/templates * recursive-include pretix/presale/templates * recursive-include pretix/plugins/banktransfer/templates * +recursive-include pretix/plugins/banktransfer/static * recursive-include pretix/plugins/paypal/templates * recursive-include pretix/plugins/pretixdroid/templates * recursive-include pretix/plugins/pretixdroid/static * diff --git a/src/pretix/static/jsi18n/de-informal/djangojs.js b/src/pretix/static/jsi18n/de-informal/djangojs.js deleted file mode 100644 index 07399ac57..000000000 --- a/src/pretix/static/jsi18n/de-informal/djangojs.js +++ /dev/null @@ -1,156 +0,0 @@ - - -(function(globals) { - - var django = globals.django || (globals.django = {}); - - - django.pluralidx = function(n) { - var v=(n != 1); - if (typeof(v) == 'boolean') { - return v ? 1 : 0; - } else { - return v; - } - }; - - - /* gettext library */ - - django.catalog = django.catalog || {}; - - var newcatalog = { - "An error of type {code} occured.": "Ein Fehler ist aufgetreten. Fehlercode: {code}", - "Close message": "Schlie\u00dfen", - "Comment:": "Kommentar:", - "Contacting Stripe \u2026": "Kontaktiere Stripe \u2026", - "Count": "Anzahl", - "Marked as paid": "Als bezahlt markiert", - "Others": "Sonstige", - "Paid orders": "Bezahlte Bestellungen", - "Placed orders": "Get\u00e4tigte Bestellungen", - "The items in your cart are no longer reserved for you.": "Die Produkte in Ihrem Warenkorb sind nicht mehr f\u00fcr Sie reserviert.", - "The items in your cart are reserved for you for one minute.": [ - "Die Produkte in Ihrem Warenkorb sind noch eine Minute f\u00fcr Sie reserviert.", - "Die Produkte in Ihrem Warenkorb sind noch {num} Minuten f\u00fcr Sie reserviert." - ], - "The request took to long. Please try again.": "Diese Anfrage hat zu lange gedauert. Bitte erneut versuchen.", - "Total revenue": "Gesamtumsatz", - "Unknown error.": "Unbekannter Fehler.", - "We are currently sending your request to the server. If this takes longer than one minute, please check your internet connection and then reload this page and try again.": "Ihre Anfrage wird an den Server gesendet. Wenn dies l\u00e4nger als eine Minute dauert, pr\u00fcfen Sie bitte Ihre Internetverbindung. Danach k\u00f6nnen Sie diese Seite neu laden und es erneut versuchen.", - "We are processing your request \u2026": "Wir verarbeiten deine Anfrage \u2026", - "We currenctly cannot reach the server, but we keep trying. Last error code: {code}": "Wir k\u00f6nnen den Server aktuell nicht erreichen, versuchen es aber weiter. Letzter Fehlercode: {code}", - "We currenctly cannot reach the server. Please try again. Error code: {code}": "Wir k\u00f6nnen den Server aktuell nicht erreichen. Bitte versuchen Sie es noch einmal. Fehlercode: {code}", - "Your request has been queued on the server and will now be processed. If this takes longer than two minutes, please contact us or go back in your browser and try again.": "Ihre Anfrage ist auf dem Server angekommen und wird nun verarbeitet. Wenn dies l\u00e4nger als zwei Minuten dauert, kontaktieren Sie uns bitte oder gehen Sie in Ihrem Browser einen Schritt zur\u00fcck und versuchen es erneut." - }; - for (var key in newcatalog) { - django.catalog[key] = newcatalog[key]; - } - - - if (!django.jsi18n_initialized) { - django.gettext = function(msgid) { - var value = django.catalog[msgid]; - if (typeof(value) == 'undefined') { - return msgid; - } else { - return (typeof(value) == 'string') ? value : value[0]; - } - }; - - django.ngettext = function(singular, plural, count) { - var value = django.catalog[singular]; - if (typeof(value) == 'undefined') { - return (count == 1) ? singular : plural; - } else { - return value[django.pluralidx(count)]; - } - }; - - django.gettext_noop = function(msgid) { return msgid; }; - - django.pgettext = function(context, msgid) { - var value = django.gettext(context + '\x04' + msgid); - if (value.indexOf('\x04') != -1) { - value = msgid; - } - return value; - }; - - django.npgettext = function(context, singular, plural, count) { - var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); - if (value.indexOf('\x04') != -1) { - value = django.ngettext(singular, plural, count); - } - return value; - }; - - django.interpolate = function(fmt, obj, named) { - if (named) { - return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); - } else { - return fmt.replace(/%s/g, function(match){return String(obj.shift())}); - } - }; - - - /* formatting library */ - - django.formats = { - "DATETIME_FORMAT": "j. F Y H:i", - "DATETIME_INPUT_FORMATS": [ - "%d.%m.%Y %H:%M:%S", - "%d.%m.%Y %H:%M:%S.%f", - "%d.%m.%Y %H:%M", - "%d.%m.%Y", - "%Y-%m-%d %H:%M:%S", - "%Y-%m-%d %H:%M:%S.%f", - "%Y-%m-%d %H:%M", - "%Y-%m-%d" - ], - "DATE_FORMAT": "j. F Y", - "DATE_INPUT_FORMATS": [ - "%d.%m.%Y", - "%d.%m.%y", - "%Y-%m-%d" - ], - "DECIMAL_SEPARATOR": ",", - "FIRST_DAY_OF_WEEK": "1", - "MONTH_DAY_FORMAT": "j. F", - "NUMBER_GROUPING": "3", - "SHORT_DATETIME_FORMAT": "d.m.Y H:i", - "SHORT_DATE_FORMAT": "d.m.Y", - "THOUSAND_SEPARATOR": ".", - "TIME_FORMAT": "H:i", - "TIME_INPUT_FORMATS": [ - "%H:%M:%S", - "%H:%M:%S.%f", - "%H:%M" - ], - "YEAR_MONTH_FORMAT": "F Y" - }; - - django.get_format = function(format_type) { - var value = django.formats[format_type]; - if (typeof(value) == 'undefined') { - return format_type; - } else { - return value; - } - }; - - /* add to global namespace */ - globals.pluralidx = django.pluralidx; - globals.gettext = django.gettext; - globals.ngettext = django.ngettext; - globals.gettext_noop = django.gettext_noop; - globals.pgettext = django.pgettext; - globals.npgettext = django.npgettext; - globals.interpolate = django.interpolate; - globals.get_format = django.get_format; - - django.jsi18n_initialized = true; - } - -}(this)); - diff --git a/src/pretix/static/jsi18n/de/djangojs.js b/src/pretix/static/jsi18n/de/djangojs.js deleted file mode 100644 index 07399ac57..000000000 --- a/src/pretix/static/jsi18n/de/djangojs.js +++ /dev/null @@ -1,156 +0,0 @@ - - -(function(globals) { - - var django = globals.django || (globals.django = {}); - - - django.pluralidx = function(n) { - var v=(n != 1); - if (typeof(v) == 'boolean') { - return v ? 1 : 0; - } else { - return v; - } - }; - - - /* gettext library */ - - django.catalog = django.catalog || {}; - - var newcatalog = { - "An error of type {code} occured.": "Ein Fehler ist aufgetreten. Fehlercode: {code}", - "Close message": "Schlie\u00dfen", - "Comment:": "Kommentar:", - "Contacting Stripe \u2026": "Kontaktiere Stripe \u2026", - "Count": "Anzahl", - "Marked as paid": "Als bezahlt markiert", - "Others": "Sonstige", - "Paid orders": "Bezahlte Bestellungen", - "Placed orders": "Get\u00e4tigte Bestellungen", - "The items in your cart are no longer reserved for you.": "Die Produkte in Ihrem Warenkorb sind nicht mehr f\u00fcr Sie reserviert.", - "The items in your cart are reserved for you for one minute.": [ - "Die Produkte in Ihrem Warenkorb sind noch eine Minute f\u00fcr Sie reserviert.", - "Die Produkte in Ihrem Warenkorb sind noch {num} Minuten f\u00fcr Sie reserviert." - ], - "The request took to long. Please try again.": "Diese Anfrage hat zu lange gedauert. Bitte erneut versuchen.", - "Total revenue": "Gesamtumsatz", - "Unknown error.": "Unbekannter Fehler.", - "We are currently sending your request to the server. If this takes longer than one minute, please check your internet connection and then reload this page and try again.": "Ihre Anfrage wird an den Server gesendet. Wenn dies l\u00e4nger als eine Minute dauert, pr\u00fcfen Sie bitte Ihre Internetverbindung. Danach k\u00f6nnen Sie diese Seite neu laden und es erneut versuchen.", - "We are processing your request \u2026": "Wir verarbeiten deine Anfrage \u2026", - "We currenctly cannot reach the server, but we keep trying. Last error code: {code}": "Wir k\u00f6nnen den Server aktuell nicht erreichen, versuchen es aber weiter. Letzter Fehlercode: {code}", - "We currenctly cannot reach the server. Please try again. Error code: {code}": "Wir k\u00f6nnen den Server aktuell nicht erreichen. Bitte versuchen Sie es noch einmal. Fehlercode: {code}", - "Your request has been queued on the server and will now be processed. If this takes longer than two minutes, please contact us or go back in your browser and try again.": "Ihre Anfrage ist auf dem Server angekommen und wird nun verarbeitet. Wenn dies l\u00e4nger als zwei Minuten dauert, kontaktieren Sie uns bitte oder gehen Sie in Ihrem Browser einen Schritt zur\u00fcck und versuchen es erneut." - }; - for (var key in newcatalog) { - django.catalog[key] = newcatalog[key]; - } - - - if (!django.jsi18n_initialized) { - django.gettext = function(msgid) { - var value = django.catalog[msgid]; - if (typeof(value) == 'undefined') { - return msgid; - } else { - return (typeof(value) == 'string') ? value : value[0]; - } - }; - - django.ngettext = function(singular, plural, count) { - var value = django.catalog[singular]; - if (typeof(value) == 'undefined') { - return (count == 1) ? singular : plural; - } else { - return value[django.pluralidx(count)]; - } - }; - - django.gettext_noop = function(msgid) { return msgid; }; - - django.pgettext = function(context, msgid) { - var value = django.gettext(context + '\x04' + msgid); - if (value.indexOf('\x04') != -1) { - value = msgid; - } - return value; - }; - - django.npgettext = function(context, singular, plural, count) { - var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); - if (value.indexOf('\x04') != -1) { - value = django.ngettext(singular, plural, count); - } - return value; - }; - - django.interpolate = function(fmt, obj, named) { - if (named) { - return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); - } else { - return fmt.replace(/%s/g, function(match){return String(obj.shift())}); - } - }; - - - /* formatting library */ - - django.formats = { - "DATETIME_FORMAT": "j. F Y H:i", - "DATETIME_INPUT_FORMATS": [ - "%d.%m.%Y %H:%M:%S", - "%d.%m.%Y %H:%M:%S.%f", - "%d.%m.%Y %H:%M", - "%d.%m.%Y", - "%Y-%m-%d %H:%M:%S", - "%Y-%m-%d %H:%M:%S.%f", - "%Y-%m-%d %H:%M", - "%Y-%m-%d" - ], - "DATE_FORMAT": "j. F Y", - "DATE_INPUT_FORMATS": [ - "%d.%m.%Y", - "%d.%m.%y", - "%Y-%m-%d" - ], - "DECIMAL_SEPARATOR": ",", - "FIRST_DAY_OF_WEEK": "1", - "MONTH_DAY_FORMAT": "j. F", - "NUMBER_GROUPING": "3", - "SHORT_DATETIME_FORMAT": "d.m.Y H:i", - "SHORT_DATE_FORMAT": "d.m.Y", - "THOUSAND_SEPARATOR": ".", - "TIME_FORMAT": "H:i", - "TIME_INPUT_FORMATS": [ - "%H:%M:%S", - "%H:%M:%S.%f", - "%H:%M" - ], - "YEAR_MONTH_FORMAT": "F Y" - }; - - django.get_format = function(format_type) { - var value = django.formats[format_type]; - if (typeof(value) == 'undefined') { - return format_type; - } else { - return value; - } - }; - - /* add to global namespace */ - globals.pluralidx = django.pluralidx; - globals.gettext = django.gettext; - globals.ngettext = django.ngettext; - globals.gettext_noop = django.gettext_noop; - globals.pgettext = django.pgettext; - globals.npgettext = django.npgettext; - globals.interpolate = django.interpolate; - globals.get_format = django.get_format; - - django.jsi18n_initialized = true; - } - -}(this)); - diff --git a/src/setup.py b/src/setup.py index 2b25818d6..b48e6e1e5 100644 --- a/src/setup.py +++ b/src/setup.py @@ -11,7 +11,7 @@ here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file try: - with open(path.join(here, '../README.md'), encoding='utf-8') as f: + with open(path.join(here, '../README.rst'), encoding='utf-8') as f: long_description = f.read() except: long_description = '' @@ -122,5 +122,5 @@ setup( packages=find_packages(exclude=['tests', 'tests.*']), include_package_data=True, - cmdclass=cmdclass + cmdclass=cmdclass, )