fix i18n keys

This commit is contained in:
Josh Hawkins
2026-02-27 09:40:21 -06:00
parent 5841c827f7
commit 4b950723bc
9 changed files with 76 additions and 26 deletions
@@ -193,7 +193,7 @@ export default function CameraReviewClassification({
<>
<div className="mb-2">
<Label className="flex flex-row items-center text-base">
<Trans ns="views/settings">camera.review.alerts</Trans>
<Trans ns="views/settings">cameraReview.review.alerts</Trans>
<MdCircle className="ml-3 size-2 text-severity_alert" />
</Label>
<div className="text-sm text-muted-foreground">
@@ -256,7 +256,9 @@ export default function CameraReviewClassification({
<>
<div className="mb-2">
<Label className="flex flex-row items-center text-base">
<Trans ns="views/settings">camera.review.detections</Trans>
<Trans ns="views/settings">
cameraReview.review.detections
</Trans>
<MdCircle className="ml-3 size-2 text-severity_detection" />
</Label>
{selectDetections && (
@@ -883,12 +883,15 @@ export function ConfigSection({
{isSaving ? (
<>
<ActivityIndicator className="h-4 w-4" />
{t("saving", { ns: "common", defaultValue: "Saving..." })}
{t("button.saving", {
ns: "common",
defaultValue: "Saving...",
})}
</>
) : (
<>
<LuSave className="h-4 w-4" />
{t("save", { ns: "common", defaultValue: "Save" })}
{t("button.save", { ns: "common", defaultValue: "Save" })}
</>
)}
</Button>
@@ -909,7 +912,7 @@ export function ConfigSection({
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>
{t("cancel", { ns: "common" })}
{t("button.cancel", { ns: "common" })}
</AlertDialogCancel>
<AlertDialogAction
className="bg-selected text-white hover:bg-selected/90"
@@ -945,7 +948,7 @@ export function ConfigSection({
level === "camera" &&
isOverridden && (
<Badge variant="secondary" className="text-xs">
{t("overridden", {
{t("button.overridden", {
ns: "common",
defaultValue: "Overridden",
})}
@@ -980,7 +983,7 @@ export function ConfigSection({
<Heading as="h4">{title}</Heading>
{showOverrideIndicator && level === "camera" && isOverridden && (
<Badge variant="secondary" className="text-xs">
{t("overridden", {
{t("button.overridden", {
ns: "common",
defaultValue: "Overridden",
})}
@@ -52,7 +52,7 @@ export function ArrayFieldTemplate(props: ArrayFieldTemplateProps) {
className="gap-2"
>
<LuPlus className="h-4 w-4" />
{t("add", { ns: "common", defaultValue: "Add" })}
{t("button.add", { ns: "common", defaultValue: "Add" })}
</Button>
)}
</div>
@@ -195,8 +195,8 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
ordered.forEach((item) => grouped.add(item.name));
const label = domain
? t(`${domain}.${groupKey}`, {
ns: "config/global",
? t(`${sectionI18nPrefix}.${domain}.${groupKey}`, {
ns: "config/groups",
defaultValue: toTitle(groupKey),
})
: t(`groups.${groupKey}`, {
@@ -261,7 +261,7 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
className="gap-2"
>
<LuPlus className="h-4 w-4" />
{t("add", { ns: "common", defaultValue: "Add" })}
{t("button.add", { ns: "common", defaultValue: "Add" })}
</Button>
);
};
@@ -179,7 +179,7 @@ export function SwitchesWidget(props: WidgetProps) {
</Button>
</CollapsibleTrigger>
<CollapsibleContent className="bg-background_alt p-2">
<CollapsibleContent className="bg-background_alt p-2 md:max-w-xl">
{availableEntities.length === 0 ? (
<div className="text-sm text-muted-foreground">{emptyMessage}</div>
) : (
+1 -1
View File
@@ -128,7 +128,7 @@ export function SingleSectionPage({
variant="secondary"
className="border-2 border-selected text-xs text-primary-variant"
>
{t("overridden", {
{t("button.overridden", {
ns: "common",
defaultValue: "Overridden",
})}