From e5d9ee98a548e2b863104e52eb2bc309b1336179 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 31 Oct 2022 18:08:33 +0100 Subject: add internationalization and polish translations --- .../templates/downloads.html.jinja | 140 ++++++++++---------- src/hydrilla_website/templates/index.html.jinja | 142 ++++++++++----------- 2 files changed, 134 insertions(+), 148 deletions(-) (limited to 'src/hydrilla_website/templates') diff --git a/src/hydrilla_website/templates/downloads.html.jinja b/src/hydrilla_website/templates/downloads.html.jinja index ce5dde3..d0e51ff 100644 --- a/src/hydrilla_website/templates/downloads.html.jinja +++ b/src/hydrilla_website/templates/downloads.html.jinja @@ -44,10 +44,14 @@ code in a proprietary work, I am not going to enforce this in court. {% set downloads_base = 'https://hydrilla.koszko.org/downloads/' %} +{% set files_label_text = _('downloads.h_small.files') %} +{% set signify_sigs_label_text = _('downloads.h_small.signify_signatures') %} +{% set pgp_sigs_label_text = _('downloads.h_small.pgp_signatures') %} + {% macro list_files( filenames_comments, - label_text = 'Files', + label_text = files_label_text, filename_suffix = '', include_comments = true ) @@ -70,39 +74,39 @@ code in a proprietary work, I am not going to enforce this in court. {% macro files_and_sigs_lists(filenames_comments) %} {{ list_files(filenames_comments) }} - {{ list_files(filenames_comments, 'Signify signatures', '.sig', false) }} - {{ list_files(filenames_comments, 'PGP signatures', '.asc', false) }} + {{ list_files(filenames_comments, signify_sigs_label_text, '.sig', false) }} + {{ list_files(filenames_comments, pgp_sigs_label_text, '.asc', false) }} {% endmacro %} +{% set pre_release_note = _('downloads.pre_release_version') %} + +{% set source_code_note = _('downloads.source_code') %} + +{% set chromium_build_note = _('downloads.webextension.chromium_build') %} +{% set mozilla_build_note = _('downloads.webextension.mozilla_build') %} + {% block body %} {% call subpage('') %}

- {{ _('index.h_big.haketilo_downloads') }} + {{ _('downloads.h_big.haketilo_downloads') }}

- This page lists releases of Haketilo proxy, Haketilo browser extension - (now in maintenance mode) and Hydrilla repository server. Starting with - version 3, Haketilo proxy and Hydrilla are distributed together. + {{ _('downloads.haketilo_downloads.this_page_lists') }}

- All files are cryptographically signed by project maintainer, Wojciech - Kosior. Public keys for verification of signatures are the ones from - koszko.org. - You might want to read the - instructions - on signature verification. + {{ _('downloads.haketilo_downloads.html.all_files_signed_by')|safe }}

- {{ label('PGP key fingerprint') }} + {{ label(_('downloads.haketilo_downloads.h_small.pgp_fingerprint')) }}

E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A

{% call label() %} - - Signify public key + + {{ _('downloads.haketilo_downloads.h_small.html.signify_key')|safe }} {% endcall %}

@@ -111,56 +115,46 @@ code in a proprietary work, I am not going to enforce this in court. {% endcall %} {% call subpage('proxy') %} -

Haketilo proxy and Hydrilla releases

+

{{ _('downloads.h_big.haketilo_and_hydrilla_releases') }}

- Tool releases from version 3 upwards are listed below. Both Haketilo proxy - and Hydrilla are included inside. + {{ _('downloads.haketilo_and_hydrilla_releases.listed_below_are') }}

- If you're a programmer, you might also want to check the - git repository of Hydrilla and Haketilo. + {{ _('downloads.haketilo_and_hydrilla_releases.html.repo_is_at')|safe }}

-

Version 3.0-beta1 (pre-release version)

+

3.0-beta1 {{ pre_release_note }}

- The binary release was made with - GNU Guix version - 1.3.0-26.fd00ac7. + {{ _('downloads.haketilo_and_hydrilla_releases.html.with_guix_1.3.0-26.fd00ac7')|safe }}

{{ files_and_sigs_lists([ ('haketilo-and-hydrilla-bin-3.0b1-x86_64.tar.gz', - 'relocatable standalone binary release for x86-64 GNU/Linux computers'), + _('downloads.haketilo_and_hydrilla_releases.relocatable_x86-64')), ('hydrilla-3.0b1-py3-none-any.whl', - 'Python wheel for use with pip'), + _('downloads.haketilo_and_hydrilla_releases.wheel_for_pip')), ('haketilo-and-hydrilla-3.0b1.tar.gz', - 'source code') + source_code_note) ]) }} {% endcall %} {% call subpage('old-hydrilla') %} -

