Talk about 'products', not 'items'

This commit is contained in:
Raphael Michel
2015-03-14 16:04:39 +01:00
parent c5aced9e42
commit f617c48973
22 changed files with 83 additions and 85 deletions

View File

@@ -352,12 +352,12 @@ class Event(Versionable):
presale_end = models.DateTimeField(
null=True, blank=True,
verbose_name=_("End of presale"),
help_text=_("No items will be sold after this date."),
help_text=_("No products will be sold after this date."),
)
presale_start = models.DateTimeField(
null=True, blank=True,
verbose_name=_("Start of presale"),
help_text=_("No items will be sold before this date."),
help_text=_("No products will be sold before this date."),
)
payment_term_days = models.PositiveIntegerField(
default=14,
@@ -433,7 +433,7 @@ class EventPermission(Versionable):
)
can_change_items = models.BooleanField(
default=True,
verbose_name=_("Can change item settings")
verbose_name=_("Can change product settings")
)
class Meta:
@@ -466,8 +466,8 @@ class ItemCategory(Versionable):
)
class Meta:
verbose_name = _("Item category")
verbose_name_plural = _("Item categories")
verbose_name = _("Product category")
verbose_name_plural = _("Product categories")
ordering = ('position', 'id')
def __str__(self):
@@ -507,8 +507,8 @@ class Property(Versionable):
)
class Meta:
verbose_name = _("Item property")
verbose_name_plural = _("Item properties")
verbose_name = _("Product property")
verbose_name_plural = _("Product properties")
def __str__(self):
return self.name
@@ -623,7 +623,9 @@ class Question(Versionable):
class Item(Versionable):
"""
An item is a thing which can be sold. It belongs to an
event and may or may not belong to a category.
event and may or may not belong to a category. Items are often
also called 'products' but are named 'items' internally due to
historic reasons.
It has a default price which might by overriden by
restrictions.
@@ -656,7 +658,7 @@ class Item(Versionable):
deleted = models.BooleanField(default=False)
short_description = models.TextField(
verbose_name=_("Short description"),
help_text=_("This is shown below the item name in lists."),
help_text=_("This is shown below the product name in lists."),
null=True, blank=True,
)
long_description = models.TextField(
@@ -697,15 +699,15 @@ class Item(Versionable):
admission = models.BooleanField(
verbose_name=_("Is an admission ticket"),
help_text=_(
'Whether or not this item allows a person to enter '
'Whether or not buying this product allows a person to enter '
'your event'
),
default=False
)
class Meta:
verbose_name = _("Item")
verbose_name_plural = _("Items")
verbose_name = _("Product")
verbose_name_plural = _("Products")
def __str__(self):
return self.name
@@ -909,8 +911,8 @@ class ItemVariation(Versionable):
)
class Meta:
verbose_name = _("Item variation")
verbose_name_plural = _("Item variations")
verbose_name = _("Product variation")
verbose_name_plural = _("Product variations")
def __str__(self):
return str(self.to_variation_dict())
@@ -1412,7 +1414,7 @@ class OrderPosition(ObjectWithAnswers, Versionable):
max_length=255,
verbose_name=_("Attendee name"),
blank=True, null=True,
help_text=_("Empty, if this item is not an admission ticket")
help_text=_("Empty, if this product is not an admission ticket")
)
class Meta:
@@ -1478,7 +1480,7 @@ class CartPosition(ObjectWithAnswers, Versionable):
max_length=255,
verbose_name=_("Attendee name"),
blank=True, null=True,
help_text=_("Empty, if this item is not an admission ticket")
help_text=_("Empty, if this product is not an admission ticket")
)
class Meta:

View File

@@ -46,7 +46,7 @@
<li>
<a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}"
{% if "event.items" == url_name or "event.item." in url_name or url_name == "event.item" %}class="active"{% endif %}>
{% trans "Items" %}</a>
{% trans "Products" %}</a>
</li>
<li>
<a href="{% url 'control:event.items.quotas' organizer=request.event.organizer.slug event=request.event.slug %}"
@@ -78,14 +78,6 @@
<a href="#">
<i class="fa fa-shopping-cart fa-fw"></i>
{% trans "Orders" %}
<span class="fa arrow"></span>
</a>
<ul class="nav nav-second-level">
<li>
<a href="{% url 'control:event.items' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "View orders" %}
</a>
</li>
</ul>
</li>
{% endblock %}

View File

@@ -1,16 +1,16 @@
{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% block title %}{{ item.name }} :: {% trans "Item" %}{% endblock %}
{% block title %}{{ item.name }} :: {% trans "Product" %}{% endblock %}
{% block content %}
{% if item.identity %}
<h1>{% trans "Modify item:" %} {{ item.name }}</h1>
<h1>{% trans "Modify product:" %} {{ item.name }}</h1>
<ul class="nav nav-pills">
<li {% if "event.item" == url_name %}class="active"{% endif %}><a href="{% url 'control:event.item' organizer=request.event.organizer.slug event=request.event.slug item=item.identity %}">{% trans "General information" %}</a></li>
<li {% if "event.item.variations" == url_name %}class="active"{% endif %}><a href="{% url 'control:event.item.variations' organizer=request.event.organizer.slug event=request.event.slug item=item.identity %}">{% trans "Variations" %}</a></li>
<li {% if "event.item.restrictions" == url_name %}class="active"{% endif %}><a href="{% url 'control:event.item.restrictions' organizer=request.event.organizer.slug event=request.event.slug item=item.identity %}">{% trans "Restrictions" %}</a></li>
</ul>
{% else %}
<h1>{% trans "Create item" %}</h1>
<h1>{% trans "Create product" %}</h1>
<p>{% blocktrans trimmed %}
You will be able to adjust further settings in the next step.
{% endblocktrans %}</p>
@@ -18,8 +18,8 @@
{% if item.identity and not item.quotas.exists %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
Please note, that your item will <strong>not</strong> be available for sale until you added your item
to an existing or newly created quota.
Please note, that your product will <strong>not</strong> be available for sale until you added your
item to an existing or newly created quota.
{% endblocktrans %}
</div>
{% endif %}

View File

@@ -4,7 +4,7 @@
{% load formset_tags %}
{% block inside %}
<p>{% blocktrans trimmed %}
In this area, you can choose of a set of "restriction types" to restrict the availability of your item with
In this area, you can choose of a set of "restriction types" to restrict the availability of your product with
certain conditions.
{% endblocktrans %}</p>
<form action="" method="post">

View File

@@ -1,6 +1,6 @@
{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% block title %}{% trans "Items" %}{% endblock %}
{% block title %}{% trans "Products" %}{% endblock %}
{% block content %}
{% block inside %}
{% endblock %}

View File

@@ -1,8 +1,8 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% block title %}{% trans "Item categories" %}{% endblock %}
{% block title %}{% trans "Product categories" %}{% endblock %}
{% block inside %}
<h1>{% trans "Item categories" %}</h1>
<h1>{% trans "Product categories" %}</h1>
{% if "updated" in request.GET %}
<div class="alert alert-success">
{% trans "Your changes have been saved." %}
@@ -22,7 +22,7 @@
<table class="table table-hover">
<thead>
<tr>
<th>{% trans "Item categories" %}</th>
<th>{% trans "Product categories" %}</th>
<th></th>
<th></th>
</tr>

View File

@@ -1,9 +1,9 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Item category" %}{% endblock %}
{% block title %}{% trans "Product category" %}{% endblock %}
{% block inside %}
<h1>{% trans "Item category" %}</h1>
<h1>{% trans "Product category" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% if "success" in request.GET %}

View File

@@ -1,12 +1,14 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Delete item category" %}{% endblock %}
{% block title %}{% trans "Delete product category" %}{% endblock %}
{% block inside %}
<h1>{% trans "Delete item category" %}</h1>
<h1>{% trans "Delete product category" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete the category <strong>{{ category.name }}</strong>?{% endblocktrans %}</p>
<p>{% blocktrans trimmed with name=category.name %}
Are you sure you want to delete the category <strong>{{ name }}</strong>?
{% endblocktrans %}</p>
<div class="form-group submit-group">
<a href="{% url "control:event.items.categories" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel">
{% trans "Cancel" %}

View File

@@ -1,15 +1,16 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% block title %}{% trans "Items" %}{% endblock %}
{% block title %}{% trans "Products" %}{% endblock %}
{% block inside %}
<h1>{% trans "Items" %}</h1>
<h1>{% trans "Products" %}</h1>
<p>
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create new item" %}</a>
<a href="{% url "control:event.items.add" organizer=request.event.organizer.slug event=request.event.slug %}"
class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create new product" %}</a>
</p>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>{% trans "Item name" %}</th>
<th>{% trans "Product name" %}</th>
<th>{% trans "Category" %}</th>
</tr>
</thead>

View File

@@ -1,8 +1,8 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% block title %}{% trans "Item properties" %}{% endblock %}
{% block title %}{% trans "Product properties" %}{% endblock %}
{% block inside %}
<h1>{% trans "Item properties" %}</h1>
<h1>{% trans "Product properties" %}</h1>
{% if "updated" in request.GET %}
<div class="alert alert-success">
{% trans "Your changes have been saved." %}
@@ -22,7 +22,7 @@
<table class="table table-hover">
<thead>
<tr>
<th>{% trans "Item properties" %}</th>
<th>{% trans "Product properties" %}</th>
<th></th>
</tr>
</thead>

View File

@@ -2,9 +2,9 @@
{% load i18n %}
{% load bootstrap3 %}
{% load formset_tags %}
{% block title %}{% trans "Item property" %}{% endblock %}
{% block title %}{% trans "Product property" %}{% endblock %}
{% block inside %}
<h1>{% trans "Item property" %}</h1>
<h1>{% trans "Product property" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% if "success" in request.GET %}

View File

@@ -1,11 +1,11 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Delete item property" %}{% endblock %}
{% block title %}{% trans "Delete product property" %}{% endblock %}
{% block inside %}
<h1>{% trans "Delete item property" %}</h1>
<h1>{% trans "Delete product property" %}</h1>
{% if not possible %}
<p>{% blocktrans %}You can not delete the property <strong>{{ property }}</strong> as long as the following items use it:{% endblocktrans %}</p>
<p>{% blocktrans %}You can not delete the property <strong>{{ property }}</strong> as long as the following products use it:{% endblocktrans %}</p>
<ul>
{% for item in dependent %}
<li><a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a></li>

View File

@@ -8,7 +8,7 @@
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to the question <strong>{{ question }}</strong>?{% endblocktrans %}</p>
{% if dependent|length > 0 %}
<p>{% blocktrans %}All answers to the question given by the buyers of the following tickets will be <strong>lost</strong>.{% endblocktrans %}</p>
<p>{% blocktrans %}All answers to the question given by the buyers of the following products will be <strong>lost</strong>.{% endblocktrans %}</p>
{% for item in dependent %}
<li><a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a></li>
{% endfor %}

View File

@@ -18,8 +18,8 @@
<legend>{% trans "Items" %}</legend>
<p>
{% blocktrans trimmed %}
Please select the items or item variations this quota should be applied to. If you apply two
quotas to the same items, it will only be available if <strong>both</strong> quotas have capacity
Please select the products or product variations this quota should be applied to. If you apply two
quotas to the same product, it will only be available if <strong>both</strong> quotas have capacity
left.
{% endblocktrans %}
</p>

View File

@@ -8,7 +8,7 @@
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete the quota <strong>{{ quota }}</strong>?{% endblocktrans %}</p>
{% if dependent|length > 0 %}
<p>{% blocktrans %}The following items might be no longer available for sale:{% endblocktrans %}</p>
<p>{% blocktrans %}The following products might be no longer available for sale:{% endblocktrans %}</p>
{% for item in dependent %}
<li><a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.pk %}">{{ item.name }}</a></li>
{% endfor %}

View File

@@ -23,7 +23,7 @@
<thead>
<tr>
<th>{% trans "Quota name" %}</th>
<th>{% trans "Items" %}</th>
<th>{% trans "Products" %}</th>
<th>{% trans "Total capacity" %}</th>
<th>{% trans "Capacity left" %}</th>
<th></th>

View File

@@ -13,7 +13,7 @@ class TimeRestrictionApp(AppConfig):
author = _("the pretix team")
version = '1.0.0'
description = _("This plugin adds the possibility to restrict the sale " +
"of a given item or variation to a certain timeframe " +
"of a given product or variation to a certain timeframe " +
"or change its price during a certain period.")
def ready(self):

View File

@@ -55,7 +55,7 @@ class CartActionMixin:
messages.error(self.request, _('Please enter numbers only.'))
return []
if len(items) == 0:
messages.warning(self.request, _('You did not select any items.'))
messages.warning(self.request, _('You did not select any products.'))
return []
return items
@@ -84,13 +84,13 @@ class CartRemove(EventViewMixin, CartActionMixin, EventLoginRequiredMixin, View)
class CartAdd(EventViewMixin, CartActionMixin, View):
error_messages = {
'unavailable': _('Some of the items you selected were no longer available. '
'unavailable': _('Some of the products you selected were no longer available. '
'Please see below for details.'),
'in_part': _('Some of the items you selected were no longer available in '
'in_part': _('Some of the products you selected were no longer available in '
'the quantity you selected. Please see below for details.'),
'busy': _('We were not able to process your request completely as the '
'server was too busy. Please try again.'),
'not_for_sale': _('You selected an item which is not available for sale.'),
'not_for_sale': _('You selected a product which is not available for sale.'),
'max_items': _("You cannot select more than %s items per order"),
}
@@ -232,6 +232,6 @@ class CartAdd(EventViewMixin, CartActionMixin, View):
quota.release()
if not self.msg_some_unavailable:
messages.success(self.request, _('The items have been successfully added to your cart.'))
messages.success(self.request, _('The products have been successfully added to your cart.'))
return redirect(self.get_success_url())

View File

@@ -254,9 +254,9 @@ class OrderConfirm(EventViewMixin, CartDisplayMixin, EventLoginRequiredMixin, Ch
template_name = "pretixpresale/event/checkout_confirm.html"
error_messages = {
'unavailable': _('Some of the items you selected were no longer available. '
'unavailable': _('Some of the products you selected were no longer available. '
'Please see below for details.'),
'in_part': _('Some of the items you selected were no longer available in '
'in_part': _('Some of the products you selected were no longer available in '
'the quantity you selected. Please see below for details.'),
'price_changed': _('The price of some of the items in your cart has changed in the '
'meantime. Please see below for details.'),