Skip to content

Commit

Permalink
Merge pull request #487 from bruecksen/translations
Browse files Browse the repository at this point in the history
Adds missing translations
  • Loading branch information
bruecksen authored May 30, 2024
2 parents 1b83315 + 770fe8c commit e78c6f8
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 148 deletions.
8 changes: 5 additions & 3 deletions bakeup/shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,14 @@ def is_available_to_customer(self, customer):


class PointOfSale(CommonBaseClass):
name = models.CharField(max_length=255)
short_name = models.CharField(max_length=255, blank=True, null=True)
name = models.CharField(max_length=255, verbose_name=_("Name"))
short_name = models.CharField(
max_length=255, blank=True, null=True, verbose_name=_("Short Name")
)
address = models.OneToOneField(
"contrib.Address", on_delete=models.PROTECT, blank=True, null=True
)
is_primary = models.BooleanField(default=False)
is_primary = models.BooleanField(default=False, verbose_name=_("Primary?"))

def __str__(self):
return self.name
Expand Down
5 changes: 3 additions & 2 deletions bakeup/templates/workshop/customer_form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends "workshop/base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}

{% block title %}{% if object %}Update{% else %}{% endif %} Customer{% endblock %}
{% block page_heading %}
Expand All @@ -18,9 +19,9 @@ <h2>Add new customer</h2>
{{ form|crispy }}
<div class="control-group">
<div class="controls">
<a class="btn btn-outline-primary" onclick="window.history.go(-1);">Cancel</a>
<a class="btn btn-outline-primary" onclick="window.history.go(-1);">{% trans "Cancel" %}</a>
<button type="submit" class="btn btn-primary" name="add-new">
{% if object %}Update{% else %}Add{% endif %}
{% if object %}{% trans "Update" %}{% else %}{% trans "Add" %}{% endif %}
</button>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion bakeup/templates/workshop/point_of_sale_list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "workshop/base.html" %}
{% load i18n %}
{% load django_bootstrap5 %}
{% load export_url from django_tables2 %}
{% load render_table from django_tables2 %}
Expand All @@ -8,7 +9,7 @@

{% block page_heading_action %}
<div class="btn-group float-end" role="group">
<a href="{% url 'workshop:point-of-sale-add' %}" class="btn btn-primary btn-sm"><i class="fas fa-circle-plus"></i> Add point of sale</a>
<a href="{% url 'workshop:point-of-sale-add' %}" class="btn btn-primary btn-sm"><i class="fas fa-circle-plus"></i> {% trans "Add point of sale" %}</a>
</div>
{% endblock %}

Expand Down
10 changes: 7 additions & 3 deletions bakeup/workshop/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class CustomerOrderFilter(django_filters.FilterSet):
point_of_sale = django_filters.ModelChoiceFilter(
queryset=PointOfSale.objects.all(), empty_label=_("Select a point of sale")
)
search = django_filters.filters.CharFilter(method="filter_search", label="Search")
search = django_filters.filters.CharFilter(
method="filter_search", label=_("Search")
)

class Meta:
model = CustomerOrder
Expand Down Expand Up @@ -278,7 +280,9 @@ class CustomerFilter(django_filters.FilterSet):
point_of_sale = django_filters.ModelChoiceFilter(
queryset=PointOfSale.objects.all(), empty_label=_("Select a point of sale")
)
search = django_filters.filters.CharFilter(method="filter_search", label="Search")
search = django_filters.filters.CharFilter(
method="filter_search", label=_("Search")
)
group = django_filters.ModelChoiceFilter(
method="filter_group",
queryset=Group.objects.all(),
Expand Down Expand Up @@ -327,7 +331,7 @@ class Meta:
class PointOfSaleTable(tables.Table):
name = tables.LinkColumn("workshop:point-of-sale-update", args=[A("pk")])
customers = tables.TemplateColumn(
"{{ record.get_customer_count }}", verbose_name="Customers"
"{{ record.get_customer_count }}", verbose_name=_("Customers")
)
actions = tables.TemplateColumn(
template_name="tables/point_of_sale_actions_column.html",
Expand Down
Binary file modified locale/de_DE/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit e78c6f8

Please sign in to comment.