From ad0fd12262db8eabf3c6c0078eebc3937bc7c752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sun, 23 Aug 2026 16:26:36 +0000 Subject: [PATCH] toolbar family keyed (57 -> 33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Toolbar, ActionButtons, SelectionActions and DefaultActions. Almost every string here reused an existing files.menu.* key from the last two commits rather than adding a duplicate — cut/copy/paste/download/delete/newFolder/uploadFiles/ uploadFolder/hideHiddenFiles were all already there. Three new: gitClone, searchFiles, clearSelection, refresh, selected. The clone-URL placeholder here is the same hint as NewEntryDialog's, reused rather than restated with different example names (user/repo vs owner/repo) — one key per meaning, not per occurrence. The "N selected" count splits the number and the word across two spans (the word hidden on mobile); only the word needed a key, so files.menu.selected is standalone prose rather than an interpolated frame. --- .../components/Toolbar/ActionButtons.tsx | 4 +++- .../components/Toolbar/DefaultActions.tsx | 10 ++++++---- .../components/Toolbar/SelectionActions.tsx | 16 +++++++++------- .../components/Toolbar/Toolbar.tsx | 18 ++++++++++-------- .../officerdev/src/locales/en-GB.json | 7 ++++++- .../officerdev/src/locales/pt-PT.json | 7 ++++++- 6 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/Toolbar/ActionButtons.tsx b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/Toolbar/ActionButtons.tsx index aafe2146..66f9656c 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/Toolbar/ActionButtons.tsx +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/Toolbar/ActionButtons.tsx @@ -1,5 +1,6 @@ import { RefreshCw } from 'lucide-react'; import type { UseFileBrowserAppType } from '../../useFileBrowserApp'; +import { useTranslation } from '../../../../../locales'; import { SelectionActions } from './SelectionActions'; import { DefaultActions } from './DefaultActions'; @@ -8,13 +9,14 @@ type ActionButtonsProps = { }; export const ActionButtons = ({ fileBrowserManager }: ActionButtonsProps) => { + const { t } = useTranslation(); const { refresh, selected } = fileBrowserManager; return (
@@ -67,7 +69,7 @@ export const Toolbar = ({ fileBrowserManager }: ToolbarProps) => { setCloneUrl(''); }} className="p-1.5 rounded-md text-duck-teal hover:bg-duck-dark/5 cursor-pointer transition-colors disabled:opacity-40" - title="Cancel" + title={t('newEntry.cancel')} > @@ -76,21 +78,21 @@ export const Toolbar = ({ fileBrowserManager }: ToolbarProps) => { <> diff --git a/src/workspaces/officerdev/src/locales/en-GB.json b/src/workspaces/officerdev/src/locales/en-GB.json index 20778e1b..53cca5ba 100644 --- a/src/workspaces/officerdev/src/locales/en-GB.json +++ b/src/workspaces/officerdev/src/locales/en-GB.json @@ -521,7 +521,12 @@ "unpin": "Unpin", "pin": "Pin", "chat": "Chat...", - "delete": "Delete" + "delete": "Delete", + "gitClone": "Git clone", + "searchFiles": "Search files...", + "clearSelection": "Clear selection", + "selected": "selected", + "refresh": "Refresh" } }, "taskRunner": { diff --git a/src/workspaces/officerdev/src/locales/pt-PT.json b/src/workspaces/officerdev/src/locales/pt-PT.json index 6d3df556..3f8518eb 100644 --- a/src/workspaces/officerdev/src/locales/pt-PT.json +++ b/src/workspaces/officerdev/src/locales/pt-PT.json @@ -521,7 +521,12 @@ "unpin": "Remover fixação", "pin": "Fixar", "chat": "Chat...", - "delete": "Eliminar" + "delete": "Eliminar", + "gitClone": "Clonar via Git", + "searchFiles": "Pesquisar ficheiros...", + "clearSelection": "Limpar seleção", + "selected": "selecionados", + "refresh": "Atualizar" } }, "taskRunner": {