Server settings → Defaults: a bar under each language for how much is reviewed, draft and untranslated #312

Closed
opened 2026-09-29 11:26:42 +00:00 by tiagoagueda · 0 comments
Owner

From the interface review of 2026-09-29: under each language offered on Server settings → Defaults, a progress bar: green for the strings already reviewed, orange for the strings in draft, grey for the untranslated ones.

What is there today

  • The page lists every language with its flag, its name and partials/translation_state.html: a word for the state (reviewed, draft, partial) and a percentage.
  • src/postulo/locale/status.json already counts, per language, total, translated, drafts, fuzzy and reviewed, which is everything a three-part bar needs. Today every working language is 100 % translated and 100 % draft. A bar would show that as all orange, which is correct and says more than "100 %".

Constraints

  • No inline style. The content security policy is style-src 'self', so a segment's width cannot be written as style="width: 42%"; #291 left Basecoat's progress unadopted for exactly this reason. An SVG whose <rect>s carry width attributes is not a style and is allowed; so is a width taken from a fixed set of classes, in steps of 5 %.
  • Not colour alone (WCAG 1.4.1). The numbers stay beside the bar as text ("812 reviewed, 1,061 draft, 0 untranslated"), and the segments differ by more than their hue under forced colours.
  • Contrast. Each segment has 3:1 against its neighbour and the background, in both themes (WCAG 1.4.11).
  • fuzzy is counted but has no colour in the request. Proposal: count it with the drafts.
  • The same bar would suit the language picker under Settings, which already reads status.json.

Done when

  • The bar is a component, drawn from status.json and accompanied by its text. Tests check its arithmetic: the segments add up to the total, and rounding never shows a sliver as 0 or a full bar as 99 %.
From the interface review of 2026-09-29: under each language offered on *Server settings → Defaults*, a progress bar: green for the strings already reviewed, orange for the strings in draft, grey for the untranslated ones. ## What is there today - The page lists every language with its flag, its name and `partials/translation_state.html`: a word for the state (reviewed, draft, partial) and a percentage. - `src/postulo/locale/status.json` already counts, per language, `total`, `translated`, `drafts`, `fuzzy` and `reviewed`, which is everything a three-part bar needs. Today every working language is 100 % translated and 100 % draft. A bar would show that as all orange, which is correct and says more than "100 %". ## Constraints - **No inline style.** The content security policy is `style-src 'self'`, so a segment's width cannot be written as `style="width: 42%"`; #291 left Basecoat's `progress` unadopted for exactly this reason. An SVG whose `<rect>`s carry `width` attributes is not a style and is allowed; so is a width taken from a fixed set of classes, in steps of 5 %. - **Not colour alone** (WCAG 1.4.1). The numbers stay beside the bar as text ("812 reviewed, 1,061 draft, 0 untranslated"), and the segments differ by more than their hue under forced colours. - **Contrast.** Each segment has 3:1 against its neighbour and the background, in both themes (WCAG 1.4.11). - `fuzzy` is counted but has no colour in the request. Proposal: count it with the drafts. - The same bar would suit the language picker under *Settings*, which already reads `status.json`. ## Done when - The bar is a component, drawn from `status.json` and accompanied by its text. Tests check its arithmetic: the segments add up to the total, and rounding never shows a sliver as 0 or a full bar as 99 %.
tiagoagueda added this to the 0.5.0 milestone 2026-09-29 11:26:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#312
No description provided.