Skip to content

Commit

Permalink
Use translation
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardasB committed Apr 24, 2024
1 parent d42babb commit cac9b9c
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ import {
import { SvgChat } from "@itwin/itwinui-icons-react";
import { OutputMessagePriority } from "@itwin/core-frontend";

import { UiFramework } from "../../UiFramework";
import { MessageCenterMessage } from "./MessageCenterMessage";
import { MessageManager } from "../../messages/MessageManager";
import { TitleBar } from "../../layout/footer/dialog/TitleBar";

import type { NotifyMessageDetailsType } from "../../messages/ReactNotifyMessageDetails";
import "./MessageCenterField.scss";
import { useTranslation } from "../../hooks/useTranslation";

/**
* Type for Status state to satisfy NotificationMarker type checking
Expand All @@ -39,9 +39,9 @@ export function MessageCenterField(props: CommonProps) {
const [isOpen, setIsOpen] = React.useState(false);
const [status, setStatus] =
React.useState<NotificationMarkerStatus>("primary");
const { translate } = useTranslation();

const indicatorRef = React.useRef<HTMLButtonElement>(null);
const title = UiFramework.translate("messageCenter.messages");

const handleOpenChange = (isOpenState: boolean) => {
setNotify(false);
Expand Down Expand Up @@ -139,12 +139,20 @@ export function MessageCenterField(props: CommonProps) {
className="uifw-statusFields-messageCenter-messageCenterField_popover"
content={
<>
<TitleBar title={title}></TitleBar>
<TitleBar title={translate("messageCenter.messages")}></TitleBar>

<Tabs.Wrapper type="pill">
<Tabs.TabList>
<Tabs.Tab label="All" key="all" value="all" />
<Tabs.Tab label="Error" key="error" value="error" />
<Tabs.Tab
label={translate("messageCenter.all")}
key="all"
value="all"
/>
<Tabs.Tab
label={translate("messageCenter.errors")}
key="error"
value="error"
/>
</Tabs.TabList>
{tabs}
</Tabs.Wrapper>
Expand All @@ -163,7 +171,7 @@ export function MessageCenterField(props: CommonProps) {
className={props.className}
style={props.style}
>
{title}
{translate("messageCenter.messages")}
</Button>
</Popover>
);
Expand Down

0 comments on commit cac9b9c

Please sign in to comment.