feat(03-03): replace display strings in page files I-R and App.tsx with VOCAB
- InviteLanding: skill bootstrap and invite heading use VOCAB.appName and VOCAB.company - IssueDetail: Board actor identity uses VOCAB.board - NewAgent: first agent name/title defaults to VOCAB.ceo - NotFound: company not found message uses VOCAB.company - PluginManager: breadcrumb fallback uses VOCAB.company - PluginSettings: breadcrumb fallback uses VOCAB.company - Routines: error messages and creation hint use VOCAB.appName - App: startup log messages use VOCAB.appName; CLI command unchanged
This commit is contained in:
parent
469993a7b6
commit
aafa56a63c
8 changed files with 21 additions and 13 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import { Navigate, Outlet, Route, Routes, useLocation, useParams } from "@/lib/router";
|
import { Navigate, Outlet, Route, Routes, useLocation, useParams } from "@/lib/router";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Layout } from "./components/Layout";
|
import { Layout } from "./components/Layout";
|
||||||
|
|
@ -55,8 +56,8 @@ function BootstrapPendingPage({ hasActiveInvite = false }: { hasActiveInvite?: b
|
||||||
<h1 className="text-xl font-semibold">Instance setup required</h1>
|
<h1 className="text-xl font-semibold">Instance setup required</h1>
|
||||||
<p className="mt-2 text-sm text-muted-foreground">
|
<p className="mt-2 text-sm text-muted-foreground">
|
||||||
{hasActiveInvite
|
{hasActiveInvite
|
||||||
? "No instance admin exists yet. A bootstrap invite is already active. Check your Paperclip startup logs for the first admin invite URL, or run this command to rotate it:"
|
? `No instance admin exists yet. A bootstrap invite is already active. Check your ${VOCAB.appName} startup logs for the first admin invite URL, or run this command to rotate it:`
|
||||||
: "No instance admin exists yet. Run this command in your Paperclip environment to generate the first admin invite URL:"}
|
: `No instance admin exists yet. Run this command in your ${VOCAB.appName} environment to generate the first admin invite URL:`}
|
||||||
</p>
|
</p>
|
||||||
<pre className="mt-4 overflow-x-auto rounded-md border border-border bg-muted/30 p-3 text-xs">
|
<pre className="mt-4 overflow-x-auto rounded-md border border-border bg-muted/30 p-3 text-xs">
|
||||||
{`pnpm paperclipai auth bootstrap-ceo`}
|
{`pnpm paperclipai auth bootstrap-ceo`}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import { Link, useParams } from "@/lib/router";
|
import { Link, useParams } from "@/lib/router";
|
||||||
import { accessApi } from "../api/access";
|
import { accessApi } from "../api/access";
|
||||||
|
|
@ -191,7 +192,7 @@ export function InviteLandingPage() {
|
||||||
)}
|
)}
|
||||||
{(onboardingSkillUrl || onboardingSkillPath || onboardingInstallPath) && (
|
{(onboardingSkillUrl || onboardingSkillPath || onboardingInstallPath) && (
|
||||||
<div className="mt-3 space-y-1 rounded-md border border-border bg-muted/30 p-3 text-xs text-muted-foreground">
|
<div className="mt-3 space-y-1 rounded-md border border-border bg-muted/30 p-3 text-xs text-muted-foreground">
|
||||||
<p className="font-medium text-foreground">Paperclip skill bootstrap</p>
|
<p className="font-medium text-foreground">{VOCAB.appName} skill bootstrap</p>
|
||||||
{onboardingSkillUrl && <p className="font-mono break-all">GET {onboardingSkillUrl}</p>}
|
{onboardingSkillUrl && <p className="font-mono break-all">GET {onboardingSkillUrl}</p>}
|
||||||
{!onboardingSkillUrl && onboardingSkillPath && <p className="font-mono break-all">GET {onboardingSkillPath}</p>}
|
{!onboardingSkillUrl && onboardingSkillPath && <p className="font-mono break-all">GET {onboardingSkillPath}</p>}
|
||||||
{onboardingInstallPath && <p className="font-mono break-all">Install to {onboardingInstallPath}</p>}
|
{onboardingInstallPath && <p className="font-mono break-all">Install to {onboardingInstallPath}</p>}
|
||||||
|
|
@ -226,7 +227,7 @@ export function InviteLandingPage() {
|
||||||
<div className="mx-auto max-w-xl py-10">
|
<div className="mx-auto max-w-xl py-10">
|
||||||
<div className="rounded-lg border border-border bg-card p-6">
|
<div className="rounded-lg border border-border bg-card p-6">
|
||||||
<h1 className="text-xl font-semibold">
|
<h1 className="text-xl font-semibold">
|
||||||
{invite.inviteType === "bootstrap_ceo" ? "Bootstrap your Paperclip instance" : "Join this Paperclip company"}
|
{invite.inviteType === "bootstrap_ceo" ? `Bootstrap your ${VOCAB.appName} instance` : `Join this ${VOCAB.appName} ${VOCAB.company.toLowerCase()}`}
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-2 text-sm text-muted-foreground">Invite expires {dateTime(invite.expiresAt)}.</p>
|
<p className="mt-2 text-sm text-muted-foreground">Invite expires {dateTime(invite.expiresAt)}.</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { useEffect, useMemo, useRef, useState, type ChangeEvent, type DragEvent } from "react";
|
import { useEffect, useMemo, useRef, useState, type ChangeEvent, type DragEvent } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { pickTextColorForPillBg } from "@/lib/color-contrast";
|
import { pickTextColorForPillBg } from "@/lib/color-contrast";
|
||||||
import { Link, useLocation, useNavigate, useParams } from "@/lib/router";
|
import { Link, useLocation, useNavigate, useParams } from "@/lib/router";
|
||||||
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
@ -191,7 +192,7 @@ function ActorIdentity({ evt, agentMap }: { evt: ActivityEvent; agentMap: Map<st
|
||||||
return <Identity name={agent?.name ?? id.slice(0, 8)} size="sm" />;
|
return <Identity name={agent?.name ?? id.slice(0, 8)} size="sm" />;
|
||||||
}
|
}
|
||||||
if (evt.actorType === "system") return <Identity name="System" size="sm" />;
|
if (evt.actorType === "system") return <Identity name="System" size="sm" />;
|
||||||
if (evt.actorType === "user") return <Identity name="Board" size="sm" />;
|
if (evt.actorType === "user") return <Identity name={VOCAB.board} size="sm" />;
|
||||||
return <Identity name={id || "Unknown"} size="sm" />;
|
return <Identity name={id || "Unknown"} size="sm" />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
import { useNavigate, useSearchParams } from "@/lib/router";
|
import { useNavigate, useSearchParams } from "@/lib/router";
|
||||||
import { useCompany } from "../context/CompanyContext";
|
import { useCompany } from "../context/CompanyContext";
|
||||||
|
|
@ -111,8 +112,8 @@ export function NewAgent() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isFirstAgent) {
|
if (isFirstAgent) {
|
||||||
if (!name) setName("CEO");
|
if (!name) setName(VOCAB.ceo);
|
||||||
if (!title) setTitle("CEO");
|
if (!title) setTitle(VOCAB.ceo);
|
||||||
}
|
}
|
||||||
}, [isFirstAgent]); // eslint-disable-line react-hooks/exhaustive-deps
|
}, [isFirstAgent]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { Link, useLocation } from "@/lib/router";
|
import { Link, useLocation } from "@/lib/router";
|
||||||
import { AlertTriangle, Compass } from "lucide-react";
|
import { AlertTriangle, Compass } from "lucide-react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
|
@ -26,7 +27,7 @@ export function NotFoundPage({ scope = "global", requestedPrefix }: NotFoundPage
|
||||||
const currentPath = `${location.pathname}${location.search}${location.hash}`;
|
const currentPath = `${location.pathname}${location.search}${location.hash}`;
|
||||||
const normalizedPrefix = requestedPrefix?.toUpperCase();
|
const normalizedPrefix = requestedPrefix?.toUpperCase();
|
||||||
|
|
||||||
const title = scope === "invalid_company_prefix" ? "Company not found" : "Page not found";
|
const title = scope === "invalid_company_prefix" ? `${VOCAB.company} not found` : "Page not found";
|
||||||
const description =
|
const description =
|
||||||
scope === "invalid_company_prefix"
|
scope === "invalid_company_prefix"
|
||||||
? `No company matches prefix "${normalizedPrefix ?? "unknown"}".`
|
? `No company matches prefix "${normalizedPrefix ?? "unknown"}".`
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* @see PLUGIN_SPEC.md §9 — Plugin Marketplace / Manager
|
* @see PLUGIN_SPEC.md §9 — Plugin Marketplace / Manager
|
||||||
*/
|
*/
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
import type { PluginRecord } from "@paperclipai/shared";
|
import type { PluginRecord } from "@paperclipai/shared";
|
||||||
import { Link } from "@/lib/router";
|
import { Link } from "@/lib/router";
|
||||||
|
|
@ -74,7 +75,7 @@ export function PluginManager() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setBreadcrumbs([
|
setBreadcrumbs([
|
||||||
{ label: selectedCompany?.name ?? "Company", href: "/dashboard" },
|
{ label: selectedCompany?.name ?? VOCAB.company, href: "/dashboard" },
|
||||||
{ label: "Settings", href: "/instance/settings/heartbeats" },
|
{ label: "Settings", href: "/instance/settings/heartbeats" },
|
||||||
{ label: "Plugins" },
|
{ label: "Plugins" },
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
import { Puzzle, ArrowLeft, ShieldAlert, ActivitySquare, CheckCircle, XCircle, Loader2, Clock, Cpu, Webhook, CalendarClock, AlertTriangle } from "lucide-react";
|
import { Puzzle, ArrowLeft, ShieldAlert, ActivitySquare, CheckCircle, XCircle, Loader2, Clock, Cpu, Webhook, CalendarClock, AlertTriangle } from "lucide-react";
|
||||||
import { useCompany } from "@/context/CompanyContext";
|
import { useCompany } from "@/context/CompanyContext";
|
||||||
|
|
@ -114,7 +115,7 @@ export function PluginSettings() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setBreadcrumbs([
|
setBreadcrumbs([
|
||||||
{ label: selectedCompany?.name ?? "Company", href: "/dashboard" },
|
{ label: selectedCompany?.name ?? VOCAB.company, href: "/dashboard" },
|
||||||
{ label: "Settings", href: "/instance/settings/heartbeats" },
|
{ label: "Settings", href: "/instance/settings/heartbeats" },
|
||||||
{ label: "Plugins", href: "/instance/settings/plugins" },
|
{ label: "Plugins", href: "/instance/settings/plugins" },
|
||||||
{ label: plugin?.manifestJson?.displayName ?? plugin?.packageName ?? "Plugin Details" },
|
{ label: plugin?.manifestJson?.displayName ?? plugin?.packageName ?? "Plugin Details" },
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
|
import { VOCAB } from "@paperclipai/branding";
|
||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import { useNavigate } from "@/lib/router";
|
import { useNavigate } from "@/lib/router";
|
||||||
import { ChevronDown, ChevronRight, MoreHorizontal, Play, Plus, Repeat } from "lucide-react";
|
import { ChevronDown, ChevronRight, MoreHorizontal, Play, Plus, Repeat } from "lucide-react";
|
||||||
|
|
@ -155,7 +156,7 @@ export function Routines() {
|
||||||
onError: (mutationError) => {
|
onError: (mutationError) => {
|
||||||
pushToast({
|
pushToast({
|
||||||
title: "Failed to update routine",
|
title: "Failed to update routine",
|
||||||
body: mutationError instanceof Error ? mutationError.message : "Paperclip could not update the routine.",
|
body: mutationError instanceof Error ? mutationError.message : `${VOCAB.appName} could not update the routine.`,
|
||||||
tone: "error",
|
tone: "error",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -178,7 +179,7 @@ export function Routines() {
|
||||||
onError: (mutationError) => {
|
onError: (mutationError) => {
|
||||||
pushToast({
|
pushToast({
|
||||||
title: "Routine run failed",
|
title: "Routine run failed",
|
||||||
body: mutationError instanceof Error ? mutationError.message : "Paperclip could not start the routine run.",
|
body: mutationError instanceof Error ? mutationError.message : `${VOCAB.appName} could not start the routine run.`,
|
||||||
tone: "error",
|
tone: "error",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -464,7 +465,7 @@ export function Routines() {
|
||||||
|
|
||||||
<div className="flex flex-col gap-3 border-t border-border/60 px-5 py-4 sm:flex-row sm:items-center sm:justify-between">
|
<div className="flex flex-col gap-3 border-t border-border/60 px-5 py-4 sm:flex-row sm:items-center sm:justify-between">
|
||||||
<div className="text-sm text-muted-foreground">
|
<div className="text-sm text-muted-foreground">
|
||||||
After creation, Paperclip takes you straight to trigger setup for schedules, webhooks, or internal runs.
|
After creation, {VOCAB.appName} takes you straight to trigger setup for schedules, webhooks, or internal runs.
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2 sm:items-end">
|
<div className="flex flex-col gap-2 sm:items-end">
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue