From bde856374873715673929cdea8fa797e365cef0c Mon Sep 17 00:00:00 2001 From: bogo Date: Wed, 18 Sep 2024 22:56:30 +0200 Subject: [PATCH] Add i18n, add IDPA target --- app.py | 15 ++++- babel.cfg | 2 + messages.pot | 18 ++++++ static/images/idpa_el_presidente.webp | Bin 0 -> 4538 bytes static/images/ipsc_el_presidente.webp | Bin 0 -> 6300 bytes templates/base.html | 14 ++++- templates/idpa_preview_svg.html | 7 +++ templates/idpa_svg.html | 5 ++ templates/ipsc.html | 24 +++++-- templates/ipsc_preview_svg.html | 7 +++ templates/ipsc_svg.html | 5 ++ templates/pdf_template.html | 22 +++---- templates/pdf_template_ipsc.html | 52 +++++++-------- templates/pdf_template_shootoff.html | 26 +++----- templates/sc.html | 4 +- templates/setup.html | 10 +-- templates/shootoff.html | 2 +- translations/pl/LC_MESSAGES/messages.mo | Bin 0 -> 2878 bytes translations/pl/LC_MESSAGES/messages.po | 80 ++++++++++++++++++++++++ 19 files changed, 222 insertions(+), 71 deletions(-) create mode 100644 babel.cfg create mode 100644 messages.pot create mode 100644 static/images/idpa_el_presidente.webp create mode 100644 static/images/ipsc_el_presidente.webp create mode 100644 templates/idpa_preview_svg.html create mode 100644 templates/idpa_svg.html create mode 100644 templates/ipsc_preview_svg.html create mode 100644 templates/ipsc_svg.html create mode 100644 translations/pl/LC_MESSAGES/messages.mo create mode 100644 translations/pl/LC_MESSAGES/messages.po diff --git a/app.py b/app.py index 0b00a49..fddf1a2 100644 --- a/app.py +++ b/app.py @@ -2,10 +2,21 @@ import math from flask import Flask, render_template, request, send_file from weasyprint import HTML +from flask_babel import Babel, _ + import io app = Flask(__name__) +app.config['BABEL_DEFAULT_LOCALE'] = 'en' +app.config['BABEL_SUPPORTED_LOCALES'] = ['en', 'pl'] # Add supported languages here +app.config['BABEL_DEFAULT_TIMEZONE'] = 'UTC' +babel = Babel(app) + +@babel.localeselector +def get_locale(): + return request.accept_languages.best_match(app.config['BABEL_SUPPORTED_LOCALES']) + SHOOTOFF_DISTANCE = 1200 SHOOTOFF_GAP = 100 IPSC_DISTANCE = 914 @@ -213,6 +224,7 @@ def generate_pdf_ipsc(): distance = int(request.form.get('distance', 1) or 1) size = request.form.get('size') distance_type = request.form.get('distance_type') + target_type = request.form.get('target_type') scale = distance / IPSC_DISTANCE wall_extra_space_for_paper = 29.7 if size == 'a3' else 21.0 if distance_type == 'wall': @@ -236,7 +248,8 @@ def generate_pdf_ipsc(): preview_target_width=preview_scale * IPSC_TARGET_WIDTH, preview_margin=preview_margin, preview_gap=preview_scale * IPSC_GAP + preview_margin, - box_position=box_position + box_position=box_position, + target_type=target_type ) # return rendered_html diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 0000000..fdff2e5 --- /dev/null +++ b/babel.cfg @@ -0,0 +1,2 @@ +[python: **.py] +[jinja2: templates/**.html] \ No newline at end of file diff --git a/messages.pot b/messages.pot new file mode 100644 index 0000000..8d7c120 --- /dev/null +++ b/messages.pot @@ -0,0 +1,18 @@ +# Translations template for PROJECT. +# Copyright (C) 2024 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2024-09-18 09:15+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.16.0\n" + diff --git a/static/images/idpa_el_presidente.webp b/static/images/idpa_el_presidente.webp new file mode 100644 index 0000000000000000000000000000000000000000..fcdccce06cd82495e747655c841d2f0e4459d451 GIT binary patch literal 4538 zcmeH}XH-*Lw}wL#kP=WMMTH64^V261CQ>=be8yvAf*tto<7Lul#Gl z|DgbB;ahCUEbe5p(v!$0zo>K+C?~MqbsF<;+15r1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8vUs{^dTSL4XB;871jOv+u<6H7e82^3&UG89>uz%~#7Hlcsdmoto)U9Npo4k2H zL8H2MIEy&Ho&8P4G=|5#DOol-A7XJ-O47B0n><@4=Q`sFod1M7uwt+uYe&^Cvnf8M zSPI4|;84RHZHXbi+`TFlX2JU98nE3U9zc$6HFH4AIAmk27UAV2Fj;{+*s8UPEHdVD z4f~nH$gfm()1M^Ehj5F_kip9#lJ%bqgD%*DvHCQ6Cr9_a0}-JWY~gBVpbcwyDRXR; z0;`W+!@?j|BG;2OuQtWQmuBMcb5WvBmajL@_-5wL@FP0|&b55n>978rU@;JB0VNO+ zgYf(nZ?+!pDP|UjX}BSfa=%qno67@X-gyRgA(ZSdoTh7%(D=KYQ-PzI4_uFz>4#d1 bvYHIi^#VVSUS>u`8B%u={-+O;zij^l2yj^f literal 0 HcmV?d00001 diff --git a/templates/base.html b/templates/base.html index 6b98b5d..2572585 100644 --- a/templates/base.html +++ b/templates/base.html @@ -26,9 +26,9 @@ -
+

