소스 검색

Admin translations

svalavuo 6 일 전
부모
커밋
49d2040c99
7개의 변경된 파일237개의 추가작업 그리고 80개의 파일을 삭제
  1. 13 9
      admin/categories.php
  2. 28 24
      admin/index.php
  3. 12 11
      admin/login.php
  4. 31 27
      admin/publications.php
  5. 9 9
      admin/users.php
  6. 72 0
      languages/en.php
  7. 72 0
      languages/fi.php

+ 13 - 9
admin/categories.php

@@ -3,6 +3,7 @@ require_once '../includes/config.php';
 require_once '../includes/database.php';
 require_once '../includes/auth.php';
 require_once '../includes/publication.php';
+require_once '../includes/translation.php';
 
 // Include LDAP class if LDAP is enabled
 if (LDAP_ENABLED) {
@@ -15,6 +16,9 @@ $auth->requireAuth();
 $publication = new Publication();
 $user = $auth->getUser();
 
+// Initialize translation system
+$translation = Translation::getInstance();
+
 // Handle actions
 $action = $_GET['action'] ?? '';
 $message = '';
@@ -24,7 +28,7 @@ if ($action === 'edit' && isset($_GET['id'])) {
     $id = (int)$_GET['id'];
     $category = $publication->db->fetch("SELECT * FROM categories WHERE id = ?", [$id]);
     if (!$category) {
-        die('Category not found');
+        die(t('admin_category_not_found'));
     }
 }
 
@@ -34,13 +38,13 @@ if ($action === 'delete' && isset($_GET['id'])) {
         // Check if category has publications
         $pubCount = $publication->db->fetch("SELECT COUNT(*) as count FROM publication_categories WHERE category_id = ?", [$id])['count'];
         if ($pubCount > 0) {
-            $message = 'Cannot delete category with associated publications';
+            $message = t('admin_category_cannot_delete_with_pubs');
         } else {
             $publication->db->delete('categories', 'id = ?', [$id]);
-            $message = 'Category deleted successfully';
+            $message = t('admin_category_deleted_success');
         }
     } catch (Exception $e) {
-        $message = 'Error deleting category: ' . $e->getMessage();
+        $message = t('admin_category_delete_error') . ' ' . $e->getMessage();
     }
 }
 
@@ -52,7 +56,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
     
     $errors = [];
     
-    if (empty($name)) $errors[] = 'Category name is required';
+    if (empty($name)) $errors[] = t('admin_category_name_required');
     
     if (empty($errors)) {
         try {
@@ -62,14 +66,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
                     'name' => $name,
                     'description' => $description
                 ], 'id = ?', [$categoryId]);
-                $message = 'Category updated successfully';
+                $message = t('admin_category_updated_success');
             } else {
                 // Create new category
                 $publication->db->insert('categories', [
                     'name' => $name,
                     'description' => $description
                 ]);
-                $message = 'Category created successfully';
+                $message = t('admin_category_created_success');
             }
             
             // Redirect to avoid form resubmission
@@ -78,9 +82,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
             
         } catch (Exception $e) {
             if (strpos($e->getMessage(), 'Duplicate') !== false) {
-                $errors[] = 'Category name already exists';
+                $errors[] = t('admin_category_name_exists');
             } else {
-                $errors[] = 'Error saving category: ' . $e->getMessage();
+                $errors[] = t('admin_category_save_error') . ' ' . $e->getMessage();
             }
         }
     }

+ 28 - 24
admin/index.php

@@ -3,6 +3,7 @@ require_once '../includes/config.php';
 require_once '../includes/database.php';
 require_once '../includes/auth.php';
 require_once '../includes/publication.php';
