setName(ev.target.value)}
- placeholder="My Dashboard"
+ placeholder={t('dashboards.namePlaceholder')}
autoFocus
className="rounded-lg border border-duck-dark/20 bg-background px-3 py-2 text-sm text-duck-dark placeholder:text-duck-dark/30 focus:outline-none focus:ring-2 focus:ring-duck-teal/30 focus:border-duck-teal/50"
/>
@@ -253,12 +259,12 @@ const NamePanel = () => {
@@ -270,6 +276,7 @@ const NamePanel = () => {
// --- Panel: Create ---
const CreatePanel = () => {
+ const { t } = useTranslation();
const navigate = useNavigate();
const queryClient = useQueryClient();
const client = useClient();
@@ -401,7 +408,7 @@ const CreatePanel = () => {
)}
@@ -453,13 +460,14 @@ const newDashLayout: LayoutNode = {
};
const NewDashboardForm = () => {
+ const { t } = useTranslation();
const { registry } = useAppRegistry();
const newDashRegistry = {
...registry,
- 'file-browser-cwd': { name: 'File Browser', icon: FolderOpen, component: CwdFileBrowser },
- 'new-ws-name': { name: 'Name', icon: Type, component: NamePanel },
- 'new-ws-template': { name: 'Template', icon: Layout, component: TemplatePanel },
- 'new-ws-create': { name: 'Create', icon: Rocket, component: CreatePanel },
+ 'file-browser-cwd': { name: panelName('panelName.fileBrowser'), icon: FolderOpen, component: CwdFileBrowser },
+ 'new-ws-name': { name: t('dashboards.name'), icon: Type, component: NamePanel },
+ 'new-ws-template': { name: t('dashboards.template'), icon: Layout, component: TemplatePanel },
+ 'new-ws-create': { name: t('dashboards.create'), icon: Rocket, component: CreatePanel },
};
return
{}} registry={newDashRegistry} noHeader />;
@@ -470,6 +478,7 @@ const NewDashboardForm = () => {
// Only reached when nothing is selected AND nothing is being created or edited — DashboardPreview checks
// those first now, so this component no longer needs its own creating/editing branch.
const DashboardPreviewEmpty = () => {
+ const { t } = useTranslation();
const [, setCreating] = useGlobal(CREATING_DASHBOARD_KEY, false);
const [, setName] = useGlobal(NEW_DASH_NAME_KEY, '');
const [, setDescription] = useGlobal(NEW_DASH_DESC_KEY, '');
@@ -488,10 +497,10 @@ const DashboardPreviewEmpty = () => {
-
Select a dashboard or create a new one
+
{t('dashboards.selectOne')}
diff --git a/src/workspaces/officerdev/src/locales/en-GB.json b/src/workspaces/officerdev/src/locales/en-GB.json
index 9bb9b5c0..f930df1d 100644
--- a/src/workspaces/officerdev/src/locales/en-GB.json
+++ b/src/workspaces/officerdev/src/locales/en-GB.json
@@ -1,6 +1,7 @@
{
"common": {
- "save": "Save"
+ "save": "Save",
+ "delete": "Delete"
},
"minesweeper": {
"notInstalled": "Minesweeper is not installed on this server.",
@@ -136,5 +137,28 @@
"hostTerminal": "Host Terminal",
"runningShells": "Running Shells",
"pm2Processes": "pm2 processes"
+ },
+ "dashboards": {
+ "title": "Dashboards",
+ "new": "New Dashboard",
+ "delete": "Delete dashboard",
+ "confirmDelete": "Are you sure you want to delete",
+ "search": "Search dashboards",
+ "name": "Name",
+ "description": "Description",
+ "open": "Open Dashboard",
+ "selectOne": "Select a dashboard or create a new one",
+ "namePlaceholder": "My Dashboard",
+ "descriptionPlaceholder": "What is this dashboard for?",
+ "template": "Template",
+ "create": "Create",
+ "templates": {
+ "single": "Single",
+ "twoColumns": "2 Columns",
+ "mainSide": "Main + Side",
+ "sidebar": "Sidebar",
+ "grid": "2x2 Grid",
+ "colsBottom": "Cols + Bottom"
+ }
}
}
diff --git a/src/workspaces/officerdev/src/locales/pt-PT.json b/src/workspaces/officerdev/src/locales/pt-PT.json
index 54ce196a..80b14d4c 100644
--- a/src/workspaces/officerdev/src/locales/pt-PT.json
+++ b/src/workspaces/officerdev/src/locales/pt-PT.json
@@ -1,6 +1,7 @@
{
"common": {
- "save": "Guardar"
+ "save": "Guardar",
+ "delete": "Eliminar"
},
"minesweeper": {
"notInstalled": "O Minesweeper não está instalado neste servidor.",
@@ -136,5 +137,28 @@
"hostTerminal": "Terminal do anfitrião",
"runningShells": "Shells em execução",
"pm2Processes": "processos pm2"
+ },
+ "dashboards": {
+ "title": "Painéis",
+ "new": "Novo painel",
+ "delete": "Eliminar painel",
+ "confirmDelete": "Tem a certeza de que quer eliminar",
+ "search": "Pesquisar painéis",
+ "name": "Nome",
+ "description": "Descrição",
+ "open": "Abrir painel",
+ "selectOne": "Selecione um painel ou crie um novo",
+ "namePlaceholder": "O meu painel",
+ "descriptionPlaceholder": "Para que serve este painel?",
+ "template": "Modelo",
+ "create": "Criar",
+ "templates": {
+ "single": "Único",
+ "twoColumns": "2 colunas",
+ "mainSide": "Principal + lateral",
+ "sidebar": "Barra lateral",
+ "grid": "Grelha 2x2",
+ "colsBottom": "Colunas + inferior"
+ }
}
}