Paper Challenge

-

Wygeneruj tor {% block title %}{% endblock %}

+

{% trans %}Generate stage for{% endtrans %} {% block title %}{% endblock %}

+ {% block content %}{% endblock %}
+ diff --git a/templates/idpa_preview_svg.html b/templates/idpa_preview_svg.html new file mode 100644 index 0000000..f518c8d --- /dev/null +++ b/templates/idpa_preview_svg.html @@ -0,0 +1,7 @@ +
+ + + + + +
\ No newline at end of file diff --git a/templates/idpa_svg.html b/templates/idpa_svg.html new file mode 100644 index 0000000..8a8e2b8 --- /dev/null +++ b/templates/idpa_svg.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/templates/ipsc.html b/templates/ipsc.html index 37a8efe..38c16df 100644 --- a/templates/ipsc.html +++ b/templates/ipsc.html @@ -1,21 +1,35 @@ {% extends "base.html" %} -{% block title %}IPSC - El Presidente{% endblock %} +{% block title %}El Presidente{% endblock %} {% block content %}
{% include 'setup.html' %}
-

IPSC - El Presidente

+

{%trans%}Select the stage{%endtrans%}

-
- IPSC - El Presidente +
+
+ +
+
+ +
diff --git a/templates/ipsc_preview_svg.html b/templates/ipsc_preview_svg.html new file mode 100644 index 0000000..7fb0d77 --- /dev/null +++ b/templates/ipsc_preview_svg.html @@ -0,0 +1,7 @@ +
+ + + + + +
\ No newline at end of file diff --git a/templates/ipsc_svg.html b/templates/ipsc_svg.html new file mode 100644 index 0000000..635b127 --- /dev/null +++ b/templates/ipsc_svg.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/templates/pdf_template.html b/templates/pdf_template.html index b5140d4..3215817 100644 --- a/templates/pdf_template.html +++ b/templates/pdf_template.html @@ -82,17 +82,15 @@ {% endfor %}
-

Wymagana długość ściany: {{ wall_length/10 }}cm

-

Odległość od ściany: {{ distance|round(1,'ceil') }}cm

-

Przygotowanie toru:

+

{%trans%}Wall length required{%endtrans%}: {{ wall_length/10 }}cm

+

{%trans%}Distance from wall{%endtrans%}: {{ distance|round(1,'ceil') }}cm

+

