diff --git a/management/src/components/TenantModal.jsx b/management/src/components/TenantModal.jsx index ea7f363..117e84c 100644 --- a/management/src/components/TenantModal.jsx +++ b/management/src/components/TenantModal.jsx @@ -1,6 +1,7 @@ import React, { useState, useEffect } from 'react' import { XMarkIcon, EyeIcon, EyeSlashIcon } from '@heroicons/react/24/outline' import toast from 'react-hot-toast' +import { t } from '../utils/tempTranslations' // Temporary translation system const TenantModal = ({ isOpen, onClose, tenant = null, onSave }) => { const [formData, setFormData] = useState({ diff --git a/management/src/pages/Login.jsx b/management/src/pages/Login.jsx index 550d75c..9e2d1d6 100644 --- a/management/src/pages/Login.jsx +++ b/management/src/pages/Login.jsx @@ -1,6 +1,7 @@ import React, { useState } from 'react' import { Navigate } from 'react-router-dom' import { useAuth } from '../contexts/AuthContext' +import { t } from '../utils/tempTranslations' // Temporary translation system import { EyeIcon, EyeSlashIcon } from '@heroicons/react/24/outline' const Login = () => { @@ -40,10 +41,10 @@ const Login = () => {

- UAMILS Management Portal + {t('auth.portalTitle')}

- Sign in to manage tenants and system configuration + {t('auth.loginDescription')}

@@ -51,7 +52,7 @@ const Login = () => {
{ type="text" required className="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" - placeholder="Username" + placeholder={t('auth.username')} value={formData.username} onChange={handleInputChange} disabled={loading} @@ -67,7 +68,7 @@ const Login = () => {
{ type={showPassword ? 'text' : 'password'} required className="appearance-none rounded-none relative block w-full px-3 py-2 pr-10 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" - placeholder="Password" + placeholder={t('auth.password')} value={formData.password} onChange={handleInputChange} disabled={loading} @@ -103,17 +104,17 @@ const Login = () => { {loading ? (
- Signing in... + {t('auth.signingIn')}
) : ( - 'Sign in' + t('auth.signIn') )}

- Admin access required. Default: admin / admin123 + {t('auth.adminAccess')}

diff --git a/management/src/pages/System.jsx b/management/src/pages/System.jsx index 2178d42..867edee 100644 --- a/management/src/pages/System.jsx +++ b/management/src/pages/System.jsx @@ -34,7 +34,7 @@ const System = () => { setLastUpdate(new Date()) } catch (error) { console.error('Failed to load system info:', error) - toast.error('Failed to load system information') + toast.error(t('system.loadError')) } finally { setLoading(false) } @@ -291,14 +291,14 @@ const System = () => { return (
-

No system information available

-

Unable to load system metrics.

+

{t('system.noInformation')}

+

{t('system.noInformationDescription')}

@@ -309,11 +309,11 @@ const System = () => {
-

System Monitor

-

Real-time system health and configuration monitoring

+

{t('system.title')}

+

{t('system.description')}

{lastUpdate && (

- Last updated: {lastUpdate.toLocaleTimeString()} + {t('system.lastUpdated')}: {lastUpdate.toLocaleTimeString()}

)}
@@ -322,20 +322,20 @@ const System = () => { className="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-sm leading-4 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" > - Refresh + {t('common.refresh')}
{/* Platform Overview */}
- +
- Version + {t('system.version')} {systemInfo.platform.version}
- Environment + {t('system.environment')} {systemInfo.platform.environment}
diff --git a/management/src/utils/tempTranslations.js b/management/src/utils/tempTranslations.js index 67d0c9d..776ba5f 100644 --- a/management/src/utils/tempTranslations.js +++ b/management/src/utils/tempTranslations.js @@ -91,12 +91,20 @@ const translations = { issues: 'Issues' }, system: { - title: 'System Information', + title: 'System Monitor', + description: 'Real-time system health and configuration monitoring', serverInfo: 'Server Information', databaseInfo: 'Database Information', version: 'Version', + environment: 'Environment', uptime: 'Uptime', - platform: 'Platform' + platform: 'Platform', + platformStatus: 'Platform Status', + lastUpdated: 'Last updated', + loadError: 'Failed to load system information', + noInformation: 'No system information available', + noInformationDescription: 'Unable to load system metrics.', + retry: 'Retry' }, common: { loading: 'Loading...', @@ -125,7 +133,12 @@ const translations = { username: 'Username', password: 'Password', loginButton: 'Sign In', - logout: 'Logout' + logout: 'Logout', + portalTitle: 'UAMILS Management Portal', + loginDescription: 'Sign in to manage tenants and system configuration', + signIn: 'Sign in', + signingIn: 'Signing in...', + adminAccess: 'Admin access required. Default: admin / admin123' } }, sv: { @@ -219,12 +232,20 @@ const translations = { issues: 'Problem' }, system: { - title: 'Systeminformation', + title: 'Systemövervakning', + description: 'Realtid systemhälsa och konfigurationsövervakning', serverInfo: 'Serverinformation', databaseInfo: 'Databasinformation', version: 'Version', + environment: 'Miljö', uptime: 'Drifttid', - platform: 'Plattform' + platform: 'Plattform', + platformStatus: 'Plattformsstatus', + lastUpdated: 'Senast uppdaterad', + loadError: 'Misslyckades att ladda systeminformation', + noInformation: 'Ingen systeminformation tillgänglig', + noInformationDescription: 'Kunde inte ladda systemstatistik.', + retry: 'Försök igen' }, common: { loading: 'Laddar...', @@ -253,7 +274,12 @@ const translations = { username: 'Användarnamn', password: 'Lösenord', loginButton: 'Logga in', - logout: 'Logga ut' + logout: 'Logga ut', + portalTitle: 'UAMILS Förvaltningsportal', + loginDescription: 'Logga in för att hantera hyresgäster och systemkonfiguration', + signIn: 'Logga in', + signingIn: 'Loggar in...', + adminAccess: 'Administratörsåtkomst krävs. Standard: admin / admin123' } } };