Files
owncast/web/components/ui/OfflineBanner/OfflineBanner.module.scss
T
CopilotGitHubgabekcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>OwncastGabe Kangas
29b5100114 Create custom Translation component for better i18n handling (#4431)
* Initial plan

* Implement Translation component with Storybook stories

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Add Jest test for Translation component and demonstrate ?lang=de functionality

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Javascript formatting autofixes

* Create centralized type-safe localization system

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Add @testing-library/react to Translation component tests

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Fix code formatting errors with prettier and eslint

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Revert "Fix code formatting errors with prettier and eslint"

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* fix(js): eslinter errors

* fix(js): unused code warnings

* fix(js): fix additional warnings

* Update Emoji admin page to use new Translation component

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Organize localization keys by logical sections (Frontend, Admin, Common, Testing)

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Organize localization keys by TypeScript namespaces

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* Javascript formatting autofixes

* feat(js): add support for default translated text

* chore: add default lang translations on commit

* fix(js): unused code warnings

* Update OfflineBanner component to use new Translation component

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* fix(js): fix localization extraction job

* chore(js): remove ts-node cli

* fix(css): fix css warning

* feat(js): add some additional translation strings via component

* chore: update extracted translations

* test: add tests for Translation component defaultText and fallback behavior

Co-authored-by: gabek <414923+gabek@users.noreply.github.com>

* chore: update extracted translations

* Javascript formatting autofixes

* chore: call out new Translation component

* fix: linter warning

* chore: updated instructions

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gabek <414923+gabek@users.noreply.github.com>
Co-authored-by: Owncast <owncast@owncast.online>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2025-07-13 02:21:46 -07:00

76 lines
1.2 KiB
SCSS

@import '../../../styles/mixins';
.outerContainer {
display: flex;
justify-content: center;
align-items: center;
}
.innerContainer {
width: clamp(00px, 100%, 600px);
display: flex;
flex-direction: column;
margin: 5vh auto;
padding: 2.4em;
@include screen(tablet) {
font-size: 1.2rem;
padding: 1em;
margin: 1rem 0.2rem;
}
}
.separator {
margin-top: 15px;
margin-bottom: 15px;
}
.lastLiveDate {
margin-top: 2rem;
font-size: 0.8rem;
opacity: 0.7;
font-family: var(--theme-text-body-font-family);
font-weight: 300;
.clockIcon {
margin-right: 6px;
}
}
.header {
font-family: var(--theme-text-display-font-family);
font-weight: 600;
font-size: 1.4rem;
}
.footer {
margin-top: 15px;
}
.actionLink {
color: var(--theme-color-action);
text-decoration: underline;
cursor: pointer;
&:hover {
color: var(--color-owncast-palette-7);
}
}
// Styles for Translation component generated spans
.bodyText {
:global(.notify-link),
:global(.follow-link) {
color: var(--theme-color-action);
text-decoration: underline;
cursor: pointer;
&:hover {
color: var(--color-owncast-palette-7);
}
}
line-height: 2rem;
font-size: 1.2rem;
}