feat(i18n): localize cookies policy page

Replace all hardcoded English strings in cookies.html with _() i18n
helper calls and add 35 new cookie_policy.* translation keys to
frontend/translations/en.json. Also improve table accessibility with
aria-label and scope attributes."

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-15 13:52:03 +00:00
parent 13d451dc36
commit 182868c0d7
2 changed files with 65 additions and 29 deletions
+30 -29
View File
@@ -1,58 +1,58 @@
{% extends "base.html" %}
{% block title %}Cookie Policy - DocuElevate{% endblock %}
{% block title %}{{ _("cookie_policy.page_title") }}{% endblock %}
{% block content %}
<div class="container mx-auto px-4 py-8 max-w-4xl">
<h1 class="text-4xl font-bold mb-6">Cookie Policy</h1>
<p class="text-sm text-gray-500 mb-8">Last Updated: {{ build_date|default(current_date|default('May 14, 2024')) }}</p>
<h1 class="text-4xl font-bold mb-6">{{ _("cookie_policy.heading") }}</h1>
<p class="text-sm text-gray-500 mb-8">{{ _("cookie_policy.last_updated") }} {{ build_date|default(current_date|default('May 14, 2024')) }}</p>
<div class="bg-white shadow rounded-lg p-6 mb-6">
<h2 class="text-2xl font-semibold mb-4">What Are Cookies</h2>
<h2 class="text-2xl font-semibold mb-4">{{ _("cookie_policy.s1_heading") }}</h2>
<p class="text-gray-700 mb-3">
Cookies are small text files that are stored on your computer or mobile device when you visit a website. They are widely used to make websites work more efficiently and provide information to the website owners.
{{ _("cookie_policy.s1_p1") }}
</p>
</div>
<div class="bg-white shadow rounded-lg p-6 mb-6">
<h2 class="text-2xl font-semibold mb-4">How We Use Cookies</h2>
<h2 class="text-2xl font-semibold mb-4">{{ _("cookie_policy.s2_heading") }}</h2>
<p class="text-gray-700 mb-3">
DocuElevate uses <strong>only strictly necessary session cookies</strong> for the following purpose:
{{ _("cookie_policy.s2_p1_pre") }} <strong>{{ _("cookie_policy.s2_p1_strong") }}</strong> {{ _("cookie_policy.s2_p1_post") }}
</p>
<ul class="list-disc list-inside text-gray-700 ml-4 mb-3">
<li><strong>Authentication &amp; Session Management:</strong> To identify you when you sign in and maintain your session while you use the application.</li>
<li><strong>{{ _("cookie_policy.s2_li1_label") }}</strong> {{ _("cookie_policy.s2_li1_body") }}</li>
</ul>
<p class="text-gray-700 mb-3">
These cookies are mandatory for the proper functioning of our service. Without these cookies, you would be required to log in repeatedly during your browsing session.
{{ _("cookie_policy.s2_p2") }}
</p>
<p class="text-gray-700">
Because these cookies are strictly necessary for the service to function, they are exempt from prior-consent requirements under the EU ePrivacy Directive (Art. 5(3)) and equivalent national implementations. We do not set any optional, analytics, advertising, or tracking cookies.
{{ _("cookie_policy.s2_p3") }}
</p>
</div>
<div class="bg-white shadow rounded-lg p-6 mb-6">
<h2 class="text-2xl font-semibold mb-4">Cookie Details</h2>
<h2 class="text-2xl font-semibold mb-4">{{ _("cookie_policy.s3_heading") }}</h2>
<div class="overflow-x-auto">
<table class="min-w-full text-sm text-gray-700 border border-gray-200 rounded">
<table class="min-w-full text-sm text-gray-700 border border-gray-200 rounded" aria-label="{{ _('cookie_policy.s3_heading') }}">
<thead class="bg-gray-50">
<tr>
<th class="px-4 py-2 text-left font-semibold border-b">Name</th>
<th class="px-4 py-2 text-left font-semibold border-b">Type</th>
<th class="px-4 py-2 text-left font-semibold border-b">Purpose</th>
<th class="px-4 py-2 text-left font-semibold border-b">Duration</th>
<th class="px-4 py-2 text-left font-semibold border-b" scope="col">{{ _("cookie_policy.s3_col_name") }}</th>
<th class="px-4 py-2 text-left font-semibold border-b" scope="col">{{ _("cookie_policy.s3_col_type") }}</th>
<th class="px-4 py-2 text-left font-semibold border-b" scope="col">{{ _("cookie_policy.s3_col_purpose") }}</th>
<th class="px-4 py-2 text-left font-semibold border-b" scope="col">{{ _("cookie_policy.s3_col_duration") }}</th>
</tr>
</thead>
<tbody>
<tr class="border-b">
<td class="px-4 py-2 font-mono">session</td>
<td class="px-4 py-2">Strictly Necessary</td>
<td class="px-4 py-2">Maintains your authenticated session; required for login to function.</td>
<td class="px-4 py-2">Session (deleted on browser close or logout)</td>
<td class="px-4 py-2">{{ _("cookie_policy.s3_row1_type") }}</td>
<td class="px-4 py-2">{{ _("cookie_policy.s3_row1_purpose") }}</td>
<td class="px-4 py-2">{{ _("cookie_policy.s3_row1_duration") }}</td>
</tr>
<tr>
<td class="px-4 py-2 font-mono">cookieNoticeDismissed</td>
<td class="px-4 py-2">Strictly Necessary</td>
<td class="px-4 py-2">Stores your acknowledgement of the cookie notice so it is not shown repeatedly (stored in localStorage, not a cookie).</td>
<td class="px-4 py-2">Persistent (browser localStorage)</td>
<td class="px-4 py-2">{{ _("cookie_policy.s3_row2_type") }}</td>
<td class="px-4 py-2">{{ _("cookie_policy.s3_row2_purpose") }}</td>
<td class="px-4 py-2">{{ _("cookie_policy.s3_row2_duration") }}</td>
</tr>
</tbody>
</table>
@@ -60,25 +60,26 @@
</div>
<div class="bg-white shadow rounded-lg p-6 mb-6">
<h2 class="text-2xl font-semibold mb-4">No Third-Party Cookies</h2>
<h2 class="text-2xl font-semibold mb-4">{{ _("cookie_policy.s4_heading") }}</h2>
<p class="text-gray-700 mb-3">
DocuElevate does not use any third-party cookies, tracking cookies, advertising cookies, or analytics cookies. We respect your privacy and only implement the minimum cookies required for our service to function.
{{ _("cookie_policy.s4_p1") }}
</p>
<p class="text-gray-700">
For more information about how we handle your data, please see our <a href="/privacy" class="text-blue-600 hover:underline">Privacy Notice</a>.
{{ _("cookie_policy.s4_p2_pre") }} <a href="/privacy" class="text-blue-600 hover:underline">{{ _("cookie_policy.s4_privacy_link") }}</a>.
</p>
</div>
<div class="bg-white shadow rounded-lg p-6 mb-6">
<h2 class="text-2xl font-semibold mb-4">Managing Cookies</h2>
<h2 class="text-2xl font-semibold mb-4">{{ _("cookie_policy.s5_heading") }}</h2>
<p class="text-gray-700 mb-3">
Most web browsers allow you to control cookies through their settings. However, blocking or deleting our session cookies will prevent DocuElevate from functioning, as user authentication relies on these cookies.
{{ _("cookie_policy.s5_p1") }}
</p>
<p class="text-gray-700 mb-3">
You may also clear the cookie notice acknowledgement stored in your browser's localStorage at any time via your browser's developer tools (Application &rarr; Local Storage).
{{ _("cookie_policy.s5_p2") }}
</p>
<p class="text-gray-700">
This Cookie Policy is part of and incorporated into our <a href="/terms" class="text-blue-600 hover:underline">Terms of Service</a> and <a href="/privacy" class="text-blue-600 hover:underline">Privacy Notice</a>.
{{ _("cookie_policy.s5_p3_pre") }} <a href="/terms" class="text-blue-600 hover:underline">{{ _("cookie_policy.s5_terms_link") }}</a>
{{ _("cookie_policy.s5_p3_and") }} <a href="/privacy" class="text-blue-600 hover:underline">{{ _("cookie_policy.s5_privacy_link") }}</a>.
</p>
</div>
</div>
+35
View File
@@ -252,6 +252,41 @@
"cookie.notice_label": "Cookie notice",
"cookie.policy_link": "Cookie Policy",
"cookie.privacy_link": "Privacy Notice",
"cookie_policy.heading": "Cookie Policy",
"cookie_policy.last_updated": "Last Updated:",
"cookie_policy.page_title": "Cookie Policy - DocuElevate",
"cookie_policy.s1_heading": "What Are Cookies",
"cookie_policy.s1_p1": "Cookies are small text files that are stored on your computer or mobile device when you visit a website. They are widely used to make websites work more efficiently and provide information to the website owners.",
"cookie_policy.s2_heading": "How We Use Cookies",
"cookie_policy.s2_li1_body": "To identify you when you sign in and maintain your session while you use the application.",
"cookie_policy.s2_li1_label": "Authentication & Session Management:",
"cookie_policy.s2_p1_post": "for the following purpose:",
"cookie_policy.s2_p1_pre": "DocuElevate uses",
"cookie_policy.s2_p1_strong": "only strictly necessary session cookies",
"cookie_policy.s2_p2": "These cookies are mandatory for the proper functioning of our service. Without these cookies, you would be required to log in repeatedly during your browsing session.",
"cookie_policy.s2_p3": "Because these cookies are strictly necessary for the service to function, they are exempt from prior-consent requirements under the EU ePrivacy Directive (Art. 5(3)) and equivalent national implementations. We do not set any optional, analytics, advertising, or tracking cookies.",
"cookie_policy.s3_col_duration": "Duration",
"cookie_policy.s3_col_name": "Name",
"cookie_policy.s3_col_purpose": "Purpose",
"cookie_policy.s3_col_type": "Type",
"cookie_policy.s3_heading": "Cookie Details",
"cookie_policy.s3_row1_duration": "Session (deleted on browser close or logout)",
"cookie_policy.s3_row1_purpose": "Maintains your authenticated session; required for login to function.",
"cookie_policy.s3_row1_type": "Strictly Necessary",
"cookie_policy.s3_row2_duration": "Persistent (browser localStorage)",
"cookie_policy.s3_row2_purpose": "Stores your acknowledgement of the cookie notice so it is not shown repeatedly (stored in localStorage, not a cookie).",
"cookie_policy.s3_row2_type": "Strictly Necessary",
"cookie_policy.s4_heading": "No Third-Party Cookies",
"cookie_policy.s4_p1": "DocuElevate does not use any third-party cookies, tracking cookies, advertising cookies, or analytics cookies. We respect your privacy and only implement the minimum cookies required for our service to function.",
"cookie_policy.s4_p2_pre": "For more information about how we handle your data, please see our",
"cookie_policy.s4_privacy_link": "Privacy Notice",
"cookie_policy.s5_heading": "Managing Cookies",
"cookie_policy.s5_p1": "Most web browsers allow you to control cookies through their settings. However, blocking or deleting our session cookies will prevent DocuElevate from functioning, as user authentication relies on these cookies.",
"cookie_policy.s5_p2": "You may also clear the cookie notice acknowledgement stored in your browser's localStorage at any time via your browser's developer tools (Application \u2192 Local Storage).",
"cookie_policy.s5_p3_and": "and",
"cookie_policy.s5_p3_pre": "This Cookie Policy is part of and incorporated into our",
"cookie_policy.s5_privacy_link": "Privacy Notice",
"cookie_policy.s5_terms_link": "Terms of Service",
"credentials.col_action": "Action",
"credentials.col_credential": "Credential",
"credentials.col_source": "Source",