- {variants.map((variant) => (
+ {variants.map((variant) => {
+const t = useTranslations("button-variant-demo");
+
+return (
-
{variant === "button" ? "Default" : variant}
+
{variant === "button" ? t('headings.variant-default_0') : variant}
{colors.map((color) => (
@@ -37,7 +42,8 @@ export const VariantExample: React.FC = () => (
))}
- ))}
+ )
+})}
);
diff --git a/apps/ui-playground/content/design/components/checkbox.labelPosition.tsx b/apps/ui-playground/content/design/components/checkbox.labelPosition.tsx
index 66561cfce28e7d..d0d4d836a7ed74 100644
--- a/apps/ui-playground/content/design/components/checkbox.labelPosition.tsx
+++ b/apps/ui-playground/content/design/components/checkbox.labelPosition.tsx
@@ -1,24 +1,30 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { CheckboxField } from "@calcom/ui/components/form";
-export const LabelPositionExample: React.FC = () => (
+export const LabelPositionExample: React.FC = () => {
+const t = useTranslations("checkbox-label-position");
+
+return (
-);
+)
+};
diff --git a/apps/ui-playground/content/design/components/dialog.largeContent.tsx b/apps/ui-playground/content/design/components/dialog.largeContent.tsx
index 0d77357d8b6f25..48d0de562cd74a 100644
--- a/apps/ui-playground/content/design/components/dialog.largeContent.tsx
+++ b/apps/ui-playground/content/design/components/dialog.largeContent.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { useState } from "react";
@@ -7,48 +9,41 @@ import { Button } from "@calcom/ui/components/button";
import { Dialog, DialogClose, DialogContent, DialogFooter } from "@calcom/ui/components/dialog";
export const LargeContentExample: React.FC = () => {
+const t = useTranslations("dialog-large-content-example");
+
const [open, setOpen] = useState(false);
return (
-
setOpen(true)}>
- Open Large Content Dialog
-
+
setOpen(true)}>{t('buttons.open-dialog')}
- {Array.from({ length: 5 }).map((_, i) => (
+ {Array.from({ length: 5 }).map((_, i) => {
+const t = useTranslations("dialog-large-content-example");
+
+return (
-
Section {i + 1}
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus
- hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend
- nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis
- nisl tempor.
-
-
- Suspendisse in orci enim. Integer vel sapien at risus ultrices ornare nec sit amet nibh.
- Duis blandit lectus ac odio rhoncus non congue diam bibendum. Aliquam erat volutpat.
-
+
{t('content.section-heading', { "i": i })}
+
{t('content.lorem-paragraph-one')}
+
{t('content.lorem-paragraph-two')}
{i === 2 && (
-
Important Notice
-
- This is a highlighted section within the content to demonstrate how different UI
- elements appear within a scrollable dialog.
-
+
{t('notices.important-heading')}
+
{t('notices.highlighted-description')}
)}
- ))}
+ )
+})}
- Decline
- Accept Terms
+ {t('buttons.decline')}
+ {t('buttons.accept-terms')}
diff --git a/apps/ui-playground/content/design/components/emptyScreen.basic.tsx b/apps/ui-playground/content/design/components/emptyScreen.basic.tsx
index bf6e465ad1f747..21ab9e4742a946 100644
--- a/apps/ui-playground/content/design/components/emptyScreen.basic.tsx
+++ b/apps/ui-playground/content/design/components/emptyScreen.basic.tsx
@@ -1,17 +1,23 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
-export const BasicExample: React.FC = () => (
+export const BasicExample: React.FC = () => {
+const t = useTranslations("empty-screen-basic-example");
+
+return (
alert("Create Meeting clicked")}
/>
-);
+)
+};
diff --git a/apps/ui-playground/content/design/components/emptyScreen.rawButton.tsx b/apps/ui-playground/content/design/components/emptyScreen.rawButton.tsx
index 28e3ee740bb2c7..c76aab834195de 100644
--- a/apps/ui-playground/content/design/components/emptyScreen.rawButton.tsx
+++ b/apps/ui-playground/content/design/components/emptyScreen.rawButton.tsx
@@ -1,26 +1,28 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { Button } from "@calcom/ui/components/button";
import { EmptyScreen } from "@calcom/ui/components/empty-screen";
-export const RawButtonExample: React.FC = () => (
+export const RawButtonExample: React.FC = () => {
+const t = useTranslations("empty-screen-raw-button");
+
+return (
- alert("Create Link clicked")}>
- Create Link
-
- alert("Import Links clicked")}>
- Import Links
-
+ alert("Create Link clicked")}>{t('buttons.create-link')}
+ alert("Import Links clicked")}>{t('buttons.import-links')}
}
/>
-);
+)
+};
diff --git a/apps/ui-playground/content/design/components/input.states.tsx b/apps/ui-playground/content/design/components/input.states.tsx
index f63285e7741027..e241ac505dcc3c 100644
--- a/apps/ui-playground/content/design/components/input.states.tsx
+++ b/apps/ui-playground/content/design/components/input.states.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
@@ -15,11 +17,14 @@ export const StatesExample: React.FC = () => (
{state}
- {sizes.map((size) => (
+ {sizes.map((size) => {
+const t = useTranslations("input-states-demo");
+
+return (
(
/>
{size}
- ))}
+ )
+})}
))}
diff --git a/apps/ui-playground/content/design/components/multiInputField.customization.tsx b/apps/ui-playground/content/design/components/multiInputField.customization.tsx
index efa4bf1e448678..0f18a013aea711 100644
--- a/apps/ui-playground/content/design/components/multiInputField.customization.tsx
+++ b/apps/ui-playground/content/design/components/multiInputField.customization.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { useForm, FormProvider } from "react-hook-form";
@@ -13,6 +15,8 @@ type FormValues = {
};
export const CustomizationExample: React.FC = () => {
+const t = useTranslations("multi-input-field-examples");
+
const methods = useForm
();
return (
@@ -21,13 +25,13 @@ export const CustomizationExample: React.FC = () => {
-
Key-Value Pairs
-
Allows inputting keys and values
+
{t('sections.key-value-pairs.title')}
+
{t('sections.key-value-pairs.description')}
fieldArrayName="keyValuePairs"
keyValueMode
- keyLabel="Environment Variable"
- valueLabel="Value"
+ keyLabel={t('labels.environment-variable')}
+ valueLabel={t('labels.value')}
optionPlaceholders={["NODE_ENV", "PORT", "DATABASE_URL"]}
valuePlaceholders={["production", "3000", "postgres://..."]}
defaultNumberOfOptions={3}
@@ -36,7 +40,7 @@ export const CustomizationExample: React.FC = () => {
-
Custom Placeholders
+ {t('sections.custom-placeholders.title')}
fieldArrayName="customPlaceholders"
optionPlaceholders={["Enter your name", "Enter your email", "Enter your phone"]}
@@ -45,7 +49,7 @@ export const CustomizationExample: React.FC = () => {
-
Without Move Buttons
+ {t('sections.without-move-buttons.title')}
fieldArrayName="noMoveButtons"
optionPlaceholders={["Static option 1", "Static option 2"]}
@@ -55,12 +59,12 @@ export const CustomizationExample: React.FC = () => {
-
Custom Add Button Label
+ {t('sections.custom-add-button.title')}
fieldArrayName="customLabel"
optionPlaceholders={["Social media link"]}
defaultNumberOfOptions={1}
- addOptionLabel="Add another social media link"
+ addOptionLabel={t('buttons.add-social-media-link')}
/>
diff --git a/apps/ui-playground/content/design/components/navigation.sidebar.tsx b/apps/ui-playground/content/design/components/navigation.sidebar.tsx
index c5cdcc1aab24ee..b42d898a5572ef 100644
--- a/apps/ui-playground/content/design/components/navigation.sidebar.tsx
+++ b/apps/ui-playground/content/design/components/navigation.sidebar.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { useState } from "react";
@@ -6,6 +8,8 @@ import { useState } from "react";
import { NavigationItem } from "@calcom/ui";
export const SidebarExample: React.FC = () => {
+const t = useTranslations("navigation-sidebar");
+
const [isDeelExpanded, setIsDeelExpanded] = useState(true);
return (
@@ -54,7 +58,7 @@ export const SidebarExample: React.FC = () => {
icon: "zap",
}}
/>
-
Manage
+
{t('sections.manage')}
{
+const t = useTranslations("section-subsection-demo");
+
const [isMainOpen, setIsMainOpen] = useState(true);
const [isFirstSubsectionOpen, setIsFirstSubsectionOpen] = useState(true);
const [isSecondSubsectionOpen, setIsSecondSubsectionOpen] = useState(true);
@@ -37,7 +41,7 @@ export const SubSectionExample = () => {
{isFirstSubsectionOpen && (
- This is the content of the first subsection.
+ {t('content.first-subsection-description')}
)}
@@ -52,10 +56,10 @@ export const SubSectionExample = () => {
{isSecondSubsectionOpen && (
-
Field Name
-
Field Type
-
Value
-
When to Write
+
{t('table-headers.field-name')}
+
{t('table-headers.field-type')}
+
{t('table-headers.value')}
+
{t('table-headers.when-to-write')}
diff --git a/apps/ui-playground/content/design/components/select.disabled.tsx b/apps/ui-playground/content/design/components/select.disabled.tsx
index 34da21f6a8dae9..ecf403373ed14a 100644
--- a/apps/ui-playground/content/design/components/select.disabled.tsx
+++ b/apps/ui-playground/content/design/components/select.disabled.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
@@ -12,16 +14,20 @@ const options = [
{ value: "coffee", label: "Coffee" },
];
-export const DisabledExample: React.FC = () => (
+export const DisabledExample: React.FC = () => {
+const t = useTranslations("select-disabled-examples");
+
+return (
-
+
-);
+)
+};
diff --git a/apps/ui-playground/content/design/components/select.multi.tsx b/apps/ui-playground/content/design/components/select.multi.tsx
index 497d5e62dc0e40..e32aa4b15e12fe 100644
--- a/apps/ui-playground/content/design/components/select.multi.tsx
+++ b/apps/ui-playground/content/design/components/select.multi.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { useState } from "react";
@@ -14,6 +16,8 @@ const options = [
];
export const MultiExample: React.FC = () => {
+const t = useTranslations("select-multi-examples");
+
const [multiValue, setMultiValue] = useState<{ value: string; label: string }[]>([]);
return (
@@ -25,7 +29,7 @@ export const MultiExample: React.FC = () => {
onChange={(newValue) => setMultiValue(newValue as { value: string; label: string }[])}
isMulti
isClearable
- placeholder="Choose multiple flavors..."
+ placeholder={t('placeholders.choose-multiple-flavors')}
/>
{
onChange={(newValue) => setMultiValue(newValue as { value: string; label: string }[])}
isMulti
isClearable
- placeholder="Choose multiple flavors... (small)"
+ placeholder={t('placeholders.choose-multiple-flavors-small')}
size="sm"
/>
diff --git a/apps/ui-playground/content/design/components/textarea.basic.tsx b/apps/ui-playground/content/design/components/textarea.basic.tsx
index c57fadb49c1ca3..b51885b32649d8 100644
--- a/apps/ui-playground/content/design/components/textarea.basic.tsx
+++ b/apps/ui-playground/content/design/components/textarea.basic.tsx
@@ -1,18 +1,24 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { TextAreaField } from "@calcom/ui/components/form";
-export const BasicExample: React.FC = () => (
+export const BasicExample: React.FC = () => {
+const t = useTranslations("textarea-examples");
+
+return (
-
+
-);
+)
+};
diff --git a/apps/ui-playground/content/design/components/toast.variants.tsx b/apps/ui-playground/content/design/components/toast.variants.tsx
index 5c0cc7e6bf494a..cbabaafe94f497 100644
--- a/apps/ui-playground/content/design/components/toast.variants.tsx
+++ b/apps/ui-playground/content/design/components/toast.variants.tsx
@@ -1,36 +1,36 @@
"use client";
+import { useTranslations } from "next-intl";
+
import { RenderComponentWithSnippet } from "@/app/components/render";
import { Button } from "@calcom/ui/components/button";
import { showToast } from "@calcom/ui/components/toast";
-export const VariantsExample: React.FC = () => (
+export const VariantsExample: React.FC = () => {
+const t = useTranslations("toast-variants");
+
+return (
{
showToast("This is a success message", "success");
- }}>
- Success
-
+ }}>{t('buttons.success')}
{
showToast("This is a warning message", "warning");
- }}>
- Warning
-
+ }}>{t('buttons.warning')}
{
showToast("This is an error message", "error");
- }}>
- Error
-
+ }}>{t('buttons.error')}
-);
+)
+};
diff --git a/messages/en.json b/messages/en.json
new file mode 100644
index 00000000000000..d97d353b9a8315
--- /dev/null
+++ b/messages/en.json
@@ -0,0 +1,241 @@
+{
+ "table-examples": {
+ "headers": {
+ "column-one": "Header Column 1",
+ "column-two": "Header Column 2"
+ },
+ "body": {
+ "row-one-cell-one": "Row 1, Cell 1",
+ "row-one-cell-two": "Row 1, Cell 2",
+ "row-two-cell-one": "Row 2, Cell 1",
+ "row-two-cell-two": "Row 2, Cell 2"
+ },
+ "footer": {
+ "row-one-cell-one": "Row 3(footer), Cell 1",
+ "row-one-cell-two": "Row 3(footer), Cell 2"
+ },
+ "caption": {
+ "table-description": "Table Caption"
+ },
+ "titles": {
+ "column-one": "Title Column 1",
+ "column-two": "Title Column 2"
+ },
+ "cells": {
+ "row-one-cell-one": "Row 1, Cell 1",
+ "row-one-cell-two": "Row 1, Cell 2",
+ "row-two-cell-one": "Row 2, Cell 1",
+ "row-two-cell-two": "Row 2, Cell 2"
+ }
+ },
+ "logo-component": {
+ "brand": {
+ "alt-text": "Cal",
+ "title": "Cal",
+ "alt-text-icon": "Cal",
+ "title-icon": "Cal"
+ }
+ },
+ "boolean-toggle-group": {
+ "options": {
+ "yes": "Yes",
+ "no": "No"
+ }
+ },
+ "date-picker": {
+ "placeholder": {
+ "select-date": "Pick a date"
+ }
+ },
+ "card-component": {
+ "media": {
+ "play-video-alt": "play feature video"
+ },
+ "images": {
+ "cover-alt": "cover"
+ }
+ },
+ "app-list-card": {
+ "logo": {
+ "alt-text": "{title} logo"
+ },
+ "badges": {
+ "template": "Template"
+ }
+ },
+ "toast-variants": {
+ "buttons": {
+ "success": "Success",
+ "warning": "Warning",
+ "error": "Error"
+ }
+ },
+ "textarea-examples": {
+ "placeholders": {
+ "message-input": "Enter your message...",
+ "default-value-demo": "With default value..."
+ }
+ },
+ "select-multi-examples": {
+ "placeholders": {
+ "choose-multiple-flavors": "Choose multiple flavors...",
+ "choose-multiple-flavors-small": "Choose multiple flavors... (small)"
+ }
+ },
+ "select-disabled-examples": {
+ "placeholders": {
+ "disabled-select": "This select is disabled...",
+ "disabled-field": "This field is disabled..."
+ },
+ "labels": {
+ "disabled-field": "Disabled Field"
+ }
+ },
+ "section-subsection-demo": {
+ "content": {
+ "first-subsection-description": "This is the content of the first subsection."
+ },
+ "table-headers": {
+ "field-name": "Field Name",
+ "field-type": "Field Type",
+ "value": "Value",
+ "when-to-write": "When to Write"
+ }
+ },
+ "navigation-sidebar": {
+ "sections": {
+ "manage": "Manage"
+ }
+ },
+ "multi-input-field-examples": {
+ "sections": {
+ "key-value-pairs": {
+ "title": "Key-Value Pairs",
+ "description": "Allows inputting keys and values"
+ },
+ "custom-placeholders": {
+ "title": "Custom Placeholders"
+ },
+ "without-move-buttons": {
+ "title": "Without Move Buttons"
+ },
+ "custom-add-button": {
+ "title": "Custom Add Button Label"
+ }
+ },
+ "labels": {
+ "environment-variable": "Environment Variable",
+ "value": "Value"
+ },
+ "buttons": {
+ "add-social-media-link": "Add another social media link"
+ }
+ },
+ "input-states-demo": {
+ "placeholders": {
+ "state-input": "{state} input"
+ }
+ },
+ "empty-screen-raw-button": {
+ "descriptions": {
+ "create-new-link": "Create a new link to share"
+ },
+ "buttons": {
+ "create-link": "Create Link",
+ "import-links": "Import Links"
+ }
+ },
+ "empty-screen-basic-example": {
+ "messages": {
+ "create-meeting-prompt": "Create a meeting to get started"
+ },
+ "buttons": {
+ "create-meeting": "Create Meeting"
+ }
+ },
+ "dialog-large-content-example": {
+ "buttons": {
+ "open-dialog": "Open Large Content Dialog",
+ "decline": "Decline",
+ "accept-terms": "Accept Terms"
+ },
+ "content": {
+ "section-heading": "Section {i}1",
+ "lorem-paragraph-one": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor.",
+ "lorem-paragraph-two": "Suspendisse in orci enim. Integer vel sapien at risus ultrices ornare nec sit amet nibh. Duis blandit lectus ac odio rhoncus non congue diam bibendum. Aliquam erat volutpat."
+ },
+ "notices": {
+ "important-heading": "Important Notice",
+ "highlighted-description": "This is a highlighted section within the content to demonstrate how different UI elements appear within a scrollable dialog."
+ }
+ },
+ "checkbox-label-position": {
+ "descriptions": {
+ "label-above-mobile-default": "Description with label above (default on mobile)",
+ "label-side-large-screens": "Description with label to the side (on larger screens)"
+ },
+ "labels": {
+ "above-position": "Label Above",
+ "side-position": "Label to the Side"
+ }
+ },
+ "button-variant-demo": {
+ "headings": {
+ "variant-default_0": "Default"
+ }
+ },
+ "button-disabled-demo": {
+ "headings": {
+ "disabled-state": "Disabled State",
+ "disabled-with-icons": "Disabled with Icons"
+ },
+ "labels": {
+ "disabled": "Disabled",
+ "with-icon": "With Icon"
+ }
+ },
+ "avatar-tooltip-demo": {
+ "avatar": {
+ "alt-text": "With tooltip"
+ },
+ "tooltip": {
+ "hover-message": "Hover me!"
+ },
+ "instructions": {
+ "hover-tooltip": "Hover to see tooltip"
+ }
+ },
+ "avatar-image-demo": {
+ "alt-text": {
+ "with-image": "With image",
+ "without-image": "Without image"
+ },
+ "labels": {
+ "with-image": "With Image",
+ "without-image": "Without Image"
+ }
+ },
+ "alert-actions-demo": {
+ "titles": {
+ "severity-alert-with-actions": "{severityCharAt0ToUpperCaseSeveritySlice1} Alert with Actions"
+ },
+ "buttons": {
+ "dismiss": "Dismiss",
+ "view": "View"
+ }
+ },
+ "icon-grid-component": {
+ "actions": {
+ "copy-component": "Copy Component"
+ },
+ "search": {
+ "placeholder": "Search icons..."
+ }
+ },
+ "homepage-hero": {
+ "heading": {
+ "open-ui-for-absolutely": "Open UI for absolutely",
+ "everyone": "everyone"
+ }
+ }
+}
diff --git a/packages/ui/components/app-list-card/AppListCard.tsx b/packages/ui/components/app-list-card/AppListCard.tsx
index e770d394d06fd3..dc389d48dd9d60 100644
--- a/packages/ui/components/app-list-card/AppListCard.tsx
+++ b/packages/ui/components/app-list-card/AppListCard.tsx
@@ -1,4 +1,6 @@
"use client";
+import { useTranslations } from "next-intl";
+
import type { ReactNode } from "react";
@@ -43,6 +45,8 @@ export type AppListCardProps = {
} & ShouldHighlight;
export const AppListCard = (props: AppListCardProps & { highlight?: boolean }) => {
+const t = useTranslations("app-list-card");
+
const { t } = useLocale();
const {
logo,
@@ -70,7 +74,7 @@ export const AppListCard = (props: AppListCardProps & { highlight?: boolean }) =
) : null}
@@ -81,7 +85,7 @@ export const AppListCard = (props: AppListCardProps & { highlight?: boolean }) =
{isDefault && {t("default")} }
- {isTemplate && Template }
+ {isTemplate && {t('badges.template')} }
-
+
)}
{variant === "NewLaunchSidebarCard" && coverPhoto && (
-
+
)}
{/* TODO: this should be CardActions https://mui.com/material-ui/api/card-actions/ */}
diff --git a/packages/ui/components/form/datepicker/DatePicker.tsx b/packages/ui/components/form/datepicker/DatePicker.tsx
index cf462dd58c3f97..74be24e78b409d 100644
--- a/packages/ui/components/form/datepicker/DatePicker.tsx
+++ b/packages/ui/components/form/datepicker/DatePicker.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from "next-intl";
import * as Popover from "@radix-ui/react-popover";
import { format } from "date-fns";
@@ -15,6 +16,8 @@ type Props = {
};
const DatePicker = ({ minDate, disabled, date, onDatesChange, className }: Props) => {
+const t = useTranslations("date-picker");
+
function handleDayClick(newDate: Date) {
onDatesChange?.(newDate ?? new Date());
}
@@ -42,7 +45,7 @@ const DatePicker = ({ minDate, disabled, date, onDatesChange, className }: Props
color="secondary"
EndIcon="calendar"
className={classNames("justify-between text-left font-normal", !date && "text-subtle")}>
- {date ? <>{format(date, "LLL dd, y")}> : Pick a date }
+ {date ? <>{format(date, "LLL dd, y")}> : {t('placeholder.select-date')} }
(yesNo(value));
@@ -87,16 +91,12 @@ export const BooleanToggleGroup = function BooleanToggleGroup({
- Yes
-
+ value="yes">{t('options.yes')}
- No
-
+ value="no">{t('options.no')}
);
};
diff --git a/packages/ui/components/logo/Logo.tsx b/packages/ui/components/logo/Logo.tsx
index 0fe05ba39a8545..1340d2f8b9c041 100644
--- a/packages/ui/components/logo/Logo.tsx
+++ b/packages/ui/components/logo/Logo.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from "next-intl";
import classNames from "@calcom/ui/classNames";
export function Logo({
@@ -13,16 +14,18 @@ export function Logo({
className?: string;
src?: string;
}) {
+const t = useTranslations("logo-component");
+
return (
{icon ? (
-
+
) : (
)}
diff --git a/packages/ui/components/table/TableExamples.tsx b/packages/ui/components/table/TableExamples.tsx
index 5b6616d45c08b7..7c99190ea7912c 100644
--- a/packages/ui/components/table/TableExamples.tsx
+++ b/packages/ui/components/table/TableExamples.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from "next-intl";
import { Table } from "./Table";
import { TableActions } from "./TableActions";
import {
@@ -11,50 +12,57 @@ import {
TableCaption,
} from "./TableNew";
-export const TableNewExampleComponent = () => (
+export const TableNewExampleComponent = () => {
+const t = useTranslations("table-examples");
+
+return (
- Header Column 1
- Header Column 2
+ {t('headers.column-one')}
+ {t('headers.column-two')}
- Row 1, Cell 1
- Row 1, Cell 2
+ {t('body.row-one-cell-one')}
+ {t('body.row-one-cell-two')}
- Row 2, Cell 1
- Row 2, Cell 2
+ {t('body.row-two-cell-one')}
+ {t('body.row-two-cell-two')}
- Row 3(footer), Cell 1
- Row 3(footer), Cell 2
+ {t('footer.row-one-cell-one')}
+ {t('footer.row-one-cell-two')}
- Table Caption
+ {t('caption.table-description')}
-);
+)
+};
+
+export const TableExampleComponent = () => {
+const t = useTranslations("table-examples");
-export const TableExampleComponent = () => (
+return (
- Title Column 1
- Title Column 2
+ {t('titles.column-one')}
+ {t('titles.column-two')}
- Row 1, Cell 1
- Row 1, Cell 2
+ {t('cells.row-one-cell-one')}
+ {t('cells.row-one-cell-two')}
- Row 2, Cell 1
- Row 2, Cell 2
+ {t('cells.row-two-cell-one')}
+ {t('cells.row-two-cell-two')}
(
-);
+)
+};