+require_once '../includes/translation.php';
 
 // Include LDAP class if LDAP is enabled
 if (LDAP_ENABLED) {
@@ -15,6 +16,9 @@ $auth->requireAuth();
 $publication = new Publication();
 $user = $auth->getUser();
 
+// Initialize translation system
+$translation = Translation::getInstance();
+
 // Handle actions
 $action = $_GET['action'] ?? '';
 $message = '';
@@ -23,9 +27,9 @@ if ($action === 'delete' && isset($_GET['id'])) {
     $id = (int)$_GET['id'];
     try {
         $publication->delete($id);
-        $message = 'Publication deleted successfully';
+        $message = t('admin_publication_deleted_success');
     } catch (Exception $e) {
-        $message = 'Error deleting publication: ' . $e->getMessage();
+        $message = t('admin_publication_deleted_error') . ' ' . $e->getMessage();
     }
 }
 
@@ -40,7 +44,7 @@ $recentPublications = $publication->getAll('all', 10);
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Admin Dashboard - <?php echo SITE_TITLE; ?></title>
+    <title><?php echo t('admin_dashboard_title'); ?> - <?php echo SITE_TITLE; ?></title>
     <link rel="stylesheet" href="../css/style.css">
 </head>
 <body>
@@ -49,16 +53,16 @@ $recentPublications = $publication->getAll('all', 10);
             <div class="header-content">
                 <h1><?php echo SITE_TITLE; ?></h1>
                 <nav class="admin-nav">
-                    <a href="index.php" class="nav-link active">Dashboard</a>
-                    <a href="publications.php" class="nav-link">Publications</a>
-                    <a href="categories.php" class="nav-link">Categories</a>
+                    <a href="index.php" class="nav-link active"><?php echo t('admin_nav_dashboard'); ?></a>
+                    <a href="publications.php" class="nav-link"><?php echo t('admin_nav_publications'); ?></a>
+                    <a href="categories.php" class="nav-link"><?php echo t('admin_nav_categories'); ?></a>
                     <?php if (LDAP_ENABLED): ?>
-                        <a href="ldap-users.php" class="nav-link">LDAP Users</a>
+                        <a href="ldap-users.php" class="nav-link"><?php echo t('admin_nav_ldap_users'); ?></a>
                     <?php endif; ?>
-                    <a href="logout.php" class="nav-link">Logout</a>
+                    <a href="logout.php" class="nav-link"><?php echo t('admin_nav_logout'); ?></a>
                 </nav>
                 <div class="user-info">
-                    Welcome, <?php echo htmlspecialchars($user['username']); ?>
+                    <?php echo t('admin_welcome'); ?>, <?php echo htmlspecialchars($user['username']); ?>
                 </div>
             </div>
         </header>
@@ -71,38 +75,38 @@ $recentPublications = $publication->getAll('all', 10);
             <?php endif; ?>
 
             <section class="dashboard-stats">
-                <h2>Overview</h2>
+                <h2><?php echo t('admin_overview'); ?></h2>
                 <div class="stats-grid">
                     <div class="stat-card">
-                        <h3>Total Publications</h3>
+                        <h3><?php echo t('admin_total_publications'); ?></h3>
                         <p class="stat-number"><?php echo $stats['total']; ?></p>
                     </div>
                     <div class="stat-card">
-                        <h3>Published</h3>
+                        <h3><?php echo t('admin_published'); ?></h3>
                         <p class="stat-number"><?php echo $stats['published']; ?></p>
                     </div>
                     <div class="stat-card">
-                        <h3>Drafts</h3>
+                        <h3><?php echo t('admin_drafts'); ?></h3>
                         <p class="stat-number"><?php echo $stats['draft']; ?></p>
                     </div>
                     <div class="stat-card">
-                        <h3>Archived</h3>
+                        <h3><?php echo t('admin_archived'); ?></h3>
                         <p class="stat-number"><?php echo $stats['archived']; ?></p>
                     </div>
                 </div>
             </section>
 
             <section class="recent-publications">
-                <h2>Recent Publications</h2>
+                <h2><?php echo t('admin_recent_publications'); ?></h2>
                 <div class="table-container">
                     <table class="admin-table">
                         <thead>
                             <tr>
-                                <th>Title</th>
-                                <th>Author</th>
-                                <th>Status</th>
-                                <th>Created</th>
-                                <th>Actions</th>
+                                <th><?php echo t('admin_table_title'); ?></th>
+                                <th><?php echo t('admin_table_author'); ?></th>
+                                <th><?php echo t('admin_table_status'); ?></th>
+                                <th><?php echo t('admin_table_created'); ?></th>
+                                <th><?php echo t('admin_table_actions'); ?></th>
                             </tr>
                         </thead>
                         <tbody>
@@ -121,11 +125,11 @@ $recentPublications = $publication->getAll('all', 10);
                                     </td>
                                     <td><?php echo date('M j, Y', strtotime($pub['created_at'])); ?></td>
                                     <td>
-                                        <a href="edit.php?id=<?php echo $pub['id']; ?>" class="btn btn-sm">Edit</a>
+                                        <a href="edit.php?id=<?php echo $pub['id']; ?>" class="btn btn-sm"><?php echo t('admin_action_edit'); ?></a>
                                         <a href="index.php?action=delete&id=<?php echo $pub['id']; ?>" 
                                            class="btn btn-sm btn-danger" 
-                                           onclick="return confirm('Are you sure you want to delete this publication?')">
-                                            Delete
+                                           onclick="return confirm('<?php echo t('admin_confirm_delete'); ?>')">
+                                            <?php echo t('admin_action_delete'); ?>
                                         </a>
                                     </td>
                                 </tr>
@@ -135,7 +139,7 @@ $recentPublications = $publication->getAll('all', 10);
                 </div>
                 
                 <div class="actions">
-                    <a href="edit.php" class="btn btn-primary">Create New Publication</a>
+                    <a href="edit.php" class="btn btn-primary"><?php echo t('admin_create_publication'); ?></a>
                 </div>
             </section>
         </main>

+ 12 - 11
admin/login.php

@@ -2,6 +2,7 @@
 require_once '../includes/config.php';
 require_once '../includes/database.php';
 require_once '../includes/auth.php';
+require_once '../includes/translation.php';
 
 // Start session for language preference
 if (session_status() === PHP_SESSION_NONE) {
@@ -35,12 +36,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
     $password = $_POST['password'] ?? '';
     
     if (empty($username) || empty($password)) {
-        $errors[] = 'Please enter both username and password';
+        $errors[] = t('admin_login_error_empty');
     } elseif ($auth->login($username, $password)) {
         header('Location: index.php');
         exit;
     } else {
-        $errors[] = 'Invalid username or password';
+        $errors[] = t('admin_login_error_invalid');
     }
 }
 ?>
@@ -49,19 +50,19 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Admin Login - <?php echo SITE_TITLE; ?></title>
+    <title><?php echo t('admin_login_title'); ?> - <?php echo SITE_TITLE; ?></title>
     <link rel="stylesheet" href="../css/style.css">
 </head>
 <body class="login-page">
     <div class="container">
         <div class="login-form">
-            <h1>Admin Login</h1>
+            <h1><?php echo t('admin_login_title'); ?></h1>
             
             <?php if (LDAP_ENABLED): ?>
                 <div class="auth-info">
                     <p class="ldap-notice">
-                        <strong>LDAP Authentication Enabled</strong><br>
-                        Please login with your directory credentials.
+                        <strong><?php echo t('admin_login_ldap_enabled'); ?></strong><br>
+                        <?php echo t('admin_login_ldap_notice'); ?>
                     </p>
                 </div>
             <?php endif; ?>
@@ -77,21 +78,21 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
             <form method="post">
                 <div class="form-group">
                     <label for="username">
-                        <?php echo LDAP_ENABLED ? 'Directory Username:' : 'Username:'; ?>
+                        <?php echo LDAP_ENABLED ? t('admin_login_username_ldap') : t('admin_login_username'); ?>
                     </label>
                     <input type="text" id="username" name="username" required 
-                           placeholder="<?php echo LDAP_ENABLED ? 'Enter your directory username' : 'Enter username'; ?>">
+                           placeholder="<?php echo LDAP_ENABLED ? t('admin_login_username_placeholder_ldap') : t('admin_login_username_placeholder'); ?>">
                 </div>
                 
                 <div class="form-group">
                     <label for="password">
-                        <?php echo LDAP_ENABLED ? 'Directory Password:' : 'Password:'; ?>
+                        <?php echo LDAP_ENABLED ? t('admin_login_password_ldap') : t('admin_login_password'); ?>
                     </label>
                     <input type="password" id="password" name="password" required
-                           placeholder="<?php echo LDAP_ENABLED ? 'Enter your directory password' : 'Enter password'; ?>">
+                           placeholder="<?php echo LDAP_ENABLED ? t('admin_login_password_placeholder_ldap') : t('admin_login_password_placeholder'); ?>">
                 </div>
                 
-                <button type="submit" class="btn btn-primary">Login</button>
+                <button type="submit" class="btn btn-primary"><?php echo t('admin_login_button'); ?></button>
             </form>
         </div>
     </div>

+ 31 - 27
admin/publications.php

@@ -3,6 +3,7 @@ require_once '../includes/config.php';
 require_once '../includes/database.php';
 require_once '../includes/auth.php';
 require_once '../includes/publication.php';
+require_once '../includes/translation.php';
 
 // Include LDAP class if LDAP is enabled
 if (LDAP_ENABLED) {
@@ -15,6 +16,9 @@ $auth->requireAuth();
 $publication = new Publication();
 $user = $auth->getUser();
 
+// Initialize translation system
+$translation = Translation::getInstance();
+
 // Handle actions
 $action = $_GET['action'] ?? '';
 $message = '';
@@ -23,9 +27,9 @@ if ($action === 'delete' && isset($_GET['id'])) {
     $id = (int)$_GET['id'];
     try {
         $publication->delete($id);
-        $message = 'Publication deleted successfully';
+        $message = t('admin_publication_deleted_success');
     } catch (Exception $e) {
-        $message = 'Error deleting publication: ' . $e->getMessage();
+        $message = t('admin_publication_deleted_error') . ' ' . $e->getMessage();
     }
 }
 
@@ -54,7 +58,7 @@ $totalPages = ceil($totalPublications / $limit);
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Publications - <?php echo SITE_TITLE; ?></title>
+    <title><?php echo t('admin_nav_publications'); ?> - <?php echo SITE_TITLE; ?></title>
     <link rel="stylesheet" href="../css/style.css">
 </head>
 <body>
@@ -63,24 +67,24 @@ $totalPages = ceil($totalPublications / $limit);
             <div class="header-content">
                 <h1><?php echo SITE_TITLE; ?></h1>
                 <nav class="admin-nav">
-                    <a href="index.php" class="nav-link">Dashboard</a>
-                    <a href="publications.php" class="nav-link active">Publications</a>
-                    <a href="categories.php" class="nav-link">Categories</a>
+                    <a href="index.php" class="nav-link"><?php echo t('admin_nav_dashboard'); ?></a>
+                    <a href="publications.php" class="nav-link active"><?php echo t('admin_nav_publications'); ?></a>
+                    <a href="categories.php" class="nav-link"><?php echo t('admin_nav_categories'); ?></a>
                     <?php if (LDAP_ENABLED): ?>
-                        <a href="ldap-users.php" class="nav-link">LDAP Users</a>
+                        <a href="ldap-users.php" class="nav-link"><?php echo t('admin_nav_ldap_users'); ?></a>
                     <?php endif; ?>
-                    <a href="logout.php" class="nav-link">Logout</a>
+                    <a href="logout.php" class="nav-link"><?php echo t('admin_nav_logout'); ?></a>
                 </nav>
                 <div class="user-info">
-                    Welcome, <?php echo htmlspecialchars($user['username']); ?>
+                    <?php echo t('admin_welcome'); ?>, <?php echo htmlspecialchars($user['username']); ?>
                 </div>
             </div>
         </header>
 
         <main class="admin-main">
             <div class="page-header">
-                <h2>Publications</h2>
-                <a href="edit.php" class="btn btn-primary">Create New Publication</a>
+                <h2><?php echo t('admin_nav_publications'); ?></h2>
+                <a href="edit.php" class="btn btn-primary"><?php echo t('admin_create_publication'); ?></a>
             </div>
             
             <?php if ($message): ?>
@@ -92,23 +96,23 @@ $totalPages = ceil($totalPublications / $limit);
             <div class="filters">
                 <form method="get" class="filter-form">
                     <div class="filter-group">
-                        <label for="status">Status:</label>
+                        <label for="status"><?php echo t('admin_table_status'); ?>:</label>
                         <select id="status" name="status" onchange="this.form.submit()">
-                            <option value="all" <?php echo $status === 'all' ? 'selected' : ''; ?>>All</option>
-                            <option value="published" <?php echo $status === 'published' ? 'selected' : ''; ?>>Published</option>
-                            <option value="draft" <?php echo $status === 'draft' ? 'selected' : ''; ?>>Draft</option>
-                            <option value="archived" <?php echo $status === 'archived' ? 'selected' : ''; ?>>Archived</option>
+                            <option value="all" <?php echo $status === 'all' ? 'selected' : ''; ?>><?php echo t('admin_filter_all'); ?></option>
+                            <option value="published" <?php echo $status === 'published' ? 'selected' : ''; ?>><?php echo t('admin_published'); ?></option>
+                            <option value="draft" <?php echo $status === 'draft' ? 'selected' : ''; ?>><?php echo t('admin_drafts'); ?></option>
+                            <option value="archived" <?php echo $status === 'archived' ? 'selected' : ''; ?>><?php echo t('admin_archived'); ?></option>
                         </select>
                     </div>
                     
                     <div class="filter-group">
-                        <label for="search">Search:</label>
-                        <input type="text" id="search" name="search" value="<?php echo htmlspecialchars($search); ?>" placeholder="Search publications...">
+                        <label for="search"><?php echo t('search'); ?>:</label>
+                        <input type="text" id="search" name="search" value="<?php echo htmlspecialchars($search); ?>" placeholder="<?php echo t('admin_search_publications'); ?>...">
                     </div>
                     
-                    <button type="submit" class="btn btn-sm">Filter</button>
+                    <button type="submit" class="btn btn-sm"><?php echo t('admin_filter_button'); ?></button>
                     <?php if ($search || $status !== 'all'): ?>
-                        <a href="publications.php" class="btn btn-sm btn-secondary">Clear</a>
+                        <a href="publications.php" class="btn btn-sm btn-secondary"><?php echo t('admin_clear_button'); ?></a>
                     <?php endif; ?>
                 </form>
             </div>
@@ -117,18 +121,18 @@ $totalPages = ceil($totalPublications / $limit);
                 <table class="admin-table">
                     <thead>
                         <tr>
-                            <th>Title</th>
-                            <th>Author</th>
-                            <th>Status</th>
-                            <th>Created</th>
-                            <th>Updated</th>
-                            <th>Actions</th>
+                            <th><?php echo t('admin_table_title'); ?></th>
+                            <th><?php echo t('admin_table_author'); ?></th>
+                            <th><?php echo t('admin_table_status'); ?></th>
+                            <th><?php echo t('admin_table_created'); ?></th>
+                            <th><?php echo t('admin_table_updated'); ?></th>
+                            <th><?php echo t('admin_table_actions'); ?></th>
                         </tr>
                     </thead>
                     <tbody>
                         <?php if (empty($publications)): ?>
                             <tr>
-                                <td colspan="6" class="text-center">No publications found.</td>
+                                <td colspan="6" class="text-center"><?php echo t('admin_no_publications_found'); ?></td>
                             </tr>
                         <?php else: ?>
                             <?php foreach ($publications as $pub): ?>

+ 9 - 9
admin/users.php

@@ -57,7 +57,7 @@ switch ($action) {
         // Get user details
         $user = $db->fetch("SELECT * FROM users WHERE id = ?", [$user_id]);
         if (!$user) {
-            $error = 'User not found';
+            $error = t('admin_user_not_found');
             break;
         }
         
@@ -71,13 +71,13 @@ switch ($action) {
         
         // Don't allow deletion of the currently logged-in user
         if ($user_id == $_SESSION['user_id']) {
-            $error = 'You cannot delete your own account';
+            $error = t('admin_user_cannot_delete_own');
             break;
         }
         
         // Delete user
         $db->delete('users', 'id = ?', [$user_id]);
-        $message = 'User deleted successfully';
+        $message = t('admin_user_deleted_success');
         
         // Redirect back to user list
         header('Location: users.php?action=list&message=' . urlencode($message));
@@ -92,23 +92,23 @@ switch ($action) {
             $auth_type = trim($_POST['auth_type'] ?? 'local');
             
             // Validation
-            if (empty($username)) $error = 'Username is required';
-            elseif (empty($email)) $error = 'Email is required';
-            elseif (empty($password) && $auth_type === 'local') $error = 'Password is required for local authentication';
-            elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) $error = 'Invalid email format';
+            if (empty($username)) $error = t('admin_username_required');
+            elseif (empty($email)) $error = t('admin_email_required');
+            elseif (empty($password) && $auth_type === 'local') $error = t('admin_password_required_local');
+            elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) $error = t('admin_email_invalid');
             
             if (!$error) {
                 // Check if username already exists
                 $existing_user = $db->fetch("SELECT id FROM users WHERE username = ?", [$username]);
                 if ($existing_user) {
-                    $error = 'Username already exists';
+                    $error = t('admin_username_exists');
                 } else {
                     // Create new user
                     $hashed_password = password_hash($password, PASSWORD_DEFAULT);
                     $sql = "INSERT INTO users (username, email, password, auth_type, created_at) VALUES (?, ?, ?, ?, NOW())";
                     $db->query($sql, [$username, $email, $hashed_password, $auth_type]);
                     
-                    $message = 'User created successfully';
+                    $message = t('admin_user_created_success');
                     
                     // If LDAP is enabled, we could also create LDAP user here
                     if ($auth_type === 'ldap' && LDAP_ENABLED) {

+ 72 - 0
languages/en.php

@@ -196,4 +196,76 @@ return [
     'found_count' => 'Found :count publications',
     'latest_publications' => 'Latest Publications',
     'category' => 'Category',
+    
+    // Admin Login
+    'admin_login_title' => 'Admin Login',
+    'admin_login_error_empty' => 'Please enter both username and password',
+    'admin_login_error_invalid' => 'Invalid username or password',
+    'admin_login_ldap_enabled' => 'LDAP Authentication Enabled',
+    'admin_login_ldap_notice' => 'Please login with your directory credentials.',
+    'admin_login_username' => 'Username:',
+    'admin_login_username_ldap' => 'Directory Username:',
+    'admin_login_username_placeholder' => 'Enter username',
+    'admin_login_username_placeholder_ldap' => 'Enter your directory username',
+    'admin_login_password' => 'Password:',
+    'admin_login_password_ldap' => 'Directory Password:',
+    'admin_login_password_placeholder' => 'Enter password',
+    'admin_login_password_placeholder_ldap' => 'Enter your directory password',
+    'admin_login_button' => 'Login',
+    
+    // Admin Dashboard
+    'admin_dashboard_title' => 'Admin Dashboard',
+    'admin_publication_deleted_success' => 'Publication deleted successfully',
+    'admin_publication_deleted_error' => 'Error deleting publication',
+    'admin_nav_dashboard' => 'Dashboard',
+    'admin_nav_publications' => 'Publications',
+    'admin_nav_categories' => 'Categories',
+    'admin_nav_ldap_users' => 'LDAP Users',
+    'admin_nav_logout' => 'Logout',
+    'admin_welcome' => 'Welcome',
+    'admin_overview' => 'Overview',
+    'admin_total_publications' => 'Total Publications',
+    'admin_published' => 'Published',
+    'admin_drafts' => 'Drafts',
+    'admin_archived' => 'Archived',
+    'admin_recent_publications' => 'Recent Publications',
+    'admin_table_title' => 'Title',
+    'admin_table_author' => 'Author',
+    'admin_table_status' => 'Status',
+    'admin_table_created' => 'Created',
+    'admin_table_actions' => 'Actions',
+    'admin_action_edit' => 'Edit',
+    'admin_action_delete' => 'Delete',
+    'admin_confirm_delete' => 'Are you sure you want to delete this publication?',
+    'admin_create_publication' => 'Create New Publication',
+    
+    // Admin Publications Page
+    'admin_filter_all' => 'All',
+    'admin_search_publications' => 'Search publications',
+    'admin_filter_button' => 'Filter',
+    'admin_clear_button' => 'Clear',
+    'admin_table_updated' => 'Updated',
+    'admin_no_publications_found' => 'No publications found.',
+    
+    // Admin Users Page
+    'admin_user_not_found' => 'User not found',
+    'admin_user_cannot_delete_own' => 'You cannot delete your own account',
+    'admin_user_deleted_success' => 'User deleted successfully',
+    'admin_username_required' => 'Username is required',
+    'admin_email_required' => 'Email is required',
+    'admin_password_required_local' => 'Password is required for local authentication',
+    'admin_email_invalid' => 'Invalid email format',
+    'admin_username_exists' => 'Username already exists',
+    'admin_user_created_success' => 'User created successfully',
+    
+    // Admin Categories Page
+    'admin_category_not_found' => 'Category not found',
+    'admin_category_cannot_delete_with_pubs' => 'Cannot delete category with associated publications',
+    'admin_category_deleted_success' => 'Category deleted successfully',
+    'admin_category_delete_error' => 'Error deleting category',
+    'admin_category_name_required' => 'Category name is required',
+    'admin_category_updated_success' => 'Category updated successfully',
+    'admin_category_created_success' => 'Category created successfully',
+    'admin_category_name_exists' => 'Category name already exists',
+    'admin_category_save_error' => 'Error saving category',
 ];

+ 72 - 0
languages/fi.php

@@ -196,4 +196,76 @@ return [
     'found_count' => 'Löytyi :count julkaisua',
     'latest_publications' => 'Viimeisimmät julkaisut',
     'category' => 'Kategoria',
+    
+    // Admin Login
+    'admin_login_title' => 'Ylläpiton Kirjautuminen',
+    'admin_login_error_empty' => 'Syötä sekä käyttäjätunnus että salasana',
+    'admin_login_error_invalid' => 'Virheellinen käyttäjätunnus tai salasana',
+    'admin_login_ldap_enabled' => 'LDAP-todennus käytössä',
+    'admin_login_ldap_notice' => 'Kirjaudu sisään hakemistunnuksillasi.',
+    'admin_login_username' => 'Käyttäjätunnus:',
+    'admin_login_username_ldap' => 'Hakemiskäyttäjätunnus:',
+    'admin_login_username_placeholder' => 'Syötä käyttäjätunnus',
+    'admin_login_username_placeholder_ldap' => 'Syötä hakemiskäyttäjätunnus',
+    'admin_login_password' => 'Salasana:',
+    'admin_login_password_ldap' => 'Hakemissalasana:',
+    'admin_login_password_placeholder' => 'Syötä salasana',
+    'admin_login_password_placeholder_ldap' => 'Syötä hakemissalasana',
+    'admin_login_button' => 'Kirjaudu',
+    
+    // Admin Dashboard
+    'admin_dashboard_title' => 'Ylläpiton Hallintapaneeli',
+    'admin_publication_deleted_success' => 'Julkaisu poistettu onnistuneesti',
+    'admin_publication_deleted_error' => 'Virhe julkaisua poistettaessa',
+    'admin_nav_dashboard' => 'Hallintapaneeli',
+    'admin_nav_publications' => 'Julkaisut',
+    'admin_nav_categories' => 'Kategoriat',
+    'admin_nav_ldap_users' => 'LDAP-käyttäjät',
+    'admin_nav_logout' => 'Kirjaudu ulos',
+    'admin_welcome' => 'Tervetuloa',
+    'admin_overview' => 'Yleiskatsaus',
+    'admin_total_publications' => 'Julkaisut yhteensä',
+    'admin_published' => 'Julkaistu',
+    'admin_drafts' => 'Luonnokset',
+    'admin_archived' => 'Arkistoitu',
+    'admin_recent_publications' => 'Viimeisimmät julkaisut',
+    'admin_table_title' => 'Otsikko',
+    'admin_table_author' => 'Tekijä',
+    'admin_table_status' => 'Tila',
+    'admin_table_created' => 'Luotu',
+    'admin_table_actions' => 'Toiminnot',
+    'admin_action_edit' => 'Muokkaa',
+    'admin_action_delete' => 'Poista',
+    'admin_confirm_delete' => 'Oletko varma, että haluat poistaa tämän julkaisun?',
+    'admin_create_publication' => 'Luo uusi julkaisu',
+    
+    // Admin Publications Page
+    'admin_filter_all' => 'Kaikki',
+    'admin_search_publications' => 'Etsi julkaisuja',
+    'admin_filter_button' => 'Suodata',
+    'admin_clear_button' => 'Tyhjennä',
+    'admin_table_updated' => 'Päivitetty',
+    'admin_no_publications_found' => 'Julkaisuja ei löytynyt.',
+    
+    // Admin Users Page
+    'admin_user_not_found' => 'Käyttäjää ei löytynyt',
+    'admin_user_cannot_delete_own' => 'Et voi poistaa omaa tiliäsi',
+    'admin_user_deleted_success' => 'Käyttäjä poistettu onnistuneesti',
+    'admin_username_required' => 'Käyttäjätunnus vaaditaan',
+    'admin_email_required' => 'Sähköposti vaaditaan',
+    'admin_password_required_local' => 'Salasana vaaditaan paikalliselle todennukselle',
+    'admin_email_invalid' => 'Virheellinen sähköpostimuoto',
+    'admin_username_exists' => 'Käyttäjätunnus on jo olemassa',
+    'admin_user_created_success' => 'Käyttäjä luotu onnistuneesti',
+    
+    // Admin Categories Page
+    'admin_category_not_found' => 'Kategoriaa ei löytynyt',
+    'admin_category_cannot_delete_with_pubs' => 'Ei voi poistaa kategoriaa, jolla on julkaisuja',
+    'admin_category_deleted_success' => 'Kategoria poistettu onnistuneesti',
+    'admin_category_delete_error' => 'Virhe kategoriaa poistettaessa',
+    'admin_category_name_required' => 'Kategorian nimi vaaditaan',
+    'admin_category_updated_success' => 'Kategoria päivitetty onnistuneesti',
+    'admin_category_created_success' => 'Kategoria luotu onnistuneesti',
+    'admin_category_name_exists' => 'Kategorian nimi on jo olemassa',
+    'admin_category_save_error' => 'Virhe kategoriaa tallentaessa',
 ];