Repository navigation
Conversation
PR Summary by QodoAdd shared English and Swedish localization across interfaces
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
| <h2 data-i18n="privacy.title">Privacy Policy</h2> | ||
| <p data-i18n="privacy.telemetry">This HTML5 speed test server is configured with telemetry enabled.</p> | ||
| <h4 data-i18n="privacy.collect-title">What data we collect</h4> |
There was a problem hiding this comment.
6. Classic privacy terms remain in english 🐞 Bug ≡ Correctness
index-classic.html binds translations to the privacy headings and list items but leaves the explanatory paragraphs, consent and removal terms, and close control as unbound English text. With ?lang=sv, those parts of the privacy policy remain English beside the translated sections; the server and test-ID labels also remain English.
Agent Prompt
## Issue description
The classic view localizes selected headings and items but leaves substantial privacy-policy text and several interface labels in English.
## Fix Focus Areas
- index-classic.html[529-533]
- index-classic.html[564-566]
- index-classic.html[575-615]
- frontend/locales/en.json[21-42]
- frontend/locales/sv.json[21-42]
## Recommended Fix
Add bindings for the remaining privacy paragraphs, list text, close control, server label, and test-ID label. Reuse existing catalog keys where available and add matching English and Swedish entries for the rest.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
…anish A small i18n.js loads flat JSON catalogs (frontend/locales/<language>.json) and fills the elements marked with data-i18n and data-i18n-attr. The language is the saved choice, then the browser language, then English; a selector in the footer changes it and saves the choice. The texts that index.js draws go through LibreSpeedI18n.t and are drawn again when the language changes. Scope is the modern page only. It builds on the catalog format of the localization proposed by yeager in librespeed#860, without the ?lang= parameter, the link rewriting, the catalog timeout or the sponsor markup rework. The entrypoint seds for TITLE and TAGLINE match the new markup. Co-authored-by: Daniel Nylander <1206564+yeager@users.noreply.github.com>
Changes
Add dependency-free English and Swedish catalogs shared by the modern, classic, and stability interfaces. The browser language is selected automatically;
?lang=svselects Swedish explicitly and carries that choice across local navigation links. Static labels and dynamic status messages use the shared catalog.The follow-up commit addresses the localization review findings:
?lang=to supported languages before constructing a catalog URL. Unsupported values fall back to English.Validation
Browser checks on the current branch covered Swedish UI and navigation, malicious
?lang=values, sponsor text and URL injection, array-based stability startup, a late catalog response after a threshold change, classic navigation, and a stalled catalog request. JavaScript syntax checks and Gitleaks passed. The repository's Docker-based Playwright suite could not run on this host because Docker is unavailable; this PR currently has no GitHub CI checks.