Skip to content

Commit ff9703d

Browse files
committed
fix: translate to english
1 parent db4c131 commit ff9703d

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

src/components/LatestRelease.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ type Props = {
1010
export const LatestRelease: React.FC<Props> = ({ owner, repo, className }) => {
1111
const { release, error, loading } = useLatestRelease(owner, repo);
1212

13-
if (error) return <div>Erro: {error}</div>;
14-
if (loading || !release) return <div>Carregando...</div>;
13+
if (error) return <div>Error: {error}</div>;
14+
if (loading || !release) return <div>Loading...</div>;
1515

1616
return <div className={className}>({release.tag})</div>;
1717
};

src/components/Sidebar.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useFile } from "../context/FileContext";
33
import { FolderComponent } from "./Folder";
44
import { ThemeToggle } from "./ThemeToggle";
55
import { useLayoutEffect, useState } from "react";
6-
import { Search, Plus, X, Github, ChevronLeft, ChevronRight, ListCollapse } from "lucide-react";
6+
import { Search, Plus, X, Github, ListCollapse } from "lucide-react";
77
import { open } from "@tauri-apps/plugin-shell";
88
import { LatestRelease } from "./LatestRelease";
99
import clsx from "clsx";
@@ -138,8 +138,6 @@ export const Sidebar = () => {
138138
)}
139139
style={{ width: `${displayWidth}px` }}
140140
>
141-
142-
143141
{!isCollapsed && (
144142
<>
145143
<div className="flex justify-between items-center mb-4">
@@ -224,8 +222,10 @@ export const Sidebar = () => {
224222
? "text-gray-500 hover:text-gray-300"
225223
: "text-gray-500 hover:text-gray-700"
226224
)}
227-
title={isCollapsed ? "Expandir sidebar" : "Recolher sidebar"}
228-
aria-label={isCollapsed ? "Expandir sidebar" : "Recolher sidebar"}
225+
title={isCollapsed ? "Expand sidebar" : "Collapse sidebar"}
226+
aria-label={
227+
isCollapsed ? "Expand sidebar" : "Collapse sidebar"
228+
}
229229
>
230230
<ListCollapse className="h-4 w-4 cursor-pointer" />
231231
</button>
@@ -270,7 +270,7 @@ export const Sidebar = () => {
270270
>
271271
<Plus className="w-4 h-4" />
272272
</button>
273-
273+
274274
<div className="mt-auto mb-4 flex flex-col items-center gap-2">
275275
<button
276276
onClick={toggleSidebar}
@@ -280,8 +280,8 @@ export const Sidebar = () => {
280280
? "text-gray-500 hover:text-gray-300"
281281
: "text-gray-500 hover:text-gray-700"
282282
)}
283-
title={isCollapsed ? "Expandir sidebar" : "Recolher sidebar"}
284-
aria-label={isCollapsed ? "Expandir sidebar" : "Recolher sidebar"}
283+
title={isCollapsed ? "Expand sidebar" : "Collapse sidebar"}
284+
aria-label={isCollapsed ? "Expand sidebar" : "Collapse sidebar"}
285285
>
286286
<ListCollapse className="h-4 w-4" />
287287
</button>

src/components/UpdateChecker.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ export const UpdateChecker = () => {
109109
const getStateMessage = () => {
110110
switch (updateState) {
111111
case "checking":
112-
return "Verificando atualizações...";
112+
return "Checking for updates...";
113113
case "downloading":
114-
return "Baixando atualização...";
114+
return "Downloading update...";
115115
case "ready":
116-
return "Atualização baixada e pronta para instalar";
116+
return "Update downloaded and ready to install";
117117
case "installing":
118-
return "Instalando atualização...";
118+
return "Installing update...";
119119
case "error":
120-
return `Erro: ${error}`;
120+
return `Error: ${error}`;
121121
default:
122122
return "";
123123
}
@@ -130,7 +130,7 @@ export const UpdateChecker = () => {
130130
<button
131131
onClick={() => setShowSettings(true)}
132132
className="flex cursor-pointer items-center justify-center text-gray-500 hover:text-gray-700"
133-
title="Configurações de atualização"
133+
title="Update settings"
134134
>
135135
<Settings className="w-4 h-4" />
136136
</button>
@@ -155,7 +155,7 @@ export const UpdateChecker = () => {
155155
{showTooltip && updateState === "available" && updateInfo && (
156156
<div
157157
className={clsx(
158-
"absolute bottom-full -left-4 mb-2 p-3 mb-10 rounded-lg shadow-xl z-50 w-64",
158+
"absolute bottom-full -left-4 mb-2 p-3 rounded-lg shadow-xl z-50 w-64",
159159
"border transition-all duration-200",
160160
theme === "dark"
161161
? "bg-gray-800 border-gray-700 text-white"
@@ -166,11 +166,11 @@ export const UpdateChecker = () => {
166166
<Download className="w-4 h-4 text-blue-500 mt-0.5 flex-shrink-0" />
167167
<div className="flex-1">
168168
<h4 className="font-medium text-sm mb-1">
169-
Nova versão disponível
169+
New version available
170170
</h4>
171171
<p className="text-xs mb-3 opacity-80">
172-
Versão {updateInfo.version} está disponível. Deseja baixar
173-
agora?
172+
Version {updateInfo.version} is available. Do you want to
173+
download now?
174174
</p>
175175
<div className="flex gap-2">
176176
<button
@@ -182,7 +182,7 @@ export const UpdateChecker = () => {
182182
: "bg-blue-600 hover:bg-blue-700 text-white"
183183
)}
184184
>
185-
Baixar
185+
Download
186186
</button>
187187
<button
188188
onClick={handleTooltipDismiss}
@@ -193,7 +193,7 @@ export const UpdateChecker = () => {
193193
: "bg-gray-200 hover:bg-gray-300 text-gray-700"
194194
)}
195195
>
196-
Depois
196+
Later
197197
</button>
198198
</div>
199199
</div>
@@ -230,9 +230,9 @@ export const UpdateChecker = () => {
230230
<div className="flex items-start gap-3">
231231
<div className="w-3 h-3 rounded-full bg-green-500 flex-shrink-0 mt-1" />
232232
<div className="flex-1">
233-
<h3 className="font-medium text-sm mb-1">Pronto para instalar</h3>
233+
<h3 className="font-medium text-sm mb-1">Ready to install</h3>
234234
<p className="text-xs mb-3 opacity-80">
235-
A atualização foi baixada com sucesso.
235+
The update was downloaded successfully.
236236
</p>
237237
<div className="flex gap-2">
238238
<button
@@ -244,7 +244,7 @@ export const UpdateChecker = () => {
244244
: "bg-green-600 hover:bg-green-700 text-white"
245245
)}
246246
>
247-
Instalar e Reiniciar
247+
Install and Restart
248248
</button>
249249
<button
250250
onClick={() => setShowNotification(false)}
@@ -255,7 +255,7 @@ export const UpdateChecker = () => {
255255
: "bg-gray-200 hover:bg-gray-300 text-gray-700"
256256
)}
257257
>
258-
Mais tarde
258+
Later
259259
</button>
260260
</div>
261261
</div>

src/hooks/useLatestRelease.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export function useLatestRelease(owner: string, repo: string) {
2323
);
2424

2525
if (!res.ok) {
26-
throw new Error(`Erro ao buscar release: ${res.status}`);
26+
throw new Error(`Error fetching release: ${res.status}`);
2727
}
2828

2929
const data = await res.json();
3030
setRelease({ tag: data.tag_name });
3131
} catch (err: any) {
32-
setError(err.message || "Erro desconhecido");
32+
setError(err.message || "Unknown error");
3333
} finally {
3434
setLoading(false);
3535
}

0 commit comments

Comments
 (0)