Language coverage ledger — Settings block

Pro

settings-language-coverage-ledger · for app, settings pages

Language coverage ledger

A language progress ledger beside the selected language’s keys, using the app’s own counts only.

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/settings-language-coverage-ledger

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import SettingsLanguageCoverageLedger from '@/components/trame/blocks/settings/settings-language-coverage-ledger.vue'

const props = {
title: "Every word, in the right language",
description: "Prepare your workspace’s texts and proofread them before they go live.",
sourceLanguage: "English",
languages: [
{
code: "es",
name: "Spanish",
done: 3,
total: 6,
status: "Proofreading"
},
{
code: "de",
name: "German",
done: 1,
total: 6,
status: "In preparation"
}
],
entries: [
{
id: "welcome",
key: "workspace.welcome",
source: "Welcome to your workspace",
context: "Title of the home page after sign-in.",
translations: [
{
language: "es",
text: "Bienvenido a tu espacio de trabajo",
status: "done"
},
{
language: "de",
text: "Willkommen in Ihrem Arbeitsbereich",
status: "done"
}
]
},
{
id: "invite",
key: "team.invitation",
source: "Invite your team to join you.",
context: "Invitation shown when the workspace has only one member.",
translations: [
{
language: "es",
text: "Invita a tu equipo a unirse.",
status: "review"
}
]
}
],
options: {
language: "es"
}
}
</script>

<template>
<SettingsLanguageCoverageLedger v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe section’s heading
descriptionstringWordsa few words saying more, under the heading
sourceLanguage*stringWordsthe language the texts are written in
languages*Language[]Datathe languages, each with how much is translated
entries*Entry[]Datathe entries shown, in order
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Language languages[] · 5 props
PropTypeDescription
code*stringDatathe language’s code, e.g. "fr"
name*stringWordsthe language’s name
total*numberhow many texts there are
done*numberhow many texts are translated
statusstringWordsthe language’s status, in the host’s words
Entry entries[] · 5 props
PropTypeDescription
id*stringDatathe entry’s id
key*stringDatathe text’s key
source*stringWordsthe text in the source language
contextstringWordswhere the text appears, to help the translator
translations*Translation[]Datathe text in each language
Translation entries[].translations[] · 3 props
PropTypeDescription
language*stringDatathe language’s code
textstringWordsthe translation’s text
status*'missing' | 'review' | 'done'where the translation stands
Options options · 2 props
PropTypeDescription
languagestringDatathe code of the language shown first; the first language by default
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Reads languages, translations from your app

A settings section, for app, settings pages; it uses @lucide/vue.

More settings blocks

  • Integration status list: connected services with the state their last check found, a degraded one explained.
  • Integration switch list: a short list of connected apps turned on and off inside a settings page: one row each with a switch, the state named only when it is not operational.
  • Integration table: a developer or admin view auditing 6 to 20 services at once: one table with state, last event, figure and actions per service, an incident spanning its row.
  • Key list register: A key register with display prefixes, scopes and usage dates for the merchant’s own keys only.
  • Layout directory: Section tiles above a focused form for settings that need clear descriptions before opening.
  • Layout preference rows: A long settings document with controls aligned beside their labels for regional and account preferences.
  • Layout sidebar: a settings page with several sections: the navigation on the left, the selected section on the right.
  • Layout single: one or two sections as a single long form with one save bar (a profile and an address).

All 38 settings blocks