TranslationStatus
The translation state of one entry per language: missing, draft, outdated when the source changed after the translation, and done. Pick it for an editor header or a list cell; with onSelect a chip opens that translation, and compact keeps only the language and the glyph in sight.
- TranslationStatus
- Status
- Stable
- axe:
- Light, Dark, High contrast
- Unit tests:
- yes
- Keyboard pass:
- not yet
- Screen reader pass:
- not yet
- Used in:
- no app yet
PreviewLink to the section Preview
Live in all three themes. Everything here is interactive.
Light theme, TranslationStatus
2 of 5 languages done
- pl: Done
- en: Done
- de: Outdated
- pt-BR: Draft
- uk: Missing
Dark theme, TranslationStatus
2 of 5 languages done
- pl: Done
- en: Done
- de: Outdated
- pt-BR: Draft
- uk: Missing
High contrast theme, TranslationStatus
2 of 5 languages done
- pl: Done
- en: Done
- de: Outdated
- pt-BR: Draft
- uk: Missing
UsageLink to the section Usage
import { TranslationStatus } from '@skribly/ui/navigation'<TranslationStatus label={t('translations.label')} displayLocale={panelLocale}
entries={[{ locale: 'de', state: 'outdated' }, { locale: 'uk', state: 'missing' }]}
stateLabels={{ missing: t('missing'), draft: t('draft'), outdated: t('outdated'), done: t('done') }}
onSelect={openTranslation} summary={(counts, total) => t('translations.done', { done: counts.done, total })} />Every label is a prop, so the app passes its own words in its own language. See no built-in text.
AccessibilityLink to the section Accessibility
- The chips are a named list.
- Each says its state with a glyph and a word, never colour alone; compact keeps the word for screen readers, and chips keep their edges in Windows high contrast.
- With onSelect each chip is a button named by the language and its state, such as "German: Outdated".
This demo runs through axe in all three themes on every test run. See what the tests check.