Repository navigation
i18n: add French interface translation - #144
Conversation
X4Applegate
left a comment
There was a problem hiding this comment.
Thanks a lot for this, @Thibault-MTZ! I went through it carefully.
Mechanical checks (all good)
- Checked against current
main: 314 keys infr.json, exactly matchingen.json; none missing, none extra, none empty. - Every
{placeholder}is preserved, and there is no markup in any value. go test ./internal/i18n/ ./internal/server/ -run 'Translation|Catalog|Language|Locale'passes with the file added.- I read all 314 pairs: the French is natural and consistent (hôtes proxy, parc, jetons, instantanés, "vous" throughout).
One thing to fix before merge: the dashboard activity verbs
The Recent activity feed builds each line as <actor> <verb> <target> (see dashboard.html, around ops-activity-row__summary), so the verbs have to read as a verb after a person's name. Right now they are nouns, which gives "alice création example.com". Past-tense verbs read correctly:
"dashboard.activity.verb.created": "a créé",
"dashboard.activity.verb.updated": "a modifié",
"dashboard.activity.verb.deleted": "a supprimé",
"dashboard.activity.verb.revoked": "a révoqué",
"dashboard.activity.verb.enabled": "a activé",
"dashboard.activity.verb.disabled": "a désactivé",
"dashboard.activity.verb.imported": "a importé",
"dashboard.activity.verb.reclassified": "a reclassé"
Small suggestions (optional)
nav.section.developer: "Développement" reads like a development environment; "Développeur" fits a nav section better.dashboard.raw.description: the French adds the word "JSON" ("routes JSON") that the English does not have; "Définitions récentes de routes brutes sur le serveur actif" stays closer to the source.settings.general.word_any: the template renders "(par défaut 404 ; tout 400–599, par exemple 403, …)". "tout" reads oddly there; "toute valeur de" would be clearer.
Everything else looks good. Once the verbs are changed I'm happy to merge. Merci !
|
Thanks for the review! Fixed the eight activity verbs and applied your three wording suggestions in 4a0a89a. The feed now reads naturally, e.g. “Bob a créé example.com”. Only Validation: all 314 keys match English, placeholders are unchanged, no empty strings or HTML, and the translation/catalog/language/locale tests pass. Ready for another look. Merci ! |
|
Merged — thank you, this is a genuinely well-prepared contribution. I verified it against
That last one told me you translated against current The twelve strings identical to English (Proxy, Redirections, Administration, Configuration, Notifications, Destination, Source, active…) I checked individually — they're genuine French, not untranslated leftovers. One note for next time, and it was not your fault: CI showed nothing on this PR for a while because workflows from first-time contributors need maintainer approval. I approved them and everything passed. The French will be in the next release. If you'd like to keep it current as new keys land, |
#145: the reporter's complaint was not that analytics data was missing but that reaching it took 'a lot of back and forth' - status mix on one page, visitors on another, user agents only underneath an individual visitor, each drill-down answering one question and then dead-ending. Adds a request explorer that takes every dimension at once (host, status class, user agent, path, client IP, time window) and lists the matching requests. The fleet-wide status chips, which were plain text while the per-host ones have always been links, now open it filtered. Request-chart bars are split by response class and link to their own bucket, so a spike drills through to exactly its own requests. Hosts list their verbatim user agents rather than only bucketed browser names. Response times report p50/p95/p99. Fixes a bug found while building that: AVG(duration_ms) returns a REAL and was scanned straight into an int64, so ResponseTimeSince returned a scan error and all-zero stats on any real data. Verified against a 188k-event database - zeros before, 284ms average after. That is why latency looked absent rather than sparse, and probably why it was asked for. Not done, and said plainly in the changelog: splitting upstream time from total time. Caddy's access log emits one duration for the whole request, so there is nothing to separate. #142/#144: French interface translation from @Thibault-MTZ, all 314 keys, verified for placeholder parity and rendering.
|
@X4Applegate Thanks for merging this and for the detailed checks! I'll do my best to keep the French translation up to date as new strings are added. I'm also working on extending the existing i18n coverage to the rest of the interface: moving hardcoded text in templates and JavaScript into the language catalogs, including forms, settings and Analytics. The idea is to make those parts translatable for every language, not just French. I'm already using and testing this version in my own local installation, with catalog checks and rendering tests. Would you be interested in a separate PR for that work? I can split the i18n changes from the additional French translations, or break it into smaller PRs if that is easier to review. I'd like to check the approach with you before submitting it. Merci! |
|
Yes, very interested — and thank you for asking before writing it, because the structure matters more than the volume here. This is also already the plan rather than a detour. Please split itExtraction separate from translation. One PR that moves hardcoded strings onto keys and adds them to Then one PR per area, not one big one. Suggested order, roughly the documented one and easiest-to-hardest:
Small PRs are genuinely easier here, so split further if a page is large. I'd rather review six focused diffs than one that touches forty templates. Two things that will make this safer than it looksAdding English keys cannot break the other translations. The reverse is caught automatically. One warning before you start on AnalyticsAnalytics changed substantially in v2.66.0, yesterday. There's a new Conventions worth following
Ping me on each PR and I'll review promptly. If you'd rather sanity-check the approach on one small page first — Settings › Security, say — that's a good way to confirm the shape before committing to the long tail. Merci beaucoup — this is the contribution the i18n work most needed. |
|
Thanks again for the advice! The first extraction batch is in #147, covering Security settings and sign-in, with English keys and tests. Full tests and builds pass; the description lists the browser checks and remaining limits. French is ready separately and will follow once the English keys land. I left this as a draft for feedback on the scope and release-version entry. |
|
Saw it — I've reviewed and approved #147 over there, so you're unblocked on both questions you left open. Short answers so you don't have to dig through the review:
The review has the detail, including how I verified it: I built French can follow as its own PR once the English keys land, as you planned. |
What & why
Add French (
fr) to CaddyUI's existing interface language picker by adding onlyweb/i18n/fr.json.The catalog translates all 314 keys currently in
en.json, sets_meta.nametoFrançais, and preserves all keys and interpolation placeholders. It covers the interface strings already exposed to localization; forms not yet internationalized remain unchanged.Related issue
Closes #142.
Related to #128.
Type of change
Checklist
go build ./...compiles andgo test ./...passesCHANGELOG.mdwith a version bump — not included for this catalog-only contribution; see belowNotes for reviewers
Following
docs/TRANSLATING.md, the PR intentionally adds only the locale catalog, without changing Go code, templates, JavaScript, documentation, or the version. Missing future keys retain the normal English fallback.Validation against main
c43126a4a7dd4e934bb3df0245a3b88fefa2a49e:go test ./internal/i18n/ ./internal/server/ -run 'Translation|Catalog|Language|Locale'go build -p1 ./...go test -p1 ./...The translation was prepared with AI assistance and reviewed locally. Authenticated French profile and dashboard rendering was also checked on a local development build.
Replaces #143 after renaming the source branch to
french-translation; the commit and catalog are unchanged.