Merge pull request #178 from shumaiOne/feat/i18n-fixes

feat(i18n): localize members dialog, notifications, uploads, user menus, dates, and players
This commit is contained in:
Yiling-J
2026-07-06 10:59:24 +08:00
committed by GitHub
58 changed files with 1210 additions and 171 deletions
+13 -13
View File
@@ -278,7 +278,7 @@ export const MessageCard: React.FC<MessageCardProps> = ({
onClick={handleReply}
className="text-xs font-medium text-gray-500 hover:text-blue-600 flex items-center gap-1 cursor-pointer"
>
Reply
{m.reply()}
</button>
</div>
</div>
@@ -289,11 +289,9 @@ export const MessageCard: React.FC<MessageCardProps> = ({
<DialogHeader className="pb-4 border-b border-foreground/15">
<DialogTitle className="flex items-center gap-2 text-xl font-bold">
<Terminal className="w-5 h-5 text-violet-500" />
Agent Session Logs
{m.agent_session_logs()}
</DialogTitle>
<DialogDescription>
Step-by-step execution trace of the agent's background tasks and tool calls.
</DialogDescription>
<DialogDescription>{m.agent_logs_description()}</DialogDescription>
</DialogHeader>
<div className="flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text">
@@ -338,20 +336,22 @@ export const MessageCard: React.FC<MessageCardProps> = ({
if (msg.role === 'user') {
badgeColor =
'bg-slate-100 text-slate-800 dark:bg-slate-900/30 dark:text-slate-300'
roleName = 'User'
roleName = m.role_user()
} else if (msg.role === 'assistant') {
badgeColor =
'bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300'
roleName = 'Agent'
roleName = m.role_agent()
} else if (msg.role === 'toolResult') {
badgeColor = msg.isError
? 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300'
: 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300'
roleName = `Tool Result: ${String(msg.toolName || 'Unknown')}`
roleName = m.tool_result_with_name({
name: String(msg.toolName || m.unknown()),
})
} else if (msg.role === 'thought') {
badgeColor =
'bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300'
roleName = 'Thinking'
roleName = m.role_thinking()
}
const renderToolCallArguments = (args: unknown) => {
@@ -450,7 +450,7 @@ export const MessageCard: React.FC<MessageCardProps> = ({
if (type === 'toolCall') {
const toolName = String(
itemObj.name || itemObj.toolName || 'Unknown',
itemObj.name || itemObj.toolName || m.unknown(),
)
const toolArgs = itemObj.arguments || itemObj.args
renderedBlocks.push(
@@ -480,7 +480,7 @@ export const MessageCard: React.FC<MessageCardProps> = ({
key={`img-${idx}`}
className="text-xs text-muted-foreground italic flex items-center gap-1.5 py-1"
>
[Image Object]
{m.image_object()}
</div>,
)
return
@@ -574,9 +574,9 @@ export const MessageCard: React.FC<MessageCardProps> = ({
) : (
<div className="flex flex-col items-center justify-center py-12 text-center text-muted-foreground">
<Terminal className="w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse" />
<p className="text-sm font-medium">No logs found for this session.</p>
<p className="text-sm font-medium">{m.no_logs_found()}</p>
<p className="text-xs text-muted-foreground/60 mt-1">
The session might have been initialized but has not produced any entries yet.
{m.session_no_entries_yet()}
</p>
</div>
)}
@@ -1,4 +1,5 @@
import type { CommentInfo, PostAttachmentRequest, PostAttachmentResponse } from '@shumai/dtos'
import { m } from '@/ui/paraglide/messages.js'
import type { BotInfo } from '@shumai/dtos'
import type { UserInfo } from '@shumai/dtos'
import { client } from '@/ui/api/client'
@@ -603,7 +604,7 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
{replyingTo && (
<div className="flex items-center justify-between bg-muted p-2 px-3 rounded-lg border border-border">
<div className="text-xs text-muted-foreground truncate mr-2">
reply to: {replyingTo.message}
{m.reply_to_message({ message: replyingTo.message || '' })}
</div>
<button
onClick={onCancelReply}
@@ -674,7 +675,7 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
suppressContentEditableWarning
onInput={handleInput}
onKeyDown={handleKeyDown}
data-placeholder={replyingTo ? 'Reply...' : 'Message...'}
data-placeholder={replyingTo ? m.reply_placeholder() : m.message_placeholder()}
className={`bg-transparent border-none focus:ring-0 resize-none min-h-[40px] leading-relaxed py-2 focus:outline-none block ${paddingLeftClass}`}
/>
</div>
@@ -784,7 +785,7 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
variant={isTimestampEnabled ? 'secondary' : 'ghost'}
size="icon"
className={`p-2 rounded-full cursor-pointer ${isTimestampEnabled ? 'text-blue-600 bg-blue-50 dark:bg-blue-900/20' : ''}`}
title={isTimestampEnabled ? 'Disable Timestamp' : 'Enable Timestamp'}
title={isTimestampEnabled ? m.disable_timestamp() : m.enable_timestamp()}
>
<Clock className="w-4 h-4" />
</Button>
@@ -794,7 +795,7 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
className="p-2 rounded-full cursor-pointer"
variant="ghost"
size="icon"
title="Attach files"
title={m.attach_files()}
>
<Paperclip className="w-4 h-4" />
</Button>
@@ -804,7 +805,7 @@ export const ChatInput = React.forwardRef<HTMLDivElement, ChatInputProps>(
variant="ghost"
size="icon"
className="p-2 rounded-full cursor-pointer"
title="Toggle Annotation"
title={m.toggle_annotation()}
>
<DrawAnnotation className="w-4 h-4" />
</Button>
@@ -1,5 +1,6 @@
import { client } from '@/ui/api/client'
import type { AssetInfo, FieldValueInfo } from '@shumai/dtos'
import { m } from '@/ui/paraglide/messages.js'
import { useQuery } from '@tanstack/react-query'
import { Badge } from '@/ui/components/ui/badge'
@@ -292,8 +293,11 @@ export function FileCard({
className="h-auto p-0 text-sm text-foreground !bg-transparent"
/>
<p className="text-sm text-muted-foreground">
{displayItem.createdAt && formatTimeAgo(displayItem.createdAt)} by{' '}
{displayItem.creator?.name}
{displayItem.createdAt &&
m.created_by_at({
time: formatTimeAgo(displayItem.createdAt),
author: displayItem.creator?.name || m.unknown_user(),
})}
</p>
</div>
<DropdownMenu modal={false}>
@@ -317,7 +321,7 @@ export function FileCard({
}}
>
<Download className="mr-2 h-4 w-4" />
<span>Download</span>
<span>{m.download()}</span>
</DropdownMenuItem>
{canEdit && (
<DropdownMenuItem
@@ -328,7 +332,7 @@ export function FileCard({
className="text-destructive"
>
<Trash2 className="mr-2 h-4 w-4" />
<span>Remove from Share</span>
<span>{m.remove_from_share()}</span>
</DropdownMenuItem>
)}
</>
@@ -340,7 +344,7 @@ export function FileCard({
}}
>
<History className="mr-2 h-4 w-4" />
<span>Restore</span>
<span>{m.restore()}</span>
</DropdownMenuItem>
) : (
<>
@@ -352,7 +356,7 @@ export function FileCard({
}}
>
<Edit className="mr-2 h-4 w-4" />
<span>Rename</span>
<span>{m.rename()}</span>
</DropdownMenuItem>
)}
<DropdownMenuItem
@@ -362,7 +366,7 @@ export function FileCard({
}}
>
<Download className="mr-2 h-4 w-4" />
<span>Download</span>
<span>{m.download()}</span>
</DropdownMenuItem>
{canEdit && (
<>
@@ -375,7 +379,7 @@ export function FileCard({
className="text-destructive"
>
<Trash2 className="mr-2 h-4 w-4" />
<span>Delete</span>
<span>{m.delete()}</span>
</DropdownMenuItem>
</>
)}
@@ -10,6 +10,7 @@ import { EditableText } from '@/ui/components/ui/editable-text'
import { cn } from '@/ui/lib/utils'
import { useDraggable, useDroppable } from '@dnd-kit/react'
import type { AssetInfo, ChildPreview } from '@shumai/dtos'
import { m } from '@/ui/paraglide/messages.js'
import { Download, Edit, History, MoreHorizontal, Trash2 } from 'lucide-react'
import React, { useEffect, useMemo, useRef, useState } from 'react'
import type { DragState } from '../dnd-types'
@@ -344,7 +345,9 @@ export function FolderCard({
<div className="flex items-center justify-between text-muted-foreground">
<span className="text-xs tracking-wide opacity-80">
{item.fileCount || 0} {(item.fileCount || 0) === 1 ? 'Item' : 'Items'}
{(item.fileCount || 0) === 1
? m.n_items_singular({ count: item.fileCount || 0 })
: m.n_items_plural({ count: item.fileCount || 0 })}
</span>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
@@ -365,7 +368,7 @@ export function FolderCard({
}}
>
<Download className="mr-2 h-4 w-4" />
<span>Download</span>
<span>{m.download()}</span>
</DropdownMenuItem>
{canEdit && (
<DropdownMenuItem
@@ -376,7 +379,7 @@ export function FolderCard({
className="text-destructive"
>
<Trash2 className="mr-2 h-4 w-4" />
<span>Remove from Share</span>
<span>{m.remove_from_share()}</span>
</DropdownMenuItem>
)}
</>
@@ -388,7 +391,7 @@ export function FolderCard({
}}
>
<History className="mr-2 h-4 w-4" />
<span>Restore</span>
<span>{m.restore()}</span>
</DropdownMenuItem>
) : (
<>
@@ -400,7 +403,7 @@ export function FolderCard({
}}
>
<Edit className="mr-2 h-4 w-4" />
<span>Rename</span>
<span>{m.rename()}</span>
</DropdownMenuItem>
)}
<DropdownMenuItem
@@ -410,7 +413,7 @@ export function FolderCard({
}}
>
<Download className="mr-2 h-4 w-4" />
<span>Download</span>
<span>{m.download()}</span>
</DropdownMenuItem>
{canEdit && (
<>
@@ -423,7 +426,7 @@ export function FolderCard({
className="text-destructive"
>
<Trash2 className="mr-2 h-4 w-4" />
<span>Delete</span>
<span>{m.delete()}</span>
</DropdownMenuItem>
</>
)}
@@ -382,7 +382,8 @@ export function FileBrowserToolbar({
<MembersDialog
open={isMembersDialogOpen}
onOpenChange={handleOpenMembersDialog}
title="Project Members"
title={m.project_members()}
type="project"
members={members || []}
isOwner={me?.role === 'owner'}
onInvite={handleInvite}
@@ -15,6 +15,7 @@ import { ChatInput } from './chat/message-input'
import FieldRenderer from './field-renderer'
import { GuestIdentityPopup } from './guest-identity-popup'
import { ScrollArea } from './ui/scroll-area'
import { m } from '@/ui/paraglide/messages.js'
import { getViewerForFile } from '@/ui/components/viewers/registry'
interface FileViewerRightSidebarProps {
@@ -304,10 +305,8 @@ export function FileViewerRightSidebar({
return (
<div className="flex h-full items-center justify-center p-8 text-center bg-background">
<div className="space-y-2">
<p className="text-sm font-medium text-foreground">No item selected</p>
<p className="text-xs text-muted-foreground">
Select a file to view its details and comments.
</p>
<p className="text-sm font-medium text-foreground">{m.no_item_selected()}</p>
<p className="text-xs text-muted-foreground">{m.select_file_to_view_details()}</p>
</div>
</div>
)
@@ -338,10 +337,10 @@ export function FileViewerRightSidebar({
<Tabs defaultValue="comments" className="p-1 flex-1 flex flex-col px-2 min-h-0">
<TabsList className="w-full shrink-0">
<TabsTrigger value="comments" className="flex-1">
Comments
{m.comments()}
</TabsTrigger>
<TabsTrigger value="fields" className="flex-1">
Fields
{m.fields()}
</TabsTrigger>
</TabsList>
<TabsContent value="comments" className="flex-1 flex flex-col overflow-hidden min-h-0 mt-0">
@@ -7,6 +7,7 @@ import { Input } from '@/ui/components/ui/input'
import { Label } from '@/ui/components/ui/label'
import { client } from '@/ui/api/client'
import { Loader2 } from 'lucide-react'
import { m } from '@/ui/paraglide/messages.js'
interface GuestIdentityPopupProps {
isOpen: boolean
@@ -58,31 +59,29 @@ export function GuestIdentityPopup({
<PopoverContent className="w-80" align="end" side="top">
<form onSubmit={handleSubmit} className="space-y-4">
<div className="space-y-2">
<h4 className="font-medium leading-none">Enter your details</h4>
<p className="text-sm text-muted-foreground">
Please provide your name and email to add a comment.
</p>
<h4 className="font-medium leading-none">{m.enter_your_details()}</h4>
<p className="text-sm text-muted-foreground">{m.provide_name_email_for_comment()}</p>
</div>
<div className="grid gap-2">
<div className="grid gap-1">
<Label htmlFor="name">Name</Label>
<Label htmlFor="name">{m.name()}</Label>
<Input
id="name"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="John Doe"
placeholder={m.name_placeholder()}
size={32}
required
/>
</div>
<div className="grid gap-1">
<Label htmlFor="email">Email</Label>
<Label htmlFor="email">{m.email()}</Label>
<Input
id="email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="john@example.com"
placeholder={m.email_field_placeholder()}
required
/>
</div>
@@ -90,11 +89,11 @@ export function GuestIdentityPopup({
</div>
<div className="flex justify-end gap-2">
<Button type="button" variant="outline" size="sm" onClick={onClose}>
Cancel
{m.cancel()}
</Button>
<Button type="submit" size="sm" disabled={isLoading}>
{isLoading && <Loader2 className="mr-2 h-3 w-3 animate-spin" />}
Confirm
{m.confirm()}
</Button>
</div>
</form>
+52 -29
View File
@@ -22,6 +22,7 @@ import { Input } from '@/ui/components/ui/input'
import { ChevronDown, Copy, Loader2, Trash2 } from 'lucide-react'
import { useState } from 'react'
import { toast } from 'sonner'
import { m } from '@/ui/paraglide/messages.js'
export interface Member {
id?: string
@@ -43,6 +44,7 @@ interface MembersDialogProps {
currentUserId?: string
availableMembersToAdd?: Member[]
onAddMember?: (userId: string, role: 'editor' | 'reviewer') => Promise<void>
type?: 'project' | 'team'
}
export function MembersDialog({
@@ -57,6 +59,7 @@ export function MembersDialog({
currentUserId,
availableMembersToAdd,
onAddMember,
type = 'team',
}: MembersDialogProps) {
const [inviteRole, setInviteRole] = useState<'editor' | 'reviewer'>('editor')
const [inviteLink, setInviteLink] = useState<string | null>(null)
@@ -66,6 +69,20 @@ export function MembersDialog({
const [rolesToAdd, setRolesToAdd] = useState<Record<string, 'editor' | 'reviewer'>>({})
const [addingMemberId, setAddingMemberId] = useState<string | null>(null)
const localizeRole = (role?: string) => {
if (!role) return ''
switch (role.toLowerCase()) {
case 'owner':
return m.owner()
case 'editor':
return m.editor()
case 'reviewer':
return m.reviewer()
default:
return role
}
}
const setRoleToAdd = (memberId: string, role: 'editor' | 'reviewer') => {
setRolesToAdd((prev) => ({ ...prev, [memberId]: role }))
}
@@ -75,10 +92,10 @@ export function MembersDialog({
setUpdatingMemberId(memberId)
try {
await onUpdateRole(memberId, role)
toast.success('Member role updated')
toast.success(m.member_role_updated())
} catch (error) {
console.error(error)
toast.error('Failed to update member role')
toast.error(m.failed_to_update_member_role())
} finally {
setUpdatingMemberId(null)
}
@@ -89,11 +106,11 @@ export function MembersDialog({
setUpdatingMemberId(memberToRemove.id)
try {
await onRemoveMember(memberToRemove.id)
toast.success('Member removed')
toast.success(m.member_removed())
setMemberToRemove(null)
} catch (error) {
console.error(error)
toast.error('Failed to remove member')
toast.error(m.failed_to_remove_member())
} finally {
setUpdatingMemberId(null)
}
@@ -108,7 +125,7 @@ export function MembersDialog({
setInviteLink(url)
} catch (error) {
console.error(error)
toast.error('Failed to generate invite link')
toast.error(m.failed_to_generate_invite_link())
} finally {
setIsGenerating(false)
}
@@ -117,7 +134,7 @@ export function MembersDialog({
const copyToClipboard = () => {
if (inviteLink) {
navigator.clipboard.writeText(inviteLink)
toast.success('Invite link copied to clipboard')
toast.success(m.invite_link_copied())
}
}
@@ -169,13 +186,13 @@ export function MembersDialog({
<span className="text-sm font-medium">{member.name}</span>
<div className="flex items-center gap-2">
<span className="text-xs text-muted-foreground capitalize">
{member.role}
{localizeRole(member.role)}
</span>
{member.scope && (
<>
<span className="text-[10px] text-muted-foreground/70">•</span>
<span className="text-xs text-muted-foreground capitalize">
{member.scope === 'team' ? 'Team Member' : 'Project Member'}
{member.scope === 'team' ? m.team_member() : m.project_member()}
</span>
</>
)}
@@ -193,7 +210,7 @@ export function MembersDialog({
className="h-8 px-2 text-xs capitalize w-26"
disabled={updatingMemberId === member.id}
>
{member.role}
{localizeRole(member.role)}
<ChevronDown className="ml-1 h-3 w-3 opacity-50" />
</Button>
</DropdownMenuTrigger>
@@ -205,10 +222,10 @@ export function MembersDialog({
}
>
<DropdownMenuRadioItem value="editor" className="text-xs">
Editor
{m.editor()}
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="reviewer" className="text-xs">
Reviewer
{m.reviewer()}
</DropdownMenuRadioItem>
</DropdownMenuRadioGroup>
</DropdownMenuContent>
@@ -237,26 +254,28 @@ export function MembersDialog({
>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Remove Member</AlertDialogTitle>
<AlertDialogTitle>{m.remove_member()}</AlertDialogTitle>
<AlertDialogDescription>
Are you sure you want to remove <strong>{memberToRemove?.name}</strong> from this{' '}
{title.toLowerCase()}? This action cannot be undone.
{m.remove_member_confirmation({
name: memberToRemove?.name || '',
type: type === 'project' ? m.project() : m.team(),
})}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogCancel>{m.cancel()}</AlertDialogCancel>
<AlertDialogAction
onClick={handleRemoveMember}
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
>
Remove
{m.remove()}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>{' '}
{isOwner && onAddMember && availableMembersToAdd && availableMembersToAdd.length > 0 && (
<div className="border-t pt-4">
<h4 className="text-sm font-medium mb-3">Add Team Member to Project</h4>
<h4 className="text-sm font-medium mb-3">{m.add_team_member_to_project()}</h4>
<div className="max-h-[200px] overflow-y-auto space-y-2 pr-1">
{availableMembersToAdd.map((member) => {
const currentRole = rolesToAdd[member.id!] || 'editor'
@@ -279,7 +298,7 @@ export function MembersDialog({
<div className="flex flex-col">
<span className="text-sm font-medium">{member.name}</span>
<span className="text-xs text-muted-foreground capitalize">
{member.scope === 'team' ? 'Team Member' : 'Project Member'}
{member.scope === 'team' ? m.team_member() : m.project_member()}
</span>
</div>
</div>
@@ -293,7 +312,7 @@ export function MembersDialog({
className="h-8 px-2 text-xs capitalize w-26"
disabled={addingMemberId === member.id}
>
{currentRole}
{localizeRole(currentRole)}
<ChevronDown className="ml-1 h-3 w-3 opacity-50" />
</Button>
</DropdownMenuTrigger>
@@ -305,10 +324,10 @@ export function MembersDialog({
}
>
<DropdownMenuRadioItem value="editor" className="text-xs">
Editor
{m.editor()}
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="reviewer" className="text-xs">
Reviewer
{m.reviewer()}
</DropdownMenuRadioItem>
</DropdownMenuRadioGroup>
</DropdownMenuContent>
@@ -319,10 +338,12 @@ export function MembersDialog({
setAddingMemberId(member.id!)
try {
await onAddMember(member.id!, currentRole)
toast.success(`Added ${member.name} successfully`)
toast.success(
m.added_member_successfully({ name: member.name || '' }),
)
} catch (error) {
console.error(error)
toast.error(`Failed to add ${member.name}`)
toast.error(m.failed_to_add_member({ name: member.name || '' }))
} finally {
setAddingMemberId(null)
}
@@ -334,7 +355,7 @@ export function MembersDialog({
{addingMemberId === member.id ? (
<Loader2 className="h-3 w-3 animate-spin" />
) : (
'Add'
m.add()
)}
</Button>
</div>
@@ -346,13 +367,13 @@ export function MembersDialog({
)}
{isOwner && onInvite && (
<div className="border-t pt-4">
<h4 className="text-sm font-medium mb-3">Invite New Member</h4>
<h4 className="text-sm font-medium mb-3">{m.invite_new_member()}</h4>
<div className="space-y-3">
<div className="flex gap-2">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline" className="w-[120px] justify-between">
{inviteRole === 'editor' ? 'Editor' : 'Reviewer'}
{inviteRole === 'editor' ? m.editor() : m.reviewer()}
<ChevronDown className="h-4 w-4 opacity-50" />
</Button>
</DropdownMenuTrigger>
@@ -361,14 +382,16 @@ export function MembersDialog({
value={inviteRole}
onValueChange={(v) => setInviteRole(v as 'editor' | 'reviewer')}
>
<DropdownMenuRadioItem value="editor">Editor</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="reviewer">Reviewer</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="editor">{m.editor()}</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="reviewer">
{m.reviewer()}
</DropdownMenuRadioItem>
</DropdownMenuRadioGroup>
</DropdownMenuContent>
</DropdownMenu>
<Button onClick={handleGenerate} disabled={isGenerating} className="flex-1">
{isGenerating && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
Generate Link
{m.generate_link()}
</Button>
</div>
+60 -46
View File
@@ -2,78 +2,92 @@ import type { NotificationInfo } from '@shumai/dtos'
import { formatTimeAgo } from '@/ui/lib/time'
import { cn } from '@/ui/lib/utils'
import { SpriteScrubber } from './sprite-scrubber'
import { m } from '@/ui/paraglide/messages.js'
import React from 'react'
interface NotificationCardProps {
notification: NotificationInfo
}
const renderNotification = (
messageTemplate: string,
placeholders: Record<string, React.ReactNode>,
) => {
const regex = new RegExp(
`(${Object.keys(placeholders)
.map((k) => `\\{${k}\\}`)
.join('|')})`,
'g',
)
return (
<span>
{messageTemplate.split(regex).map((part, index) => {
const match = part.match(/^\{(.+)\}$/)
if (match && placeholders[match[1]]) {
return <React.Fragment key={index}>{placeholders[match[1]]}</React.Fragment>
}
return part
})}
</span>
)
}
export const NotificationCard = ({ notification }: NotificationCardProps) => {
const { creator, createdAt, isRead, type, asset, project, team, user } = notification
const message = (() => {
const creatorName = creator?.name || 'Unknown User'
const assetName = asset?.name || 'unknown asset'
const projectName = project?.name || 'unknown project'
const teamName = team?.name || 'unknown team'
const targetUserName = user?.name || 'unknown user'
const creatorName = creator?.name || m.unknown_user()
const assetName = asset?.name || m.unknown_asset()
const projectName = project?.name || m.unknown_project()
const teamName = team?.name || m.unknown_team()
const targetUserName = user?.name || m.unknown_user()
const placeholders = {
creator: <span className="font-semibold">{creatorName}</span>,
asset: <span className="font-semibold">{assetName}</span>,
project: <span className="font-semibold">{projectName}</span>,
team: <span className="font-semibold">{teamName}</span>,
user: <span className="font-semibold">{targetUserName}</span>,
}
switch (type) {
case 'comment_created':
return (
<span>
<span className="font-semibold">{creatorName}</span> commented on{' '}
<span className="font-semibold">{assetName}</span>
</span>
return renderNotification(
m.notification_commented_on({ creator: '{creator}', asset: '{asset}' }),
placeholders,
)
case 'reply_created':
return (
<span>
<span className="font-semibold">{creatorName}</span> replied to a comment on{' '}
<span className="font-semibold">{assetName}</span>
</span>
return renderNotification(
m.notification_replied_to({ creator: '{creator}', asset: '{asset}' }),
placeholders,
)
case 'mention':
return (
<span>
<span className="font-semibold">{creatorName}</span> mentioned you in{' '}
<span className="font-semibold">{assetName}</span>
</span>
return renderNotification(
m.notification_mentioned_you({ creator: '{creator}', asset: '{asset}' }),
placeholders,
)
case 'successful_file_uploaded':
return (
<span>
<span className="font-semibold">{creatorName}</span> uploaded{' '}
<span className="font-semibold">{assetName}</span> to{' '}
<span className="font-semibold">{projectName}</span>
</span>
return renderNotification(
m.notification_uploaded({ creator: '{creator}', asset: '{asset}', project: '{project}' }),
placeholders,
)
case 'metadata_field_updated_status':
return (
<span>
<span className="font-semibold">{creatorName}</span> updated status of{' '}
<span className="font-semibold">{assetName}</span>
</span>
return renderNotification(
m.notification_status_updated({ creator: '{creator}', asset: '{asset}' }),
placeholders,
)
case 'new_user_join_team':
return (
<span>
<span className="font-semibold">{targetUserName}</span> joined{' '}
<span className="font-semibold">{teamName}</span>
</span>
return renderNotification(
m.notification_joined_team({ user: '{user}', team: '{team}' }),
placeholders,
)
case 'new_user_join_project':
return (
<span>
<span className="font-semibold">{targetUserName}</span> joined{' '}
<span className="font-semibold">{projectName}</span>
</span>
return renderNotification(
m.notification_joined_project({ user: '{user}', project: '{project}' }),
placeholders,
)
default:
return (
<span>
New notification from <span className="font-semibold">{creatorName}</span>
</span>
)
return renderNotification(m.notification_generic({ creator: '{creator}' }), placeholders)
}
})()
@@ -3,6 +3,7 @@ import { NotificationCard } from '@/ui/components/notification-card'
import { Button } from '@/ui/components/ui/button'
import { Tabs, TabsList, TabsTrigger } from '@/ui/components/ui/tabs'
import { useTeamContextStore } from '@/ui/stores/team-context'
import { m } from '@/ui/paraglide/messages.js'
import { useInfiniteQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { CheckCheckIcon, Loader2 } from 'lucide-react'
import { useEffect, useMemo, useState } from 'react'
@@ -126,10 +127,10 @@ export const NotificationList = () => {
<div className="flex items-center justify-between mb-2">
<TabsList className="h-8">
<TabsTrigger value="all" className="text-xs px-3 h-6">
All
{m.all()}
</TabsTrigger>
<TabsTrigger value="unread" className="text-xs px-3 h-6">
Unread
{m.unread()}
</TabsTrigger>
</TabsList>
@@ -139,7 +140,7 @@ export const NotificationList = () => {
className="h-8 px-2 text-muted-foreground hover:text-foreground"
onClick={handleMarkAllRead}
disabled={notifications.length === 0 || markReadMutation.isPending}
title="Mark all as read"
title={m.mark_all_as_read()}
>
<CheckCheckIcon className="w-4 h-4" />
</Button>
@@ -156,7 +157,7 @@ export const NotificationList = () => {
{!isLoading && notifications.length === 0 && (
<div className="flex flex-col items-center justify-center h-40 text-muted-foreground">
<p className="text-sm">No notifications</p>
<p className="text-sm">{m.no_notifications()}</p>
</div>
)}
+16 -15
View File
@@ -9,19 +9,20 @@ import { useInView } from 'react-intersection-observer'
import { format, parseISO, isToday, isYesterday } from 'date-fns'
import { Progress } from '@/ui/components/ui/progress'
import { formatTimeAgo } from '@/ui/lib/time'
import { m } from '@/ui/paraglide/messages.js'
function formatDayHeader(dateString: string): string {
const date = parseISO(dateString)
if (isNaN(date.getTime())) {
return 'Unknown Date'
return m.unknown_date()
}
if (isToday(date)) {
return 'Today'
return m.today()
}
if (isYesterday(date)) {
return 'Yesterday'
return m.yesterday()
}
return format(date, 'MMMM d, yyyy')
return format(date, m.date_format_long())
}
function formatBytes(bytes: number): string {
@@ -51,7 +52,7 @@ function UploadTaskItem({ task }: { task: TaskInfo }) {
try {
formattedTime = formatTimeAgo(task.createdAt)
} catch {
formattedTime = 'unknown'
formattedTime = m.unknown()
}
return (
@@ -63,19 +64,19 @@ function UploadTaskItem({ task }: { task: TaskInfo }) {
className="text-sm font-semibold tracking-tight text-sidebar-foreground truncate block"
title={task.name}
>
{task.name || 'Untitled Upload'}
{task.name || m.untitled_upload()}
</span>
</div>
<div className="flex-shrink-0">
{isCompleted ? (
<span className="inline-flex items-center gap-1 text-xs font-semibold text-muted-foreground bg-muted px-2 py-0.5 rounded-full transition-colors">
<CheckCircle2 className="w-3.5 h-3.5" />
Done
{m.done()}
</span>
) : (
<span className="inline-flex items-center gap-1 text-xs font-semibold text-sidebar-primary bg-sidebar-primary/10 px-2 py-0.5 rounded-full animate-pulse">
<Loader2 className="w-3.5 h-3.5 animate-spin" />
Uploading
{m.uploading_status()}
</span>
)}
</div>
@@ -92,8 +93,8 @@ function UploadTaskItem({ task }: { task: TaskInfo }) {
<div className="flex items-center justify-between text-xs font-semibold">
<span className="text-muted-foreground/80">
{clientProgress
? `${formatBytes(clientProgress.loaded)} / ${formatBytes(clientProgress.total)} (${task.uploaded} / ${task.total} ${task.total === 1 ? 'file' : 'files'})`
: `${task.uploaded} / ${task.total} ${task.total === 1 ? 'file' : 'files'}`}
? `${formatBytes(clientProgress.loaded)} / ${formatBytes(clientProgress.total)} (${m.files_progress({ uploaded: task.uploaded, total: task.total })})`
: m.files_progress({ uploaded: task.uploaded, total: task.total })}
</span>
{!isCompleted && (
<span className="text-sidebar-primary font-mono font-bold">{Math.round(percent)}%</span>
@@ -181,10 +182,8 @@ export function UploadTasks() {
return (
<div className="flex flex-col items-center justify-center p-8 text-center border border-dashed border-border rounded-xl bg-muted/10 my-4">
<UploadCloud className="h-8 w-8 text-muted-foreground/50 mb-3" />
<p className="text-sm font-semibold text-muted-foreground">No uploads yet</p>
<p className="text-xs text-muted-foreground/60 mt-1 max-w-[180px]">
Upload files in the project view to track progress here.
</p>
<p className="text-sm font-semibold text-muted-foreground">{m.no_uploads_yet()}</p>
<p className="text-xs text-muted-foreground/60 mt-1 max-w-[180px]">{m.no_uploads_hint()}</p>
</div>
)
}
@@ -211,7 +210,9 @@ export function UploadTasks() {
{group.day}
</span>
<span className="text-[10px] font-semibold text-muted-foreground/60 bg-muted px-2 py-0.5 rounded-full">
{group.tasks.length} {group.tasks.length === 1 ? 'task' : 'tasks'}
{group.tasks.length === 1
? m.n_tasks_singular({ count: group.tasks.length })
: m.n_tasks_plural({ count: group.tasks.length })}
</span>
</div>
{/* Tasks in Day */}
+17 -1
View File
@@ -44,6 +44,20 @@ export function UserMenu() {
const { clearAuth } = useAuthStore()
const teamId = useTeamId()
const localizeRole = (role?: string) => {
if (!role) return ''
switch (role.toLowerCase()) {
case 'owner':
return m.owner()
case 'editor':
return m.editor()
case 'reviewer':
return m.reviewer()
default:
return role
}
}
const { data: me } = useQuery({
queryKey: ['teams', teamId, 'me'],
queryFn: async () => {
@@ -95,7 +109,9 @@ export function UserMenu() {
<DropdownMenuLabel className="font-normal">
<div className="flex flex-col space-y-1">
<p className="text-sm font-medium leading-none">{me.name}</p>
<p className="text-xs leading-none text-muted-foreground">{me.role}</p>
<p className="text-xs leading-none text-muted-foreground">
{localizeRole(me.role)}
</p>
</div>
</DropdownMenuLabel>
<DropdownMenuSeparator />
@@ -1,4 +1,5 @@
import { Check, Copy, Download, Maximize, Minimize, Minus, Plus } from 'lucide-react'
import { m } from '@/ui/paraglide/messages.js'
export interface ImageControlBarProps {
zoom: number
@@ -32,7 +33,7 @@ export function ImageControlBar({
<button
onClick={onZoomOut}
className="p-1.5 rounded hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 transition-colors"
title="Zoom Out"
title={m.zoom_out()}
>
<Minus size={16} />
</button>
@@ -42,7 +43,7 @@ export function ImageControlBar({
<button
onClick={onZoomIn}
className="p-1.5 rounded hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 transition-colors"
title="Zoom In"
title={m.zoom_in()}
>
<Plus size={16} />
</button>
@@ -51,33 +52,33 @@ export function ImageControlBar({
onClick={onFit}
className="text-xs font-medium px-3 py-1.5 rounded bg-gray-200/50 dark:bg-white/10 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 transition-colors border border-transparent animate-in fade-in zoom-in-95 duration-200"
>
Fit
{m.fit()}
</button>
{onCopy && (
<button
onClick={onCopy}
disabled={!canCopy}
className="flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded bg-gray-200/50 dark:bg-white/10 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 transition-colors border border-transparent disabled:opacity-50 animate-in fade-in zoom-in-95 duration-200"
title="Copy optimized image to clipboard"
title={m.copy_image_to_clipboard()}
>
{copied ? <Check size={14} className="text-green-500" /> : <Copy size={14} />}
{copied ? 'Copied' : 'Copy'}
{copied ? m.copied() : m.copy()}
</button>
)}
<button
onClick={onDownload}
disabled={!canDownload}
className="flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded bg-gray-200/50 dark:bg-white/10 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 transition-colors border border-transparent disabled:opacity-50 animate-in fade-in zoom-in-95 duration-200"
title="Download original image"
title={m.download_original_image()}
>
<Download size={14} />
Download
{m.download()}
</button>
{fullscreen && (
<button
onClick={fullscreen.onToggle}
className="p-1.5 rounded hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-200 transition-colors"
title="Fullscreen"
title={m.fullscreen()}
>
{fullscreen.isFullScreen ? <Minimize size={16} /> : <Maximize size={16} />}
</button>
@@ -1,4 +1,5 @@
import { cn } from '@/ui/lib/utils'
import { m } from '@/ui/paraglide/messages.js'
import { useUiStore } from '@/ui/stores/ui'
import type { AssetInfo, VideoTranscode } from '@shumai/dtos'
import {
@@ -260,6 +261,7 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
<button
onClick={() => onZoomChange(zoom * 0.8)}
className="p-1 hover:text-primary rounded"
title={m.zoom_out()}
>
<Minus size={14} />
</button>
@@ -269,6 +271,7 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
<button
onClick={() => onZoomChange(zoom * 1.2)}
className="p-1 hover:text-primary rounded"
title={m.zoom_in()}
>
<Plus size={14} />
</button>
@@ -277,7 +280,7 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
onClick={onZoomReset}
className="text-xs font-medium px-2 py-1 rounded bg-muted hover:text-primary transition-colors"
>
Fit
{m.fit()}
</button>
</div>
)}
@@ -313,12 +316,16 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
<DropdownMenuTrigger asChild>
<button className="flex items-center gap-1 rounded border border-border px-2 py-0.5 text-sm font-semibold hover:bg-muted transition-colors">
<Settings className="h-3.5 w-3.5" />
<span>{state.currentResolution}</span>
<span>
{state.currentResolution === 'Original'
? m.original()
: state.currentResolution}
</span>
</button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuLabel>Quality</DropdownMenuLabel>
<DropdownMenuLabel>{m.quality()}</DropdownMenuLabel>
{previewResolutions.map((res) => (
<DropdownMenuItem
key={res.resolution}
@@ -330,7 +337,7 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
: 'text-foreground',
)}
>
<span>{res.resolution}</span>
<span>{res.resolution === 'Original' ? m.original() : res.resolution}</span>
<span className="pl-5 text-xs text-muted-foreground">
{res.width}x{res.height}
</span>
@@ -345,7 +352,7 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
<button
onClick={() => handleDownload(data.media?.original?.key || '')}
className="transition-colors hover:text-primary"
title="Download"
title={m.download()}
disabled={!data.media?.original?.key}
>
<Download className="h-5 w-5" />
@@ -353,19 +360,19 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
) : (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<button className="transition-colors hover:text-primary" title="Download">
<button className="transition-colors hover:text-primary" title={m.download()}>
<Download className="h-5 w-5" />
</button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuLabel>Download</DropdownMenuLabel>
<DropdownMenuLabel>{m.download()}</DropdownMenuLabel>
{resolutions.map((res) => (
<DropdownMenuItem
key={res.resolution}
onClick={() => handleDownload(res.key ?? '')}
className="flex w-full items-center justify-between px-3 py-2 text-left text-sm text-foreground"
>
<span>{res.resolution}</span>
<span>{res.resolution === 'Original' ? m.original() : res.resolution}</span>
<span className="text-xs text-muted-foreground">
{res.isRaw ? data.name?.split('.').pop()?.toUpperCase() || 'RAW' : 'MP4'}
</span>
@@ -376,7 +383,11 @@ export const VideoControlBar: React.FC<ControlBarProps> = ({
)}
{/* Fullscreen */}
<button onClick={toggleFullScreen} className="transition-colors hover:text-primary">
<button
onClick={toggleFullScreen}
className="transition-colors hover:text-primary"
title={m.fullscreen()}
>
{state.isFullScreen ? (
<Minimize className="h-6 w-6" />
) : (
+9 -6
View File
@@ -1,4 +1,5 @@
import { differenceInDays, format, isToday, isYesterday, parseISO } from 'date-fns'
import { m } from '@/ui/paraglide/messages.js'
export const formatTimeAgo = (dateString: string) => {
const date = parseISO(dateString)
@@ -11,14 +12,15 @@ export const formatTimeAgo = (dateString: string) => {
const time = format(date, 'HH:mm')
if (isToday(date)) {
return `Today ${time}`
return m.today_with_time({ time })
}
if (isYesterday(date)) {
return `Yesterday ${time}`
return m.yesterday_with_time({ time })
}
const daysAgo = differenceInDays(now, date)
return `${daysAgo >= 0 ? daysAgo : 0} days ago`
const count = daysAgo >= 0 ? daysAgo : 0
return count === 1 ? m.n_days_ago_singular({ count }) : m.n_days_ago_plural({ count })
}
export const formatDateAgo = (dateString: string) => {
@@ -30,12 +32,13 @@ export const formatDateAgo = (dateString: string) => {
}
if (isToday(date)) {
return 'Today'
return m.today()
}
if (isYesterday(date)) {
return 'Yesterday'
return m.yesterday()
}
const daysAgo = differenceInDays(now, date)
return `${daysAgo >= 0 ? daysAgo : 0} days ago`
const count = daysAgo >= 0 ? daysAgo : 0
return count === 1 ? m.n_days_ago_singular({ count }) : m.n_days_ago_plural({ count })
}
+20 -1
View File
@@ -798,5 +798,24 @@
"failed_fetch_files": "Failed to fetch files",
"failed_remove": "Failed to remove",
"failed_update": "Failed to update",
"failed_fetch_fields": "Failed to fetch fields"
"failed_fetch_fields": "Failed to fetch fields",
"project": "project",
"team": "team",
"owner": "Owner",
"n_files_singular": "{count} file",
"n_files_plural": "{count} files",
"files_progress": "{uploaded} / {total} files",
"n_tasks_singular": "{count} task",
"n_tasks_plural": "{count} tasks",
"n_days_ago_singular": "{count} day ago",
"n_days_ago_plural": "{count} days ago",
"today_with_time": "Today {time}",
"yesterday_with_time": "Yesterday {time}",
"n_items_singular": "{count} Item",
"n_items_plural": "{count} Items",
"fullscreen": "Fullscreen",
"created_by_at": "{time} by {author}",
"date_format_long": "MMMM d, yyyy",
"tool_result_with_name": "Tool Result: {name}",
"reply_to_message": "reply to: {message}"
}
+20 -1
View File
@@ -798,5 +798,24 @@
"failed_fetch_files": "获取文件失败",
"failed_remove": "移除失败",
"failed_update": "更新失败",
"failed_fetch_fields": "获取字段列表失败"
"failed_fetch_fields": "获取字段列表失败",
"project": "项目",
"team": "团队",
"owner": "所有者",
"n_files_singular": "{count} 个文件",
"n_files_plural": "{count} 个文件",
"files_progress": "{uploaded} / {total} 个文件",
"n_tasks_singular": "{count} 个任务",
"n_tasks_plural": "{count} 个任务",
"n_days_ago_singular": "{count} 天前",
"n_days_ago_plural": "{count} 天前",
"today_with_time": "今天 {time}",
"yesterday_with_time": "昨天 {time}",
"n_items_singular": "{count} 个项目",
"n_items_plural": "{count} 个项目",
"fullscreen": "全屏",
"created_by_at": "{time} 由 {author} 创建",
"date_format_long": "yyyy年M月d日",
"tool_result_with_name": "工具结果:{name}",
"reply_to_message": "回复:{message}"
}
+19
View File
@@ -746,4 +746,23 @@ export * from "./failed_fetch_files.js";
export * from "./failed_remove.js";
export * from "./failed_update.js";
export * from "./failed_fetch_fields.js";
export * from "./project.js";
export * from "./team.js";
export * from "./owner.js";
export * from "./n_files_singular.js";
export * from "./n_files_plural.js";
export * from "./files_progress.js";
export * from "./n_tasks_singular.js";
export * from "./n_tasks_plural.js";
export * from "./n_days_ago_singular.js";
export * from "./n_days_ago_plural.js";
export * from "./today_with_time.js";
export * from "./yesterday_with_time.js";
export * from "./n_items_singular.js";
export * from "./n_items_plural.js";
export * from "./fullscreen.js";
export * from "./created_by_at.js";
export * from "./date_format_long.js";
export * from "./tool_result_with_name.js";
export * from "./reply_to_message.js";
export type LocalizedString = import("../runtime.js").LocalizedString;
+20 -1
View File
@@ -747,4 +747,23 @@ export * from './failed_fetch_folders.js'
export * from './failed_fetch_files.js'
export * from './failed_remove.js'
export * from './failed_update.js'
export * from './failed_fetch_fields.js'
export * from './failed_fetch_fields.js'
export * from './project.js'
export * from './team.js'
export * from './owner.js'
export * from './n_files_singular.js'
export * from './n_files_plural.js'
export * from './files_progress.js'
export * from './n_tasks_singular.js'
export * from './n_tasks_plural.js'
export * from './n_days_ago_singular.js'
export * from './n_days_ago_plural.js'
export * from './today_with_time.js'
export * from './yesterday_with_time.js'
export * from './n_items_singular.js'
export * from './n_items_plural.js'
export * from './fullscreen.js'
export * from './created_by_at.js'
export * from './date_format_long.js'
export * from './tool_result_with_name.js'
export * from './reply_to_message.js'
+19
View File
@@ -0,0 +1,19 @@
/**
* | output |
* | --- |
* | "{time} by {author}" |
*
* @param {Created_By_AtInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const created_by_at: ((inputs: Created_By_AtInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Created_By_AtInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Created_By_AtInputs = {
time: NonNullable<unknown>;
author: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ time: NonNullable<unknown>, author: NonNullable<unknown> }} Created_By_AtInputs */
const en_created_by_at = /** @type {(inputs: Created_By_AtInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.time} by ${i?.author}`)
};
const zh_created_by_at = /** @type {(inputs: Created_By_AtInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.time} 由 ${i?.author} 创建`)
};
/**
* | output |
* | --- |
* | "{time} by {author}" |
*
* @param {Created_By_AtInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const created_by_at = /** @type {((inputs: Created_By_AtInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Created_By_AtInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_created_by_at(inputs)
return zh_created_by_at(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "MMMM d, yyyy" |
*
* @param {Date_Format_LongInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const date_format_long: ((inputs?: Date_Format_LongInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Date_Format_LongInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Date_Format_LongInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Date_Format_LongInputs */
const en_date_format_long = /** @type {(inputs: Date_Format_LongInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MMMM d, yyyy`)
};
const zh_date_format_long = /** @type {(inputs: Date_Format_LongInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`yyyy年M月d日`)
};
/**
* | output |
* | --- |
* | "MMMM d, yyyy" |
*
* @param {Date_Format_LongInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const date_format_long = /** @type {((inputs?: Date_Format_LongInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Date_Format_LongInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_date_format_long(inputs)
return zh_date_format_long(inputs)
});
+19
View File
@@ -0,0 +1,19 @@
/**
* | output |
* | --- |
* | "{uploaded} / {total} files" |
*
* @param {Files_ProgressInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const files_progress: ((inputs: Files_ProgressInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Files_ProgressInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Files_ProgressInputs = {
uploaded: NonNullable<unknown>;
total: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ uploaded: NonNullable<unknown>, total: NonNullable<unknown> }} Files_ProgressInputs */
const en_files_progress = /** @type {(inputs: Files_ProgressInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.uploaded} / ${i?.total} files`)
};
const zh_files_progress = /** @type {(inputs: Files_ProgressInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.uploaded} / ${i?.total} 个文件`)
};
/**
* | output |
* | --- |
* | "{uploaded} / {total} files" |
*
* @param {Files_ProgressInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const files_progress = /** @type {((inputs: Files_ProgressInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Files_ProgressInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_files_progress(inputs)
return zh_files_progress(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Fullscreen" |
*
* @param {FullscreenInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const fullscreen: ((inputs?: FullscreenInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<FullscreenInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type FullscreenInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} FullscreenInputs */
const en_fullscreen = /** @type {(inputs: FullscreenInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Fullscreen`)
};
const zh_fullscreen = /** @type {(inputs: FullscreenInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`全屏`)
};
/**
* | output |
* | --- |
* | "Fullscreen" |
*
* @param {FullscreenInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const fullscreen = /** @type {((inputs?: FullscreenInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<FullscreenInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_fullscreen(inputs)
return zh_fullscreen(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} days ago" |
*
* @param {N_Days_Ago_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_days_ago_plural: ((inputs: N_Days_Ago_PluralInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Days_Ago_PluralInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Days_Ago_PluralInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Days_Ago_PluralInputs */
const en_n_days_ago_plural = /** @type {(inputs: N_Days_Ago_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} days ago`)
};
const zh_n_days_ago_plural = /** @type {(inputs: N_Days_Ago_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 天前`)
};
/**
* | output |
* | --- |
* | "{count} days ago" |
*
* @param {N_Days_Ago_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_days_ago_plural = /** @type {((inputs: N_Days_Ago_PluralInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Days_Ago_PluralInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_days_ago_plural(inputs)
return zh_n_days_ago_plural(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} day ago" |
*
* @param {N_Days_Ago_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_days_ago_singular: ((inputs: N_Days_Ago_SingularInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Days_Ago_SingularInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Days_Ago_SingularInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Days_Ago_SingularInputs */
const en_n_days_ago_singular = /** @type {(inputs: N_Days_Ago_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} day ago`)
};
const zh_n_days_ago_singular = /** @type {(inputs: N_Days_Ago_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 天前`)
};
/**
* | output |
* | --- |
* | "{count} day ago" |
*
* @param {N_Days_Ago_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_days_ago_singular = /** @type {((inputs: N_Days_Ago_SingularInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Days_Ago_SingularInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_days_ago_singular(inputs)
return zh_n_days_ago_singular(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} files" |
*
* @param {N_Files_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_files_plural: ((inputs: N_Files_PluralInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Files_PluralInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Files_PluralInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Files_PluralInputs */
const en_n_files_plural = /** @type {(inputs: N_Files_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} files`)
};
const zh_n_files_plural = /** @type {(inputs: N_Files_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个文件`)
};
/**
* | output |
* | --- |
* | "{count} files" |
*
* @param {N_Files_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_files_plural = /** @type {((inputs: N_Files_PluralInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Files_PluralInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_files_plural(inputs)
return zh_n_files_plural(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} file" |
*
* @param {N_Files_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_files_singular: ((inputs: N_Files_SingularInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Files_SingularInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Files_SingularInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Files_SingularInputs */
const en_n_files_singular = /** @type {(inputs: N_Files_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} file`)
};
const zh_n_files_singular = /** @type {(inputs: N_Files_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个文件`)
};
/**
* | output |
* | --- |
* | "{count} file" |
*
* @param {N_Files_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_files_singular = /** @type {((inputs: N_Files_SingularInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Files_SingularInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_files_singular(inputs)
return zh_n_files_singular(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} Items" |
*
* @param {N_Items_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_items_plural: ((inputs: N_Items_PluralInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Items_PluralInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Items_PluralInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Items_PluralInputs */
const en_n_items_plural = /** @type {(inputs: N_Items_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} Items`)
};
const zh_n_items_plural = /** @type {(inputs: N_Items_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个项目`)
};
/**
* | output |
* | --- |
* | "{count} Items" |
*
* @param {N_Items_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_items_plural = /** @type {((inputs: N_Items_PluralInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Items_PluralInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_items_plural(inputs)
return zh_n_items_plural(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} Item" |
*
* @param {N_Items_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_items_singular: ((inputs: N_Items_SingularInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Items_SingularInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Items_SingularInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Items_SingularInputs */
const en_n_items_singular = /** @type {(inputs: N_Items_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} Item`)
};
const zh_n_items_singular = /** @type {(inputs: N_Items_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个项目`)
};
/**
* | output |
* | --- |
* | "{count} Item" |
*
* @param {N_Items_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_items_singular = /** @type {((inputs: N_Items_SingularInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Items_SingularInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_items_singular(inputs)
return zh_n_items_singular(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} tasks" |
*
* @param {N_Tasks_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_tasks_plural: ((inputs: N_Tasks_PluralInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Tasks_PluralInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Tasks_PluralInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Tasks_PluralInputs */
const en_n_tasks_plural = /** @type {(inputs: N_Tasks_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} tasks`)
};
const zh_n_tasks_plural = /** @type {(inputs: N_Tasks_PluralInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个任务`)
};
/**
* | output |
* | --- |
* | "{count} tasks" |
*
* @param {N_Tasks_PluralInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_tasks_plural = /** @type {((inputs: N_Tasks_PluralInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Tasks_PluralInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_tasks_plural(inputs)
return zh_n_tasks_plural(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} task" |
*
* @param {N_Tasks_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_tasks_singular: ((inputs: N_Tasks_SingularInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<N_Tasks_SingularInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type N_Tasks_SingularInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} N_Tasks_SingularInputs */
const en_n_tasks_singular = /** @type {(inputs: N_Tasks_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} task`)
};
const zh_n_tasks_singular = /** @type {(inputs: N_Tasks_SingularInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个任务`)
};
/**
* | output |
* | --- |
* | "{count} task" |
*
* @param {N_Tasks_SingularInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const n_tasks_singular = /** @type {((inputs: N_Tasks_SingularInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<N_Tasks_SingularInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_n_tasks_singular(inputs)
return zh_n_tasks_singular(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Owner" |
*
* @param {OwnerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const owner: ((inputs?: OwnerInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<OwnerInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type OwnerInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} OwnerInputs */
const en_owner = /** @type {(inputs: OwnerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Owner`)
};
const zh_owner = /** @type {(inputs: OwnerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`所有者`)
};
/**
* | output |
* | --- |
* | "Owner" |
*
* @param {OwnerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const owner = /** @type {((inputs?: OwnerInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<OwnerInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_owner(inputs)
return zh_owner(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "project" |
*
* @param {ProjectInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const project: ((inputs?: ProjectInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<ProjectInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type ProjectInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} ProjectInputs */
const en_project = /** @type {(inputs: ProjectInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`project`)
};
const zh_project = /** @type {(inputs: ProjectInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`项目`)
};
/**
* | output |
* | --- |
* | "project" |
*
* @param {ProjectInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const project = /** @type {((inputs?: ProjectInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<ProjectInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_project(inputs)
return zh_project(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "reply to: {message}" |
*
* @param {Reply_To_MessageInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const reply_to_message: ((inputs: Reply_To_MessageInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Reply_To_MessageInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Reply_To_MessageInputs = {
message: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ message: NonNullable<unknown> }} Reply_To_MessageInputs */
const en_reply_to_message = /** @type {(inputs: Reply_To_MessageInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`reply to: ${i?.message}`)
};
const zh_reply_to_message = /** @type {(inputs: Reply_To_MessageInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`回复:${i?.message}`)
};
/**
* | output |
* | --- |
* | "reply to: {message}" |
*
* @param {Reply_To_MessageInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const reply_to_message = /** @type {((inputs: Reply_To_MessageInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Reply_To_MessageInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_reply_to_message(inputs)
return zh_reply_to_message(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "team" |
*
* @param {TeamInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const team: ((inputs?: TeamInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<TeamInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type TeamInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} TeamInputs */
const en_team = /** @type {(inputs: TeamInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`team`)
};
const zh_team = /** @type {(inputs: TeamInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`团队`)
};
/**
* | output |
* | --- |
* | "team" |
*
* @param {TeamInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const team = /** @type {((inputs?: TeamInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<TeamInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_team(inputs)
return zh_team(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "Today {time}" |
*
* @param {Today_With_TimeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const today_with_time: ((inputs: Today_With_TimeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Today_With_TimeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Today_With_TimeInputs = {
time: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ time: NonNullable<unknown> }} Today_With_TimeInputs */
const en_today_with_time = /** @type {(inputs: Today_With_TimeInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Today ${i?.time}`)
};
const zh_today_with_time = /** @type {(inputs: Today_With_TimeInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`今天 ${i?.time}`)
};
/**
* | output |
* | --- |
* | "Today {time}" |
*
* @param {Today_With_TimeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const today_with_time = /** @type {((inputs: Today_With_TimeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Today_With_TimeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_today_with_time(inputs)
return zh_today_with_time(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "Tool Result: {name}" |
*
* @param {Tool_Result_With_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const tool_result_with_name: ((inputs: Tool_Result_With_NameInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Tool_Result_With_NameInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Tool_Result_With_NameInputs = {
name: NonNullable<unknown>;
};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ name: NonNullable<unknown> }} Tool_Result_With_NameInputs */
const en_tool_result_with_name = /** @type {(inputs: Tool_Result_With_NameInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Tool Result: ${i?.name}`)
};
const zh_tool_result_with_name = /** @type {(inputs: Tool_Result_With_NameInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`工具结果:${i?.name}`)
};
/**
* | output |
* | --- |
* | "Tool Result: {name}" |
*
* @param {Tool_Result_With_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const tool_result_with_name = /** @type {((inputs: Tool_Result_With_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Tool_Result_With_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_tool_result_with_name(inputs)
return zh_tool_result_with_name(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "Yesterday {time}" |
*
* @param {Yesterday_With_TimeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const yesterday_with_time: ((inputs: Yesterday_With_TimeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Yesterday_With_TimeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Yesterday_With_TimeInputs = {
time: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ time: NonNullable<unknown> }} Yesterday_With_TimeInputs */
const en_yesterday_with_time = /** @type {(inputs: Yesterday_With_TimeInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`Yesterday ${i?.time}`)
};
const zh_yesterday_with_time = /** @type {(inputs: Yesterday_With_TimeInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`昨天 ${i?.time}`)
};
/**
* | output |
* | --- |
* | "Yesterday {time}" |
*
* @param {Yesterday_With_TimeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const yesterday_with_time = /** @type {((inputs: Yesterday_With_TimeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Yesterday_With_TimeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_yesterday_with_time(inputs)
return zh_yesterday_with_time(inputs)
});
@@ -476,6 +476,7 @@ function TeamPage() {
open={isMembersDialogOpen}
onOpenChange={setIsMembersDialogOpen}
title={m.team_members()}
type="team"
members={safeMembers}
isOwner={me?.role === 'owner'}
onInvite={handleInvite}