Old Hydrilla releases

+

{{ _('downloads.h_big.old_hydrilla_releases') }}

- Hydrilla releases before version 3 are listed below. Those old versions - do not yet include the Haketilo proxy. The functionality is split between - separate Hydrilla builder and - server packages. The latter depends on the - former. + {{ _('downloads.old_hydrilla_releases.html.listed_below_are')|safe }}

- If you're a programmer, you might also want to check the git repositories - of Hydrilla and - Hydrilla builder. + {{ _('downloads.old_hydrilla_releases.html.repo_is_at')|safe }}

-

Version 1.1-beta1 (pre-release version)

+

1.1-beta1 {{ pre_release_note }}

{{ files_and_sigs_lists([ @@ -171,7 +165,7 @@ code in a proprietary work, I am not going to enforce this in court. ]) }} -

Version 1.0

+

1.0

{{ files_and_sigs_lists([ @@ -182,7 +176,7 @@ code in a proprietary work, I am not going to enforce this in court. ]) }} -

Version - 1.0-beta2 (pre-release version)

+

1.0-beta2 {{ pre_release_note }}

{{ files_and_sigs_lists([ @@ -193,7 +187,7 @@ code in a proprietary work, I am not going to enforce this in court. ]) }} -

Version - 1.0-beta1 (pre-release version)

+

1.0-beta1 {{ pre_release_note }}

