diff --git a/excalidraw-app/components/MyCreationsTab.tsx b/excalidraw-app/components/MyCreationsTab.tsx index 678698fcbee1..3a1aa39b8b0e 100644 --- a/excalidraw-app/components/MyCreationsTab.tsx +++ b/excalidraw-app/components/MyCreationsTab.tsx @@ -82,7 +82,7 @@ export const MyCreationsTab: React.FC = ({ /> ) : (
- 空空如也 + No preview
)}
diff --git a/excalidraw-app/hooks/useCanvasManagement.ts b/excalidraw-app/hooks/useCanvasManagement.ts index 870cdb7e4e1e..e3dc78e45bd7 100644 --- a/excalidraw-app/hooks/useCanvasManagement.ts +++ b/excalidraw-app/hooks/useCanvasManagement.ts @@ -98,7 +98,7 @@ export const useCanvasManagement = ({ await refreshCanvases(); } catch (error: any) { if (error instanceof AuthError) { - setErrorMessage("您需要登录才能删除此画布。"); + setErrorMessage("You need to be logged in to delete this canvas."); } else { setErrorMessage("Could not delete the canvas."); } @@ -137,7 +137,7 @@ export const useCanvasManagement = ({ setCurrentCanvasId(createdCanvas.id); } catch (error: any) { if (error instanceof AuthError) { - setErrorMessage("您需要登录才能创建新画布。"); + setErrorMessage("You need to be logged in to create a new canvas."); } else { setErrorMessage("Could not create new canvas."); } @@ -162,7 +162,7 @@ export const useCanvasManagement = ({ } } catch (error: any) { if (error instanceof AuthError) { - setErrorMessage("您需要登录才能重命名此画布。"); + setErrorMessage("You need to be logged in to rename this canvas."); } else { setErrorMessage("Could not rename the canvas."); } @@ -200,7 +200,7 @@ export const useCanvasManagement = ({ setCurrentCanvasId(createdCanvas.id); } catch (error: any) { if (error instanceof AuthError) { - setErrorMessage("您需要登录才能另存为新画布。"); + setErrorMessage("You need to be logged in to save as a new canvas."); } else { setErrorMessage("Could not save as new canvas."); } diff --git a/excalidraw-app/utils/time.ts b/excalidraw-app/utils/time.ts index 6abbaa279a02..9afbd1cb4a8c 100644 --- a/excalidraw-app/utils/time.ts +++ b/excalidraw-app/utils/time.ts @@ -4,25 +4,25 @@ export const timeAgo = (date: string | number | Date): string => { const diffInSeconds = Math.floor((now.getTime() - past.getTime()) / 1000); if (diffInSeconds < 10) { - return "刚刚"; + return "just now"; } if (diffInSeconds < 60) { - return `${diffInSeconds} 秒前`; + return `${diffInSeconds} seconds ago`; } const diffInMinutes = Math.floor(diffInSeconds / 60); if (diffInMinutes < 60) { - return `${diffInMinutes} 分钟前`; + return `${diffInMinutes} minute${diffInMinutes === 1 ? "" : "s"} ago`; } const diffInHours = Math.floor(diffInMinutes / 60); if (diffInHours < 24) { - return `${diffInHours} 小时前`; + return `${diffInHours} hour${diffInHours === 1 ? "" : "s"} ago`; } const diffInDays = Math.floor(diffInHours / 24); if (diffInDays < 7) { - return `${diffInDays} 天前`; + return `${diffInDays} day${diffInDays === 1 ? "" : "s"} ago`; } return new Date(date).toLocaleDateString();