Skip to content

The agent that grows with you

i18n(desktop): localize the strings the bot rail still hardcoded

Brooklyn Nicholsonfa236b31ffb0
diff --git a/apps/desktop/src/plugins/hermes-bots/avatar-picker.tsx b/apps/desktop/src/plugins/hermes-bots/avatar-picker.tsx
index b3446cc174d..d448db9e6ae 100644
--- a/apps/desktop/src/plugins/hermes-bots/avatar-picker.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/avatar-picker.tsx
@@ -121,14 +121,13 @@ export function AvatarPicker({ shape, color, image, onShape, onColor, onImage, g
return (
<div className="grid justify-items-center gap-3">
- {/* Tab pills: Bot | Generate | Upload | Pet */}
<SegmentedControl
onChange={goTab}
options={[
- { id: 'bot', label: 'Bot' },
- { id: 'generate', label: 'Generate' },
+ { id: 'bot', label: b.avatar.tabBot },
+ { id: 'generate', label: b.avatar.tabGenerate },
{ id: 'upload', label: b.avatar.upload },
- { id: 'pet', label: 'Pet' }
+ { id: 'pet', label: b.avatar.tabPet }
]}
value={tab}
/>
@@ -165,7 +164,12 @@ export function AvatarPicker({ shape, color, image, onShape, onColor, onImage, g
title={k || 'Auto — the name decides'}
>
{k ? (
- <BotFace color={avatarColor(color, pickerName)} name={pickerName} shape={blobShapeString(seedPart, k)} size={32} />
+ <BotFace
+ color={avatarColor(color, pickerName)}
+ name={pickerName}
+ shape={blobShapeString(seedPart, k)}
+ size={32}
+ />
) : (
<span className="text-[0.6rem] text-(--ui-text-tertiary)">Auto</span>
)}
@@ -188,9 +192,7 @@ export function AvatarPicker({ shape, color, image, onShape, onColor, onImage, g
<Button
onClick={() => onShape(blobShapeString(locked ? '' : pickerName, kind))}
size="sm"
- title={
- locked ? b.avatar.unlockFollowsName : 'Keep this exact face even if the name changes'
- }
+ title={locked ? b.avatar.unlockFollowsName : 'Keep this exact face even if the name changes'}
type="button"
variant="ghost"
>
@@ -270,9 +272,7 @@ export function AvatarPicker({ shape, color, image, onShape, onColor, onImage, g
{genBusy ? 'Generating…' : 'Generate'}
</Button>
{describe.trim() ? null : (
- <div className="text-center text-[0.65rem] text-(--ui-text-quaternary)">
- {b.bot.descriptionHint}
- </div>
+ <div className="text-center text-[0.65rem] text-(--ui-text-quaternary)">{b.bot.descriptionHint}</div>
)}
</div>
) : (
diff --git a/apps/desktop/src/plugins/hermes-bots/canonical-chat.ts b/apps/desktop/src/plugins/hermes-bots/canonical-chat.ts
index fe09a8f841c..d6d58e65a2e 100644
--- a/apps/desktop/src/plugins/hermes-bots/canonical-chat.ts
+++ b/apps/desktop/src/plugins/hermes-bots/canonical-chat.ts
@@ -518,7 +518,7 @@ export async function prepareBotSource(bot: RosterRow) {
if (route && typeof host.requestProfile !== 'function') {
throw new Error(
- getPluginCtx()?.i18n.t('bot.remoteConnectionsUnsupported') ??
+ getPluginCtx()?.i18n?.t('bot.remoteConnectionsUnsupported') ??
'Update Hermes Desktop to chat with bots on other connections.'
)
}
diff --git a/apps/desktop/src/plugins/hermes-bots/i18n.ts b/apps/desktop/src/plugins/hermes-bots/i18n.ts
index 5357b44d788..682bccdf1ac 100644
--- a/apps/desktop/src/plugins/hermes-bots/i18n.ts
+++ b/apps/desktop/src/plugins/hermes-bots/i18n.ts
@@ -41,7 +41,20 @@ type BotsMessages = {
pinned: string
needsAttention: string
needsInput: string
+ /** The kind filter's three options, in menu order. */
+ botsAndGroups: string
+ botsOnly: string
+ groupsOnly: string
+ /** The activity filter's four options, in menu order. */
+ anyActivity: string
activeNow: string
+ recentlyActive: string
+ older: string
+ /** How a row's owning gateway is doing — see `botSourceStatus`. */
+ gatewayRemoved: string
+ onDemand: string
+ ready: string
+ statusUnknown: string
unavailable: string
retryNow: string
rosterUnavailable: (reason: string) => string
@@ -74,7 +87,11 @@ type BotsMessages = {
blobFromName: string
unlockFollowsName: string
randomize: string
+ /** The picker's four tabs, in order. */
+ tabBot: string
+ tabGenerate: string
upload: string
+ tabPet: string
removeImage: string
removeBackToShape: string
describePlaceholder: string
@@ -90,7 +107,7 @@ type BotsMessages = {
/** Group chats: the room, its composer, threads and activity feed. */
group: {
newTitle: string
- newDesc: string
+ manageDesc: string
manageTitle: string
settingsTitle: string
settingsDesc: string
@@ -149,7 +166,17 @@ const en: BotsMessages = {
pinned: 'Pinned',
needsAttention: 'needs attention',
needsInput: 'Needs your input',
+ botsAndGroups: 'Bots and group chats',
+ botsOnly: 'Bots only',
+ groupsOnly: 'Group chats only',
+ anyActivity: 'Any activity',
activeNow: 'Active now',
+ recentlyActive: 'Recently active',
+ older: 'Older',
+ gatewayRemoved: 'Gateway removed',
+ onDemand: 'On demand',
+ ready: 'Ready',
+ statusUnknown: 'Status unknown',
unavailable: 'Unavailable',
retryNow: 'Retry now',
rosterUnavailable: reason =>
@@ -181,12 +208,14 @@ const en: BotsMessages = {
blobFromName: 'Blob face — drawn from the bot’s name',
unlockFollowsName: 'Unlock — the face follows the bot’s name again',
randomize: 'Randomize',
+ tabBot: 'Bot',
+ tabGenerate: 'Generate',
upload: 'Upload',
+ tabPet: 'Pet',
removeImage: 'Remove image — use shape',
removeBackToShape: 'Remove — back to shape avatar',
describePlaceholder: 'Describe your avatar…',
- describeHint:
- 'Leave blank to auto-generate from name/title/description + agent-messaging roster.',
+ describeHint: 'Leave blank to auto-generate from name/title/description + agent-messaging roster.',
matchTheName: 'Match the name',
pickPet: 'Pick a pet as this bot’s profile picture.',
petLoadFailed: 'Could not load that pet — try another.',
@@ -197,7 +226,7 @@ const en: BotsMessages = {
},
group: {
newTitle: 'New Group Chat',
- newDesc: 'A bot can join multiple group chats. Memberships sync to every machine.',
+ manageDesc: 'A bot can join multiple group chats. Memberships sync to every machine.',
manageTitle: 'Manage groups',
settingsTitle: 'Group settings',
settingsDesc: 'Rename the group or set a room picture. Members and history are kept.',
diff --git a/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx b/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx
index a798be91403..60b561961d2 100644
--- a/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx
+++ b/apps/desktop/src/plugins/hermes-bots/roster-pane.tsx
@@ -680,9 +680,9 @@ export function BotsPane() {
<DropdownMenuContent align="end">
{(
[
- ['all', 'Bots and group chats'],
- ['bots', 'Bots only'],
- ['groups', 'Group chats only']
+ ['all', b.roster.botsAndGroups],
+ ['bots', b.roster.botsOnly],
+ ['groups', b.roster.groupsOnly]
] as [RosterKindFilter, string][]
).map(([value, label]) => (
<DropdownMenuItem key={`kind:${value}`} onSelect={() => setRowKindFilter(value)}>
@@ -693,10 +693,10 @@ export function BotsPane() {
<DropdownMenuSeparator />
{(
[
- ['all', 'Any activity'],
+ ['all', b.roster.anyActivity],
['active', b.roster.activeNow],
- ['recent', 'Recently active'],
- ['older', 'Older']
+ ['recent', b.roster.recentlyActive],
+ ['older', b.roster.older]
] as [RosterActivityFilter, string][]
).map(([value, label]) => (
<DropdownMenuItem key={`activity:${value}`} onSelect={() => setActivityFilter(value)}>
@@ -923,7 +923,10 @@ export function BotsPane() {
doneLabel="Deleted"
onClose={() => setDeletingGroup(null)}
onConfirm={async () => {
- if (!deletingGroup) {return}
+ if (!deletingGroup) {
+ return
+ }
+
await disbandGroupChat(deletingGroup.name, deletingGroup.members)
host.notify({
kind: 'success',