{%trans%}Stage preparation{%endtrans%}:

    -
  • Umieść z lewej strony ściany pierwszy cel ze znacznikiem "punkt ZERO"
  • -
  • Wyznacz pole startowe {{ box_position }}cm od punktu "zero" (wzdłuż ściany) oraz w odległości {{distance}}cm od ściany
  • -
  • Upewnij się, że pole startowe znjaduje się w dogodnym miejscu, pomieszczenia, tak aby nic nie przeszkazdało - w swobodnym dobyciu i składaniu do celów na całej szerokości ściany -
  • -
  • W razie potrzeby dostosuj pierwszy cel wraz z punktem ZERO i powtórz dwa powyższe kroki
  • -
  • Umieść na ścianie pozostałe cele zgodnie z odległościami podanymi na znacznikach pozycji na dole każdego celu. Upewnij się, że wszystkie cele są umieszczone w jednej linii równoległej do podłoża
  • +
  • {%trans%}Place the first target with the 'ZERO point' marker on the left side of the wall{%endtrans%}
  • +
  • {%trans%}Set shooting box{%endtrans%} {{ box_position }}cm {%trans%}from 'ZERO' point (along the wall) and{%endtrans%} {{distance}}cm {%trans%}from the wall{%endtrans%}
  • +
  • {%trans%}Ensure that the starting field is positioned in a convenient location within the room, so that nothing obstructs the drawing and aiming at targets across the entire width of the wall{%endtrans%}
  • +
  • {%trans%}If necessary, adjust the first target along with the ZERO point and repeat the two previous steps{%endtrans%}
  • +
  • {%trans%}Place the remaining targets on the wall according to the distances indicated on the position markers at the bottom of each target. Ensure that all targets are aligned in a single line parallel to the ground{%endtrans%}
@@ -111,9 +109,9 @@ {% if target.target == 't1' %} -
punkt ZERO ({{ stage.split('_') | map('capitalize') | join(' ') }})
+
{%trans%}ZERO point{%endtrans%} ({{ stage.split('_') | map('capitalize') | join(' ') }})
{% else %} -
{{ target.position / 10 }}cm od punktu ZERO ({{ stage.split('_') | map('capitalize') | join(' ') }})
+
{{ target.position / 10 }}cm {%trans%}from ZERO point{%endtrans%} ({{ stage.split('_') | map('capitalize') | join(' ') }})
{% endif %}
diff --git a/templates/pdf_template_ipsc.html b/templates/pdf_template_ipsc.html index 5ba4b31..d36a3a7 100644 --- a/templates/pdf_template_ipsc.html +++ b/templates/pdf_template_ipsc.html @@ -66,44 +66,44 @@

IPSC - El Presidente

{% for i in range(3) %} -
- - - - - -
+ {% with preview_target_width = preview_target_width, preview_target_height = preview_target_height, preview_margin = preview_margin, preview_gap = preview_gap %} + {%if target_type == 'ipsc' %} + {%include 'ipsc_preview_svg.html'%} + {%else%} + {%include 'idpa_preview_svg.html'%} + {%endif%} + {% endwith %} {% endfor %}
-

Wymagana długość ściany: {{ wall_length|round(1,'ceil') }}cm

-

Odległość od ściany: {{ distance|round(1,'ceil') }}cm

-

Przygotowanie toru:

+

{%trans%}Wall length required{%endtrans%}: {{ wall_length|round(1,'ceil') }}cm

+

{%trans%}Distance from wall{%endtrans%}: {{ distance|round(1,'ceil') }}cm

+

{%trans%}Stage preparation{%endtrans%}:

    -
  • Umieść z lewej lub prawej strony ściany pierwszy cel ze znacznikiem "punkt ZERO"
  • -
  • Wyznacz pole startowe {{ box_position|round(1,'ceil') }}cm od punktu "zero" (wzdłuż ściany) oraz w odległości {{distance}}cm od ściany
  • -
  • Upewnij się, że pole startowe znjaduje się w dogodnym miejscu, pomieszczenia, tak aby nic nie - przeszkazdało - w swobodnym dobyciu i składaniu do celów na całej szerokości ściany -
  • -
  • W razie potrzeby dostosuj pierwszy cel wraz z punktem ZERO i powtórz dwa powyższe kroki
  • -
  • Umieść na ścianie pozostałe cele zgodnie z odległościami podanymi na znacznikach pozycji na dole każdego - celu. Upewnij się, że wszystkie cele są umieszczone w jednej linii równoległej do podłoża
  • +
  • {%trans%}Place the first target with the 'ZERO point' marker on the left or right side of the wall{%endtrans%}
  • +
  • {%trans%}Set shooting box{%endtrans%} {{ box_position|round(1,'ceil') }}cm {%trans%}from 'ZERO' point (along the wall) and{%endtrans%} {{distance}}cm {%trans%}from the wall{%endtrans%}
  • +
  • {%trans%}Ensure that the starting field is positioned in a convenient location within the room, so that nothing obstructs the drawing and aiming at targets across the entire width of the wall{%endtrans%}
  • +
  • {%trans%}If necessary, adjust the first target along with the ZERO point and repeat the two previous steps{%endtrans%}
  • +
  • {%trans%}Place the remaining targets on the wall according to the distances indicated on the position markers at the bottom of each target. Ensure that all targets are aligned in a single line parallel to the ground{%endtrans%}
