Translate most of the Sith

This commit is contained in:
Skia
2016-07-19 19:03:16 +02:00
parent 1b4324f38f
commit 97ff4341a7
55 changed files with 1238 additions and 475 deletions

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('counter', '0007_permanency'),
]
operations = [
migrations.AlterField(
model_name='refilling',
name='payment_method',
field=models.CharField(max_length=255, verbose_name='payment method', default='cash', choices=[('cheque', 'Check'), ('cash', 'Cash')]),
),
]

View File

@ -17,59 +17,59 @@
{% endmacro %}
{% block content %}
<h3>Counter</h3>
<h4>{{ counter }}</h4>
<p><strong>Club: </strong> {{ counter.club }}</p>
<h3>{% trans %}Counter{% endtrans %}</h3>
<h4>{{ counter }}</h4>
<p><strong>{% trans %}Club: {% endtrans %}</strong> {{ counter.club }}</p>
<div>
<h5>Customer</h5>
<p>{{ customer.user.get_display_name() }}, {{ customer.amount }} €</p>
</div>
<div>
<h5>Refilling</h5>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
{{ refill_form.as_p() }}
<input type="hidden" name="action" value="refill">
<input type="submit" value="Go" />
</form>
</div>
<div>
<h5>Selling</h5>
{% if request.session['not_enough'] %}
<p><strong>Not enough money</strong></p>
{% endif %}
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
<input type="hidden" name="action" value="code">
<input type="input" name="code" value="" autofocus />
<input type="submit" value="Go" />
</form>
<p>Basket: </p>
<ul>
<div>
<h5>{% trans %}Customer{% endtrans %}</h5>
<p>{{ customer.user.get_display_name() }}, {{ customer.amount }} €</p>
</div>
<div>
<h5>{% trans %}Refilling{% endtrans %}</h5>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
{{ refill_form.as_p() }}
<input type="hidden" name="action" value="refill">
<input type="submit" value="{% trans %}Go{% endtrans %}" />
</form>
</div>
<div>
<h5>{% trans %}Selling{% endtrans %}</h5>
{% if request.session['not_enough'] %}
<p><strong>{% trans %}Not enough money{% endtrans %}</strong></p>
{% endif %}
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
<input type="hidden" name="action" value="code">
<input type="input" name="code" value="" autofocus />
<input type="submit" value="{% trans %}Go{% endtrans %}" />
</form>
<p>{% trans %}Basket: {% endtrans %}</p>
<ul>
{% for id,infos in request.session['basket'].items() %}
{% set product = counter.products.filter(id=id).first() %}
{% set s = infos['qty'] * infos['price'] / 100 %}
<li>{{ del_product(id, '-') }} {{ infos['qty'] }} {{ add_product(id, '+') }} {{ product.name }}: {{ "%0.2f"|format(s) }} €</li>
{% set product = counter.products.filter(id=id).first() %}
{% set s = infos['qty'] * infos['price'] / 100 %}
<li>{{ del_product(id, '-') }} {{ infos['qty'] }} {{ add_product(id, '+') }} {{ product.name }}: {{ "%0.2f"|format(s) }} €</li>
{% endfor %}
</ul>
<p><strong>Total: {{ "%0.2f"|format(basket_total) }} €</strong></p>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
<input type="hidden" name="action" value="finish">
<input type="submit" value="Finish" />
</form>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
<input type="hidden" name="action" value="cancel">
<input type="submit" value="Cancel" />
</form>
<p><strong>Products: </strong>
{% for p in counter.products.all() %}
{{ add_product(p.id, p.name) }}
{% endfor %}
</p>
</div>
</ul>
<p><strong>{% trans %}Total: {% endtrans %}{{ "%0.2f"|format(basket_total) }} €</strong></p>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
<input type="hidden" name="action" value="finish">
<input type="submit" value="{% trans %}Finish{% endtrans %}" />
</form>
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
{% csrf_token %}
<input type="hidden" name="action" value="cancel">
<input type="submit" value="{% trans %}Cancel{% endtrans %}" />
</form>
<p><strong>{% trans %}Products: {% endtrans %}</strong>
{% for p in counter.products.all() %}
{{ add_product(p.id, p.name) }}
{% endfor %}
</p>
</div>
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Edit counter</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Save!" /></p>
</form>
<h2>{% trans %}Edit counter{% endtrans %}</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form>
{% endblock %}