{{ files_and_sigs_lists([ @@ -206,85 +200,83 @@ code in a proprietary work, I am not going to enforce this in court. {% endcall %} {% call subpage('webextension') %} -

Haketilo WebExtension

+

{{ _('downloads.h_big.webextension') }}

- Browser extension releases are listed below. The extension is currently in - maintenance mode and is not going to receive new functionalities. + {{ _('downloads.webextension.listed_below_are') }}

- If you're a programmer, you might also want to check the - git repository of Haketilo browser extension. + {{ _('downloads.webextension.html.repo_is_at')|safe }}

-

Version 2.0.1

+

2.0.1

{{ files_and_sigs_lists([ - ('haketilo-2.0.1.zip', 'Chromium build'), - ('haketilo-2.0.1.xpi', 'Mozilla build'), - ('haketilo-2.0.1.tar.gz', 'source code') + ('haketilo-2.0.1.zip', chromium_build_note), + ('haketilo-2.0.1.xpi', mozilla_build_note), + ('haketilo-2.0.1.tar.gz', source_code_note) ]) }} -

Version 2.0

+

2.0

{{ files_and_sigs_lists([ - ('haketilo-2.0.zip', 'Chromium build'), - ('haketilo-2.0.xpi', 'Mozilla build'), - ('haketilo-2.0.tar.gz', 'source code') + ('haketilo-2.0.zip', chromium_build_note), + ('haketilo-2.0.xpi', mozilla_build_note), + ('haketilo-2.0.tar.gz', source_code_note) ]) }} -

Version 2.0-beta1 (pre-release version)

+

2.0-beta1 {{ pre_release_note }}

{{ files_and_sigs_lists([ - ('haketilo-2.0b1.zip', 'Chromium build'), - ('haketilo-2.0b1.xpi', 'Mozilla build'), - ('haketilo-2.0b1.tar.gz', 'source code') + ('haketilo-2.0b1.zip', chromium_build_note), + ('haketilo-2.0b1.xpi', mozilla_build_note), + ('haketilo-2.0b1.tar.gz', source_code_note) ]) }} -

Version 1.0

+

1.0

{{ files_and_sigs_lists([ - ('haketilo-1.0.zip', 'Chromium build'), - ('haketilo-1.0.mozilla-signed.xpi', 'Mozilla build'), - ('haketilo-1.0.tar.gz', 'source code') + ('haketilo-1.0.zip', chromium_build_note), + ('haketilo-1.0.mozilla-signed.xpi', mozilla_build_note), + ('haketilo-1.0.tar.gz', source_code_note) ]) }} -

Version 1.0-beta3 (pre-release version)

+

1.0-beta3 {{ pre_release_note }}

{{ files_and_sigs_lists([ - ('haketilo-1.0b3.zip', 'Chromium build'), - ('haketilo-1.0b3.xpi', 'Mozilla build'), - ('haketilo-1.0b3.tar.gz', 'source code') + ('haketilo-1.0b3.zip', chromium_build_note), + ('haketilo-1.0b3.xpi', mozilla_build_note), + ('haketilo-1.0b3.tar.gz', source_code_note) ]) }} -

Version 1.0-beta2 (pre-release version)

+

1.0-beta2 {{ pre_release_note }}

{{ files_and_sigs_lists([ - ('haketilo-1.0b2.zip', 'Chromium build'), - ('haketilo-1.0b2.xpi', 'Mozilla build'), - ('haketilo-1.0b2.tar.gz', 'source code') + ('haketilo-1.0b2.zip', chromium_build_note), + ('haketilo-1.0b2.xpi', mozilla_build_note), + ('haketilo-1.0b2.tar.gz', source_code_note) ]) }} -

Version 1.0-beta1 (pre-release version)

+

1.0-beta1 {{ pre_release_note }}

{{ files_and_sigs_lists([ - ('haketilo-1.0b1.zip', 'Chromium build'), - ('haketilo-1.0b1.xpi', 'Mozilla build'), - ('haketilo-1.0b1.tar.gz', 'source code') + ('haketilo-1.0b1.zip', chromium_build_note), + ('haketilo-1.0b1.xpi', mozilla_build_note), + ('haketilo-1.0b1.tar.gz', source_code_note) ]) }} {% endcall %} diff --git a/src/hydrilla_website/templates/index.html.jinja b/src/hydrilla_website/templates/index.html.jinja index 955c06f..642c833 100644 --- a/src/hydrilla_website/templates/index.html.jinja +++ b/src/hydrilla_website/templates/index.html.jinja @@ -32,6 +32,8 @@ code in a proprietary work, I am not going to enforce this in court. max-width: 100%; margin: auto; } + + . {% endblock %} {% set here_url = url_for('main') %} @@ -39,12 +41,20 @@ code in a proprietary work, I am not going to enforce this in court. {% set nav_links_data = [ - ('', here_url ~ '#', 'Home'), - ('about', here_url ~ '#about', 'About'), - ('manual', here_url ~ '#manual', 'Manual'), - (none, url_for('downloads') ~ '#', 'Downloads'), - ('get-involved', here_url ~ '#get-involved', 'Get involved'), - (none, site_git_url, 'Website sources') + ('', here_url ~ '#', + _('index.nav.home')), + ('about', here_url ~ '#about', + _('index.nav.about')), + ('manual', here_url ~ '#manual', + _('index.nav.manual')), + (none, url_for('downloads') ~ '#', + _('index.nav.downloads')), + ('get-involved', here_url ~ '#get-involved', + _('index.nav.get_involved')), + ('langs', here_url ~ '#langs', + _('index.nav.languages')), + (none, site_git_url, + _('index.nav.site_sources')) ] %} @@ -58,137 +68,121 @@ code in a proprietary work, I am not going to enforce this in court. {% endcall %} {% call subpage('about') %} -

About

+

+ {{ _('index.h_big.about') }} +

- Haketilo is a tool that facilitates viewing websites with their original - JavaScript replaced - by user-provided scripts. - It combines the functionalities of content - blocker and user script manager. - It can be used with its script repository, Hydrilla. + {{ _('index.about.html.haketilo_is_a_tool')|safe }}

- One of Haketilo's aims is to address the issues raised in - "The JavaScript trap". - It is being developed with hope that it will make more user-controlled - "Web" browsing possible. + {{ _('index.about.html.haketilo_javascript_trap')|safe }}

- Haketilo is a - free/libre software, - SSl-enabled HTTP proxy. As such, it can be used with multiple web - browsers, regardless of their native support for some particular addon - format. + {{ _('index.about.html.haketilo_is_libre_proxy')|safe }}

- A browser extension variant of Haketilo also exists and is compatible with - Firefox- and - Chromium-based - browsers that support the Manifest V2 WebExtension format. The browser - extension is currently in maintenance mode and does not receive new - features. + {{ _('index.about.html.haketilo_extension_variant')|safe }}

-

Available packages

+

{{ _('index.about.h_medium.available_packages') }}

- Haketilo can be used both for simple script-blocking and for altering the - ways websites are viewed. Its official Hydrilla repository provides a - collection of - freely-licensed - packages that can make several websites viewable again after their - original JavaScript is blocked from executing. + {{ _('index.about.available_packages.html')|safe }}

-

Credits

+

{{ _('index.about.h_medium.credits') }}

- Those who knowingly or unknowingly helped the project in some way, receive - special thanks. +

+ {{ _('index.about.credits.special_thanks_to') }} +

{% call unordered_list() %} {% call list_entry() %} - the NLnet Foundation with the - NGI0 Programme for funding the - development of Haketilo in 2021 and 2022 + {{ _('index.about.credits.list_entry.html.nlnet')|safe }} {% endcall %} {% call list_entry() %} - Jahoti for contributions in - the early stages of Haketilo browser extension + {{ _('index.about.credits.list_entry.html.jahoti')|safe }} {% endcall %} {% call list_entry() %} - Nicholas Johnson for preparing a - presentation about Haketilo - for LibrePlanet 2022 + {{ _('index.about.credits.list_entry.html.nick')|safe }} {% endcall %} {% call list_entry() %} - David Lyons for - his Hatchet graphic that is being used in Haketilo + {{ _('index.about.credits.list_entry.html.david_lyons')|safe }} {% endcall %} {% call list_entry() %} - the creators of mitmproxy which - serves as a base for Haketilo proxy + {{ _('index.about.credits.list_entry.html.mitmproxy')|safe }} {% endcall %} {% call list_entry() %} - the the Pallets Projects for - creating Flask and other tools that are used extensively in this very - website as well as in Haketilo&Hydrilla + {{ _('index.about.credits.list_entry.html.pallets')|safe }} {% endcall %} {% endcall %} {% endcall %} {% call subpage('manual') %} -

User manual

+

{{ _('index.h_big.user_manual') }}

- Information about installation, running and some technical aspects of - Haketilo operation can be found on - project's Redmine-powered wiki. - Additional help is provided by Haketilo proxy's builtin documentation - which can be viewed from the tool itself. + {{ _('index.user_manual.html.haketilo_wiki_and_inline_doc')|safe }}

- The documentation of Hydrilla repository server for use with Haketilo can - be found on - on project's wiki. + {{ _('index.user_manual.html.hydrilla_wiki')|safe }}

{% endcall %} {% call subpage('get-involved') %} -

Get involved

+

{{ _('index.h_big.get_involved') }}

- Haketilo development currently occurs on - project's Redmine instance. - Individuals and groups are more than welcome to + {{ _('index.get_involved.html.project_redmine_instance')|safe }}

{% call unordered_list() %} {% call list_entry() %} - provide feedback and suggestions, + {{ _('index.get_involved.list_entry.provide_feedback') }} {% endcall %} {% call list_entry() %} - make bug reports, + {{ _('index.get_involved.list_entry.report_bugs') }} {% endcall %} {% call list_entry() %} - share custom scripts for websites, + {{ _('index.get_involved.list_entry.share_custom_scripts') }} {% endcall %} {% call list_entry() %} - provide translations and + {{ _('index.get_involved.list_entry.provide_translations') }} {% endcall %} {% call list_entry() %} - contribute code to Haketilo and Hydrilla. + {{ _('index.get_involved.list_entry.contribute_code') }} {% endcall %} {% endcall %}

- One can also email the maintainer of Haketilo, - Wojtek Kosior, directly - at koszko@koszko.org. + {{ _('index.get_involved.html.email_maintainer')|safe }}

{% endcall %} + + {% call subpage('langs') %} +

{{ _('index.h_big.choose_language') }}

+ + {% call unordered_list() %} + {% set action_url = url_for('set_locale') %} + {% + for lang_name, lang_code in [ + ('english', 'en_US'), + ('polski', 'pl_PL') + ] + %} + {% call list_entry() %} +
+ {% set value = locale_serializer.dumps(lang_code) %} + + +
+ {% endcall %} + {% endfor %} + {% endcall %} + {% endcall %} {% endblock %} -- cgit v1.2.3