+ {% for i in range(3) %}
- - - - - + {% with target_width=target_width, target_height=target_height %} + {%if target_type == 'ipsc' %} + {%include 'ipsc_svg.html'%} + {%else%} + {%include 'idpa_svg.html'%} + {%endif%} + {% endwith %} + {% if i==0 %} -
punkt ZERO (El Presidente)
+
{%trans%}ZERO point{%endtrans%} (El Presidente)
{% else %} -
{{ i * gap|round(1,'ceil') }}cm od punktu ZERO (El Presidente)
+
{{ i * gap|round(1,'ceil') }}cm {%trans%}from ZERO point{%endtrans%} (El Presidente)
{% endif %}
diff --git a/templates/pdf_template_shootoff.html b/templates/pdf_template_shootoff.html index e343de8..a1a8c86 100644 --- a/templates/pdf_template_shootoff.html +++ b/templates/pdf_template_shootoff.html @@ -109,22 +109,16 @@ {% endif %} {% endfor %}
- -

Wymagana długość ściany: {{ wall_length|round(1,'ceil') }}cm

-

Odległość od ściany: {{ distance|round(1,'ceil') }}cm

-

Przygotowanie toru:

+

{%trans%}Wall length required{%endtrans%}: {{ wall_length|round(1,'ceil') }}cm

+

{%trans%}Distance from wall{%endtrans%}: {{ distance|round(1,'ceil') }}cm

+

{%trans%}Stage preparation{%endtrans%}:

    -
  • Umieść z lewej lub prawej strony ściany pierwszy cel ze znacznikiem "punkt ZERO"
  • -
  • Wyznacz pole startowe {{ box_position|round(1,'ceil') }}cm od punktu "zero" (wzdłuż ściany) oraz w odległości {{distance}}cm od ściany
  • -
  • Upewnij się, że pole startowe znjaduje się w dogodnym miejscu, pomieszczenia, tak aby nic nie - przeszkazdało - w swobodnym dobyciu i składaniu do celów na całej szerokości ściany -
  • -
  • W razie potrzeby dostosuj pierwszy cel wraz z punktem ZERO i powtórz dwa powyższe kroki
  • -
  • Umieść na ścianie pozostałe cele zgodnie z odległościami podanymi na znacznikach pozycji na dole każdego - celu. Upewnij się, że wszystkie cele są umieszczone w jednej linii równoległej do podłoża
  • +
  • {%trans%}Place the first target with the 'ZERO point' marker on the left or right side of the wall{%endtrans%}
  • +
  • {%trans%}Set shooting box{%endtrans%} {{ box_position|round(1,'ceil') }}cm {%trans%}from 'ZERO' point (along the wall) and{%endtrans%} {{distance}}cm {%trans%}from the wall{%endtrans%}
  • +
  • {%trans%}Ensure that the starting field is positioned in a convenient location within the room, so that nothing obstructs the drawing and aiming at targets across the entire width of the wall{%endtrans%}
  • +
  • {%trans%}If necessary, adjust the first target along with the ZERO point and repeat the two previous steps{%endtrans%}
  • +
  • {%trans%}Place the remaining targets on the wall according to the distances indicated on the position markers at the bottom of each target. Ensure that all targets are aligned in a single line parallel to the ground{%endtrans%}
- {% for i in range(target_count) %}
@@ -158,9 +152,9 @@ {% endif %} {% if i==0 %} -
punkt ZERO (Shootoff)
+
{%trans%}ZERO point{%endtrans%} (Shootoff)
{% else %} -
{{ i * gap|round(1,'ceil') }}cm od punktu ZERO (Shootoff)
+
{{ i * gap|round(1,'ceil') }}cm {%trans%}from ZERO point{%endtrans%} (Shootoff)
{% endif %}
diff --git a/templates/sc.html b/templates/sc.html index 87f16e9..c1607c0 100644 --- a/templates/sc.html +++ b/templates/sc.html @@ -6,7 +6,7 @@ {% include 'setup.html' %}
-

Tor

+

{%trans%}Select the stage{%endtrans%}