View File

@ -1,22 +1,22 @@
{% extends "core/base.jinja" %}
{% block title %}
Counter admin list
{% trans %}Counter admin list{% endtrans %}
{% endblock %}
{% block content %}
<p><a href="{{ url('counter:new') }}">New counter</a></p>
{% if counter_list %}
<h3>Counter admin list</h3>
<ul>
{% for c in counter_list %}
<li><a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
<a href="{{ url('counter:admin', counter_id=c.id) }}">Edit</a></li>
{% endfor %}
</ul>
{% else %}
There is no counters in this website.
{% endif %}
<p><a href="{{ url('counter:new') }}">{% trans %}New counter{% endtrans %}</a></p>
{% if counter_list %}
<h3>{% trans %}Counter admin list{% endtrans %}</h3>
<ul>
{% for c in counter_list %}
<li><a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
<a href="{{ url('counter:admin', counter_id=c.id) }}">{% trans %}Edit{% endtrans %}</a></li>
{% endfor %}
</ul>
{% else %}
{% trans %}There is no counters in this website.{% endtrans %}
{% endif %}
{% endblock %}

View File

@ -9,37 +9,37 @@
{% endmacro %}
{% block content %}
<h3>Counter</h3>
<h3>{% trans %}Counter{% endtrans %}</h3>
<h4>{{ counter }}</h4>
<p><strong>Club: </strong> {{ counter.club }}</p>
<p><strong>Products: </strong> {{ counter.products.all() }}</p>
<p><strong>{% trans %}Club: {% endtrans %}</strong> {{ counter.club }}</p>
<p><strong>{% trans %}Products: {% endtrans %}</strong> {{ counter.products.all() }}</p>
<div>
<h3>Sellings</h3>
<h3>{% trans %}Sellings{% endtrans %}</h3>
{% if last_basket %}
<h4>Last selling: </h4>
<p>Client: {{ last_customer }}, new amount: {{ new_customer_amount }} €.</p>
<h4>{% trans %}Last selling: {% endtrans %}</h4>
<p>{% trans %}Client: {% endtrans %}{{ last_customer }} - {% trans %}New amount: {% endtrans %}{{ new_customer_amount }} €.</p>
<ul>
{% for s in last_basket %}
<li>{{ s }}</li>
{% endfor %}
</ul>
<p><strong>Total: {{ last_total }} €</strong></p>
<p><strong>{% trans %}Total: {% endtrans %}{{ last_total }} €</strong></p>
{% endif %}
{% if barmen %}
<p>Enter client code:</p>
<p>{% trans %}Enter client code:{% endtrans %}</p>
<form method="post" action="{{ url('counter:details', counter_id=counter.id) }}">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="VALIDATE" /></p>
<p><input type="submit" value="{% trans %}validate{% endtrans %}" /></p>
</form>
{% else %}
<p>Please, login</p>
<p>{% trans %}Please, login{% endtrans %}</p>
{% endif %}
</div>
<div>
<h3>Barman: </h3>
<h3>{% trans %}Barman: {% endtrans %}</h3>
<ul>
{% for b in barmen %}
<li>{{ barman_logout_link(b) }}</li>
@ -48,7 +48,7 @@
<form method="post" action="{{ url('counter:login', counter_id=counter.id) }}">
{% csrf_token %}
{{ login_form.as_p() }}
<p><input type="submit" value="LOGIN" /></p>
<p><input type="submit" value="{% trans %}login{% endtrans %}" /></p>
</form>
</div>
{% endblock %}

View File

@ -1,15 +1,13 @@
{% extends "core/user_base.jinja" %}
{% block title %}
{{ profile.get_display_name() }}'s account
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s account{% endtrans %}
{% endblock %}
{% block infos %}
<h3>User account</h3>
<h3>{% trans %}User account{% endtrans %}</h3>
<p>{{ customer.refillings.all() }}</p>
<p>{{ customer.buyings.all() }}</p>
{% endblock %}