Skip to content

Commit

Permalink
Remove untranslatable text
Browse files Browse the repository at this point in the history
  • Loading branch information
SludgeGirl committed Sep 24, 2024
1 parent 6b1d5f6 commit f52d06a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { SubscriptionList } from './components/subscription_list';
import { useDialogs } from 'dialogs';
import { RebootDialog } from './components/reboot_dialog';

const _ = cockpit.gettext;

export const Application = () => {
const [backend, setBackend] = useState<Backend | null>(null);
const [loadingSubscriptions, setLoadingSubscriptions] = useState<boolean>(true);
Expand Down Expand Up @@ -126,20 +128,20 @@ export const Application = () => {
<Page>
<PageSection variant={PageSectionVariants.light}>
<Card>
<CardTitle>Register a new subscription</CardTitle>
<CardTitle>{_("Register a new subscription")}</CardTitle>
<CardBody>
<RegisterCodeForm submitCallback={registerProduct} formData={formData} setFormData={setFormData} />
</CardBody>
</Card>
<Card>
<CardTitle>Registered Subscriptions</CardTitle>
<CardTitle>{_("Registered Subscriptions")}</CardTitle>
<CardBody>
<SubscriptionList subscriptions={subscriptions} loading={loadingSubscriptions} deactivate={deactivateProduct} />
</CardBody>
</Card>
{unregisteredSubscriptions.length
? <Card>
<CardTitle>Available Extensions</CardTitle>
<CardTitle>{_("Available Extensions")}</CardTitle>
<CardBody>
<SubscriptionList subscriptions={unregisteredSubscriptions} loading={loadingExtensions} activate={activateProduct} />
</CardBody>
Expand Down
2 changes: 1 addition & 1 deletion src/components/reboot_dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const RebootDialog = () => {
<Modal
title={_("This requires a reboot")} variant="small" onClose={Dialogs.close} isOpen
footer={
<Button className="pf-v5-u-m-0" onClick={reboot} variant="primary">Reboot</Button>
<Button className="pf-v5-u-m-0" onClick={reboot} variant="primary">{_("Reboot")}</Button>
}
>
<p>{_("This requires a reboot to take effect, if you don't reboot now this change might not be included")}</p>
Expand Down
6 changes: 3 additions & 3 deletions src/components/subscription_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ export const SubscriptionList = ({ subscriptions, loading, deactivate, activate
</Badge>
{item.expires_at
? <Badge key="expires" className="pf-v5-u-mx-xs">
Expires: {format_date(item.expires_at)}
{_("Expires:")} {format_date(item.expires_at)}
</Badge>
: ""}
</FlexItem>
<FlexItem align={{ default: "alignRight" }}>
{deactivate
? <Button onClick={() => deactivate(item)}>
Deactivate
{_("Deactivate")}
</Button>
: ""}
{activate
? <Button onClick={() => activate(item)}>
Activate
{_("Activate")}
</Button>
: ""}
</FlexItem>
Expand Down

0 comments on commit f52d06a

Please sign in to comment.