Plugin Directory

Changeset 3485668


Ignore:
Timestamp:
03/18/2026 12:36:03 PM (11 days ago)
Author:
freelancebo
Message:

v2.1.5: Add full i18n support with Italian translation

Location:
freelancebo-sentra-control/trunk
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • freelancebo-sentra-control/trunk/admin/views/blocklist.php

    r3485648 r3485668  
    44
    55    <div class="sentra-actions">
    6         <button class="sentra-btn sentra-btn-danger" id="sentra-add-ip-btn"><span class="dashicons dashicons-plus-alt2" style="margin-top:2px;"></span> Blocca IP</button>
    7         <button class="sentra-btn sentra-btn-primary" id="sentra-refresh-bl" style="background:#666;"><span class="dashicons dashicons-update" style="margin-top:2px;"></span> Aggiorna</button>
     6        <button class="sentra-btn sentra-btn-danger" id="sentra-add-ip-btn"><span class="dashicons dashicons-plus-alt2" style="margin-top:2px;"></span> <?php echo esc_html__( 'Block IP', 'freelancebo-sentra-control' ); ?></button>
     7        <button class="sentra-btn sentra-btn-primary" id="sentra-refresh-bl" style="background:#666;"><span class="dashicons dashicons-update" style="margin-top:2px;"></span> <?php echo esc_html__( 'Refresh', 'freelancebo-sentra-control' ); ?></button>
    88    </div>
    99
    1010    <div id="sentra-add-ip-form" style="display:none; background:#fff; padding:20px; border:1px solid #ddd; border-radius:8px; margin-bottom:20px;">
    11         <h3 style="margin-top:0;">Blocca Indirizzo IP</h3>
     11        <h3 style="margin-top:0;"><?php echo esc_html__( 'Block IP Address', 'freelancebo-sentra-control' ); ?></h3>
    1212        <div class="sentra-form-row">
    1313            <input type="text" id="sentra-block-ip" placeholder="Indirizzo IP (es: 192.168.1.100)" style="flex:1;">
    1414            <input type="text" id="sentra-block-reason" placeholder="Motivo (opzionale)" style="flex:1;">
    15             <button class="sentra-btn sentra-btn-danger" id="sentra-save-block">Blocca</button>
    16             <button class="sentra-btn" id="sentra-cancel-block" style="background:#ccc; color:#333;">Annulla</button>
     15            <button class="sentra-btn sentra-btn-danger" id="sentra-save-block"><?php echo esc_html__( 'Block', 'freelancebo-sentra-control' ); ?></button>
     16            <button class="sentra-btn" id="sentra-cancel-block" style="background:#ccc; color:#333;"><?php echo esc_html__( 'Cancel', 'freelancebo-sentra-control' ); ?></button>
    1717        </div>
    1818    </div>
     
    2020    <table class="sentra-table" id="sentra-blocklist-table">
    2121        <thead>
    22             <tr><th>Indirizzo IP</th><th>Motivo</th><th>Origine</th><th>Data</th><th></th></tr>
     22            <tr><th><?php echo esc_html__( 'IP Address', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Reason', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Source', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Date', 'freelancebo-sentra-control' ); ?></th><th></th></tr>
    2323        </thead>
    24         <tbody><tr><td colspan="5" class="sentra-loading">Caricamento...</td></tr></tbody>
     24        <tbody><tr><td colspan="5" class="sentra-loading"><?php echo esc_html__( 'Loading...', 'freelancebo-sentra-control' ); ?></td></tr></tbody>
    2525    </table>
    2626</div>
  • freelancebo-sentra-control/trunk/admin/views/dashboard.php

    r3485648 r3485668  
    44
    55    <?php if (!Sentra::instance()->is_configured()): ?>
    6         <div class="notice notice-warning"><p>Plugin non configurato. <a href="<?php echo esc_url(admin_url('admin.php?page=sentra-settings')); ?>">Vai alle Impostazioni</a></p></div>
     6        <div class="notice notice-warning"><p><?php echo esc_html__( 'Plugin not configured.', 'freelancebo-sentra-control' ); ?> <a href="<?php echo esc_url(admin_url('admin.php?page=sentra-settings')); ?>"><?php echo esc_html__( 'Go to Settings', 'freelancebo-sentra-control' ); ?></a></p></div>
    77    <?php else: ?>
    88
    9     <div id="sentra-dashboard-cards" class="sentra-cards"><div class="sentra-loading">Caricamento...</div></div>
     9    <div id="sentra-dashboard-cards" class="sentra-cards"><div class="sentra-loading"><?php echo esc_html__( 'Loading...', 'freelancebo-sentra-control' ); ?></div></div>
    1010
    11     <h2>Ultimi Eventi</h2>
     11    <h2><?php echo esc_html__( 'Latest Events', 'freelancebo-sentra-control' ); ?></h2>
    1212    <table class="sentra-table" id="sentra-recent-events">
    1313        <thead>
    14             <tr><th>Tipo</th><th>Severit&agrave;</th><th>IP</th><th>Dettagli</th><th>Data</th></tr>
     14            <tr><th><?php echo esc_html__( 'Type', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Severity', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'IP', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Details', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Date', 'freelancebo-sentra-control' ); ?></th></tr>
    1515        </thead>
    16         <tbody><tr><td colspan="5" class="sentra-loading">Caricamento...</td></tr></tbody>
     16        <tbody><tr><td colspan="5" class="sentra-loading"><?php echo esc_html__( 'Loading...', 'freelancebo-sentra-control' ); ?></td></tr></tbody>
    1717    </table>
    1818
  • freelancebo-sentra-control/trunk/admin/views/events.php

    r3485648 r3485668  
    11<?php if (!defined('ABSPATH')) exit; ?>
    22<div class="wrap sentra-wrap">
    3     <h1><span class="dashicons dashicons-list-view"></span> Eventi di Sicurezza</h1>
     3    <h1><span class="dashicons dashicons-list-view"></span> <?php echo esc_html__( 'Security Events', 'freelancebo-sentra-control' ); ?></h1>
    44
    55    <div class="sentra-actions">
    66        <select id="sentra-severity-filter">
    7             <option value="">Tutte le severit&agrave;</option>
    8             <option value="critical">Critici</option>
    9             <option value="high">Alti</option>
    10             <option value="medium">Medi</option>
    11             <option value="low">Bassi</option>
    12             <option value="info">Info</option>
     7            <option value=""><?php echo esc_html__( 'All severities', 'freelancebo-sentra-control' ); ?></option>
     8            <option value="critical"><?php echo esc_html__( 'Critical', 'freelancebo-sentra-control' ); ?></option>
     9            <option value="high"><?php echo esc_html__( 'High', 'freelancebo-sentra-control' ); ?></option>
     10            <option value="medium"><?php echo esc_html__( 'Medium', 'freelancebo-sentra-control' ); ?></option>
     11            <option value="low"><?php echo esc_html__( 'Low', 'freelancebo-sentra-control' ); ?></option>
     12            <option value="info"><?php echo esc_html__( 'Info', 'freelancebo-sentra-control' ); ?></option>
    1313        </select>
    14         <button class="sentra-btn sentra-btn-primary" id="sentra-refresh-events"><span class="dashicons dashicons-update" style="margin-top:2px;"></span> Aggiorna</button>
     14        <button class="sentra-btn sentra-btn-primary" id="sentra-refresh-events"><span class="dashicons dashicons-update" style="margin-top:2px;"></span> <?php echo esc_html__( 'Refresh', 'freelancebo-sentra-control' ); ?></button>
    1515    </div>
    1616
    1717    <table class="sentra-table" id="sentra-events-table">
    1818        <thead>
    19             <tr><th>Tipo</th><th>Severit&agrave;</th><th>IP Sorgente</th><th>URI</th><th>Dettagli</th><th>Data</th></tr>
     19            <tr><th><?php echo esc_html__( 'Type', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Severity', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Source IP', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'URI', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Details', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Date', 'freelancebo-sentra-control' ); ?></th></tr>
    2020        </thead>
    21         <tbody><tr><td colspan="6" class="sentra-loading">Caricamento...</td></tr></tbody>
     21        <tbody><tr><td colspan="6" class="sentra-loading"><?php echo esc_html__( 'Loading...', 'freelancebo-sentra-control' ); ?></td></tr></tbody>
    2222    </table>
    2323</div>
  • freelancebo-sentra-control/trunk/admin/views/firewall.php

    r3485648 r3485668  
    11<?php if (!defined('ABSPATH')) exit; ?>
    22<div class="wrap sentra-wrap">
    3     <h1><span class="dashicons dashicons-shield-alt"></span> Regole Firewall</h1>
     3    <h1><span class="dashicons dashicons-shield-alt"></span> <?php echo esc_html__( 'Firewall Rules', 'freelancebo-sentra-control' ); ?></h1>
    44
    55    <div class="sentra-actions">
    6         <button class="sentra-btn sentra-btn-primary" id="sentra-add-rule-btn"><span class="dashicons dashicons-plus-alt2" style="margin-top:2px;"></span> Nuova Regola</button>
    7         <button class="sentra-btn sentra-btn-primary" id="sentra-refresh-rules" style="background:#666;"><span class="dashicons dashicons-update" style="margin-top:2px;"></span> Aggiorna</button>
     6        <button class="sentra-btn sentra-btn-primary" id="sentra-add-rule-btn"><span class="dashicons dashicons-plus-alt2" style="margin-top:2px;"></span> <?php echo esc_html__( 'New Rule', 'freelancebo-sentra-control' ); ?></button>
     7        <button class="sentra-btn sentra-btn-primary" id="sentra-refresh-rules" style="background:#666;"><span class="dashicons dashicons-update" style="margin-top:2px;"></span> <?php echo esc_html__( 'Refresh', 'freelancebo-sentra-control' ); ?></button>
    88    </div>
    99
    1010    <div id="sentra-add-rule-form" style="display:none; background:#fff; padding:20px; border:1px solid #ddd; border-radius:8px; margin-bottom:20px;">
    11         <h3 style="margin-top:0;">Aggiungi Regola</h3>
     11        <h3 style="margin-top:0;"><?php echo esc_html__( 'Add Rule', 'freelancebo-sentra-control' ); ?></h3>
    1212        <div class="sentra-form-row">
    1313            <input type="text" id="sentra-rule-name" placeholder="Nome regola" style="flex:1;">
     
    2121            <input type="text" id="sentra-rule-pattern" placeholder="Pattern regex (es: eval\s*\()" style="flex:1; font-family:monospace;">
    2222            <select id="sentra-rule-action">
    23                 <option value="block">Blocca</option>
    24                 <option value="log">Solo Log</option>
     23                <option value="block"><?php echo esc_html__( 'Block', 'freelancebo-sentra-control' ); ?></option>
     24                <option value="log"><?php echo esc_html__( 'Log Only', 'freelancebo-sentra-control' ); ?></option>
    2525            </select>
    2626            <input type="number" id="sentra-rule-priority" value="100" style="width:80px;" title="Priorit&agrave;">
    2727        </div>
    2828        <div class="sentra-form-row">
    29             <button class="sentra-btn sentra-btn-success" id="sentra-save-rule">Salva Regola</button>
    30             <button class="sentra-btn" id="sentra-cancel-rule" style="background:#ccc; color:#333;">Annulla</button>
     29            <button class="sentra-btn sentra-btn-success" id="sentra-save-rule"><?php echo esc_html__( 'Save Rule', 'freelancebo-sentra-control' ); ?></button>
     30            <button class="sentra-btn" id="sentra-cancel-rule" style="background:#ccc; color:#333;"><?php echo esc_html__( 'Cancel', 'freelancebo-sentra-control' ); ?></button>
    3131        </div>
    3232    </div>
     
    3434    <table class="sentra-table" id="sentra-rules-table">
    3535        <thead>
    36             <tr><th>Nome</th><th>Tipo</th><th>Pattern</th><th>Azione</th><th>Priorit&agrave;</th><th>Origine</th><th></th></tr>
     36            <tr><th><?php echo esc_html__( 'Name', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Type', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Pattern', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Action', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Priority', 'freelancebo-sentra-control' ); ?></th><th><?php echo esc_html__( 'Source', 'freelancebo-sentra-control' ); ?></th><th></th></tr>
    3737        </thead>
    38         <tbody><tr><td colspan="7" class="sentra-loading">Caricamento...</td></tr></tbody>
     38        <tbody><tr><td colspan="7" class="sentra-loading"><?php echo esc_html__( 'Loading...', 'freelancebo-sentra-control' ); ?></td></tr></tbody>
    3939    </table>
    4040</div>
  • freelancebo-sentra-control/trunk/admin/views/scans.php

    r3485648 r3485668  
    44?>
    55<div class="wrap sentra-wrap">
    6     <h1><span class="dashicons dashicons-shield"></span> Scansioni Sicurezza</h1>
     6    <h1><span class="dashicons dashicons-shield"></span> <?php echo esc_html__( 'Security Scans', 'freelancebo-sentra-control' ); ?></h1>
    77
    88    <div id="sentra-scan-progress" style="display:none;" class="sentra-progress-bar">
    99        <span class="spinner is-active" style="float:none; margin:0 8px 0 0;"></span>
    10         <strong id="sentra-scan-progress-text">Scansione in corso...</strong>
     10        <strong id="sentra-scan-progress-text"><?php echo esc_html__( 'Scanning...', 'freelancebo-sentra-control' ); ?></strong>
    1111    </div>
    1212
     
    1515    <div class="sentra-auto-scan-config" style="margin-bottom:20px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:16px; display:flex; align-items:center; gap:16px; flex-wrap:wrap;">
    1616        <span class="dashicons dashicons-clock" style="font-size:20px; color:#7c3aed;"></span>
    17         <strong style="color:#1e293b;">Scansione automatica giornaliera:</strong>
     17        <strong style="color:#1e293b;"><?php echo esc_html__( 'Daily automatic scan:', 'freelancebo-sentra-control' ); ?></strong>
    1818        <select id="sentra-auto-scan-type" style="padding:6px 12px; border:1px solid #cbd5e1; border-radius:6px; font-size:14px;">
    19             <option value="">Disattivata</option>
    20             <option value="vulnerability">Vulnerabilit&agrave;</option>
    21             <option value="malware">Malware</option>
    22             <option value="integrity">Integrit&agrave;</option>
     19            <option value=""><?php echo esc_html__( 'Disabled', 'freelancebo-sentra-control' ); ?></option>
     20            <option value="vulnerability"><?php echo esc_html__( 'Vulnerabilities', 'freelancebo-sentra-control' ); ?></option>
     21            <option value="malware"><?php echo esc_html__( 'Malware', 'freelancebo-sentra-control' ); ?></option>
     22            <option value="integrity"><?php echo esc_html__( 'Integrity', 'freelancebo-sentra-control' ); ?></option>
    2323        </select>
    2424        <span id="sentra-auto-scan-status" style="font-size:13px; color:#6b7280;"></span>
    2525        <span style="flex:1;"></span>
    26         <span style="font-size:12px; color:#9ca3af;">Max 1 scansione al giorno per sito</span>
     26        <span style="font-size:12px; color:#9ca3af;"><?php echo esc_html__( 'Max 1 scan per day per site', 'freelancebo-sentra-control' ); ?></span>
    2727    </div>
    2828    <!-- Main Tabs -->
    2929    <div class="sentra-main-tabs">
    3030        <button class="sentra-main-tab active" data-tab="vulnerability">
    31             <span class="dashicons dashicons-shield"></span> Vulnerabilit&agrave;
     31            <span class="dashicons dashicons-shield"></span> <?php echo esc_html__( 'Vulnerabilities', 'freelancebo-sentra-control' ); ?>
    3232            <span class="sentra-main-tab-count" id="sentra-vuln-count"></span>
    3333        </button>
    3434        <button class="sentra-main-tab" data-tab="malware">
    35             <span class="dashicons dashicons-warning"></span> Malware
     35            <span class="dashicons dashicons-warning"></span> <?php echo esc_html__( 'Malware', 'freelancebo-sentra-control' ); ?>
    3636            <span class="sentra-main-tab-count" id="sentra-malware-count"></span>
    3737        </button>
    3838        <button class="sentra-main-tab" data-tab="integrity">
    39             <span class="dashicons dashicons-yes-alt"></span> Integrit&agrave;
     39            <span class="dashicons dashicons-yes-alt"></span> <?php echo esc_html__( 'Integrity', 'freelancebo-sentra-control' ); ?>
    4040            <span class="sentra-main-tab-count" id="sentra-integrity-count"></span>
    4141        </button>
     
    4646        <div class="sentra-panel-header">
    4747            <div class="sentra-panel-info">
    48                 <span class="sentra-panel-label">Ultima scansione:</span>
    49                 <strong><?php echo esc_html(get_option('sentra_last_vuln_scan', 'Mai')); ?></strong>
     48                <span class="sentra-panel-label"><?php echo esc_html__( 'Last scan:', 'freelancebo-sentra-control' ); ?></span>
     49                <strong><?php echo esc_html(get_option('sentra_last_vuln_scan', __( 'Never', 'freelancebo-sentra-control' ))); ?></strong>
    5050            </div>
    5151            <div class="sentra-actions">
    52                 <label class="sentra-toggle-resolved"><input type="checkbox" id="sentra-show-resolved-vuln"> Mostra risolti</label>
    53                 <button class="sentra-btn" id="sentra-scan-vuln" style="background:#7c3aed; color:#fff;"><span class="dashicons dashicons-shield" style="margin-top:2px;"></span> Avvia Scansione</button>
     52                <label class="sentra-toggle-resolved"><input type="checkbox" id="sentra-show-resolved-vuln"> <?php echo esc_html__( 'Show resolved', 'freelancebo-sentra-control' ); ?></label>
     53                <button class="sentra-btn" id="sentra-scan-vuln" style="background:#7c3aed; color:#fff;"><span class="dashicons dashicons-shield" style="margin-top:2px;"></span> <?php echo esc_html__( 'Start Scan', 'freelancebo-sentra-control' ); ?></button>
    5454            </div>
    5555        </div>
     
    6161        <div class="sentra-panel-header">
    6262            <div class="sentra-panel-info">
    63                 <span class="sentra-panel-label">Ultima scansione:</span>
    64                 <strong><?php echo esc_html(get_option('sentra_last_malware_scan', 'Mai')); ?></strong>
     63                <span class="sentra-panel-label"><?php echo esc_html__( 'Last scan:', 'freelancebo-sentra-control' ); ?></span>
     64                <strong><?php echo esc_html(get_option('sentra_last_malware_scan', __( 'Never', 'freelancebo-sentra-control' ))); ?></strong>
    6565            </div>
    6666            <div class="sentra-actions">
    67                 <label class="sentra-toggle-resolved"><input type="checkbox" id="sentra-show-resolved-malware"> Mostra risolti</label>
    68                 <button class="sentra-btn sentra-btn-danger" id="sentra-scan-malware"><span class="dashicons dashicons-warning" style="margin-top:2px;"></span> Avvia Scansione</button>
     67                <label class="sentra-toggle-resolved"><input type="checkbox" id="sentra-show-resolved-malware"> <?php echo esc_html__( 'Show resolved', 'freelancebo-sentra-control' ); ?></label>
     68                <button class="sentra-btn sentra-btn-danger" id="sentra-scan-malware"><span class="dashicons dashicons-warning" style="margin-top:2px;"></span> <?php echo esc_html__( 'Start Scan', 'freelancebo-sentra-control' ); ?></button>
    6969            </div>
    7070        </div>
     
    7676        <div class="sentra-panel-header">
    7777            <div class="sentra-panel-info">
    78                 <span class="sentra-panel-label">Ultima verifica:</span>
    79                 <strong><?php echo esc_html(get_option('sentra_last_integrity_scan', 'Mai')); ?></strong>
     78                <span class="sentra-panel-label"><?php echo esc_html__( 'Last check:', 'freelancebo-sentra-control' ); ?></span>
     79                <strong><?php echo esc_html(get_option('sentra_last_integrity_scan', __( 'Never', 'freelancebo-sentra-control' ))); ?></strong>
    8080            </div>
    8181            <div class="sentra-actions">
    82                 <label class="sentra-toggle-resolved"><input type="checkbox" id="sentra-show-resolved-integrity"> Mostra risolti</label>
    83                 <button class="sentra-btn sentra-btn-primary" id="sentra-scan-integrity"><span class="dashicons dashicons-yes-alt" style="margin-top:2px;"></span> Avvia Verifica</button>
     82                <label class="sentra-toggle-resolved"><input type="checkbox" id="sentra-show-resolved-integrity"> <?php echo esc_html__( 'Show resolved', 'freelancebo-sentra-control' ); ?></label>
     83                <button class="sentra-btn sentra-btn-primary" id="sentra-scan-integrity"><span class="dashicons dashicons-yes-alt" style="margin-top:2px;"></span> <?php echo esc_html__( 'Start Check', 'freelancebo-sentra-control' ); ?></button>
    8484            </div>
    8585        </div>
  • freelancebo-sentra-control/trunk/admin/views/settings.php

    r3485648 r3485668  
    11<?php if (!defined('ABSPATH')) exit; ?>
    22<div class="wrap">
    3     <h1><span class="dashicons dashicons-shield" style="font-size:30px;margin-right:8px;"></span> FreelanceBo Sentra Control - Impostazioni</h1>
     3    <h1><span class="dashicons dashicons-shield" style="font-size:30px;margin-right:8px;"></span> FreelanceBo Sentra Control - <?php echo esc_html__( 'Settings', 'freelancebo-sentra-control' ); ?></h1>
    44
    55    <form method="post" action="options.php">
     
    1313                           value="<?php echo esc_attr(get_option('sentra_server_url', '')); ?>"
    1414                           class="regular-text" placeholder="https://your-server.com" />
    15                     <p class="description">URL del server FreelanceBo Sentra Control (HTTPS obbligatorio).</p>
     15                    <p class="description"><?php echo esc_html__( 'FreelanceBo Sentra Control server URL (HTTPS required).', 'freelancebo-sentra-control' ); ?></p>
    1616                </td>
    1717            </tr>
     
    2222                           value="<?php echo esc_attr(get_option('sentra_api_key', '')); ?>"
    2323                           class="regular-text" />
    24                     <p class="description">Chiave API del sito (fornita dalla console).</p>
     24                    <p class="description"><?php echo esc_html__( 'Site API key (provided by the console).', 'freelancebo-sentra-control' ); ?></p>
    2525                </td>
    2626            </tr>
     
    3434                           placeholder="<?php echo $sentra_has_secret ? '••••••••••••••••' : ''; ?>" />
    3535                    <p class="description">
    36                         Secret per la firma HMAC delle richieste.
     36                        <?php echo esc_html__( 'Secret for HMAC request signing.', 'freelancebo-sentra-control' ); ?>
    3737                        <?php if ($sentra_has_secret): ?>
    38                             <strong>Secret gi&agrave; configurato.</strong> Lascia vuoto per mantenerlo, oppure inserisci un nuovo valore per sostituirlo.
     38                            <strong><?php echo esc_html__( 'Secret already configured.', 'freelancebo-sentra-control' ); ?></strong> <?php echo esc_html__( 'Leave blank to keep it, or enter a new value to replace it.', 'freelancebo-sentra-control' ); ?>
    3939                        <?php endif; ?>
    4040                    </p>
     
    4343        </table>
    4444
    45         <?php submit_button('Salva Impostazioni'); ?>
     45        <?php submit_button( __( 'Save Settings', 'freelancebo-sentra-control' ) ); ?>
    4646    </form>
    4747
    4848    <?php if (get_option('sentra_api_key') && get_option('sentra_api_secret') && get_option('sentra_server_url')): ?>
    4949    <hr>
    50     <h2>Test Connessione</h2>
     50    <h2><?php echo esc_html__( 'Test Connection', 'freelancebo-sentra-control' ); ?></h2>
    5151    <p>
    52         <button type="button" class="button" id="sentra-test-connection">Testa Connessione</button>
     52        <button type="button" class="button" id="sentra-test-connection"><?php echo esc_html__( 'Test Connection', 'freelancebo-sentra-control' ); ?></button>
    5353        <input type="hidden" id="sentra-test-nonce" value="<?php echo esc_attr(wp_create_nonce('sentra_test')); ?>" />
    5454        <span id="sentra-test-result" style="margin-left:10px;"></span>
  • freelancebo-sentra-control/trunk/admin/views/status.php

    r3485648 r3485668  
    1515
    1616$sentra_configured = !empty(get_option('sentra_api_key')) && !empty(get_option('sentra_api_secret')) && !empty(get_option('sentra_server_url'));
    17 $sentra_last_hb = get_option('sentra_last_heartbeat', 'Mai');
    18 $sentra_last_sync = get_option('sentra_last_sync', 'Mai');
     17$sentra_last_hb = get_option('sentra_last_heartbeat', __( 'Never', 'freelancebo-sentra-control' ));
     18$sentra_last_sync = get_option('sentra_last_sync', __( 'Never', 'freelancebo-sentra-control' ));
    1919$sentra_last_error = get_option('sentra_last_heartbeat_error', '');
    2020$sentra_rules_count = count(get_option('sentra_firewall_rules', []));
     
    2222?>
    2323<div class="wrap">
    24     <h1><span class="dashicons dashicons-shield" style="font-size:30px;margin-right:8px;"></span> FreelanceBo Sentra Control - Stato</h1>
     24    <h1><span class="dashicons dashicons-shield" style="font-size:30px;margin-right:8px;"></span> FreelanceBo Sentra Control - <?php echo esc_html__( 'Status', 'freelancebo-sentra-control' ); ?></h1>
    2525
    2626    <div class="card" style="max-width:600px;">
    27         <h2>Connessione</h2>
     27        <h2><?php echo esc_html__( 'Connection', 'freelancebo-sentra-control' ); ?></h2>
    2828        <table class="widefat striped">
    2929            <tr>
    30                 <td><strong>Configurato</strong></td>
     30                <td><strong><?php echo esc_html__( 'Configured', 'freelancebo-sentra-control' ); ?></strong></td>
    3131                <td><?php echo $sentra_configured ? '<span style="color:green;">&#10004; Si</span>' : '<span style="color:red;">&#10008; No</span>'; ?></td>
    3232            </tr>
    3333            <tr>
    34                 <td><strong>Server URL</strong></td>
     34                <td><strong><?php echo esc_html__( 'Server URL', 'freelancebo-sentra-control' ); ?></strong></td>
    3535                <td><?php echo esc_html(get_option('sentra_server_url', '-')); ?></td>
    3636            </tr>
    3737            <tr>
    38                 <td><strong>Ultimo Heartbeat</strong></td>
     38                <td><strong><?php echo esc_html__( 'Last Heartbeat', 'freelancebo-sentra-control' ); ?></strong></td>
    3939                <td><?php echo esc_html($sentra_last_hb); ?></td>
    4040            </tr>
    4141            <tr>
    42                 <td><strong>Ultima Sincronizzazione</strong></td>
     42                <td><strong><?php echo esc_html__( 'Last Synchronization', 'freelancebo-sentra-control' ); ?></strong></td>
    4343                <td><?php echo esc_html($sentra_last_sync); ?></td>
    4444            </tr>
    4545            <?php if ($sentra_last_error): ?>
    4646            <tr>
    47                 <td><strong>Ultimo Errore</strong></td>
     47                <td><strong><?php echo esc_html__( 'Last Error', 'freelancebo-sentra-control' ); ?></strong></td>
    4848                <td style="color:red;"><?php echo esc_html($sentra_last_error); ?></td>
    4949            </tr>
     
    5353
    5454    <div class="card" style="max-width:600px;margin-top:20px;">
    55         <h2>Protezione</h2>
     55        <h2><?php echo esc_html__( 'Protection', 'freelancebo-sentra-control' ); ?></h2>
    5656        <table class="widefat striped">
    5757            <tr>
    58                 <td><strong>Regole Firewall Attive</strong></td>
     58                <td><strong><?php echo esc_html__( 'Active Firewall Rules', 'freelancebo-sentra-control' ); ?></strong></td>
    5959                <td><?php echo intval($sentra_rules_count); ?></td>
    6060            </tr>
    6161            <tr>
    62                 <td><strong>IP Bloccati</strong></td>
     62                <td><strong><?php echo esc_html__( 'Blocked IPs', 'freelancebo-sentra-control' ); ?></strong></td>
    6363                <td><?php echo intval($sentra_blocked_count); ?></td>
    6464            </tr>
    6565            <tr>
    66                 <td><strong>Versione Plugin</strong></td>
     66                <td><strong><?php echo esc_html__( 'Plugin Version', 'freelancebo-sentra-control' ); ?></strong></td>
    6767                <td><?php echo esc_html(SENTRA_VERSION); ?></td>
    6868            </tr>
    6969            <tr>
    70                 <td><strong>Versione WordPress</strong></td>
     70                <td><strong><?php echo esc_html__( 'WordPress Version', 'freelancebo-sentra-control' ); ?></strong></td>
    7171                <td><?php global $wp_version; echo esc_html($wp_version); ?></td>
    7272            </tr>
    7373            <tr>
    74                 <td><strong>Versione PHP</strong></td>
     74                <td><strong><?php echo esc_html__( 'PHP Version', 'freelancebo-sentra-control' ); ?></strong></td>
    7575                <td><?php echo esc_html(phpversion()); ?></td>
    7676            </tr>
     
    8282            <?php wp_nonce_field('sentra_force_heartbeat'); ?>
    8383            <input type="hidden" name="sentra_action" value="force_heartbeat" />
    84             <button type="submit" class="button button-primary">Invia Heartbeat Ora</button>
     84            <button type="submit" class="button button-primary"><?php echo esc_html__( 'Send Heartbeat Now', 'freelancebo-sentra-control' ); ?></button>
    8585        </form>
    8686    </div>
  • freelancebo-sentra-control/trunk/freelancebo-sentra-control.php

    r3485648 r3485668  
    44 * Plugin URI: https://freelancebo.it
    55 * Description: WordPress security agent - connects to FreelanceBo Sentra Control central console for WAF, malware scanning, brute force protection, and file integrity monitoring.
    6  * Version: 2.1.4
     6 * Version: 2.1.5
    77 * Author: Freelancebo
    88 * License: GPL-2.0-or-later
     
    1212if (!defined('ABSPATH')) exit;
    1313
    14 define("SENTRA_VERSION", "2.1.4");
     14define("SENTRA_VERSION", "2.1.5");
    1515define('SENTRA_PLUGIN_DIR', plugin_dir_path(__FILE__));
    1616define('SENTRA_PLUGIN_URL', plugin_dir_url(__FILE__));
     17
     18// Load translations
     19add_action( 'init', function() {
     20    load_plugin_textdomain( 'freelancebo-sentra-control', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     21});
    1722
    1823// Load classes
     
    115120        );
    116121        // Dashboard submenu (same as parent)
    117         $this->page_hooks['dashboard'] = add_submenu_page('sentra', 'Dashboard', 'Dashboard', 'manage_options', 'sentra', [$this, 'render_dashboard_page']);
    118         $this->page_hooks['events'] = add_submenu_page('sentra', 'Eventi', 'Eventi', 'manage_options', 'sentra-events', [$this, 'render_events_page']);
    119         $this->page_hooks['firewall'] = add_submenu_page('sentra', 'Firewall', 'Firewall', 'manage_options', 'sentra-firewall', [$this, 'render_firewall_page']);
    120         $this->page_hooks['blocklist'] = add_submenu_page('sentra', 'IP Blocklist', 'IP Blocklist', 'manage_options', 'sentra-blocklist', [$this, 'render_blocklist_page']);
    121         $this->page_hooks['scans'] = add_submenu_page('sentra', 'Scansioni', 'Scansioni', 'manage_options', 'sentra-scans', [$this, 'render_scans_page']);
    122         $this->page_hooks['settings'] = add_submenu_page('sentra', 'Impostazioni', 'Impostazioni', 'manage_options', 'sentra-settings', [$this, 'render_settings_page']);
     122        $this->page_hooks['dashboard'] = add_submenu_page('sentra', 'Dashboard', __( 'Dashboard', 'freelancebo-sentra-control' ), 'manage_options', 'sentra', [$this, 'render_dashboard_page']);
     123        $this->page_hooks['events'] = add_submenu_page('sentra', __( 'Events', 'freelancebo-sentra-control' ), __( 'Events', 'freelancebo-sentra-control' ), 'manage_options', 'sentra-events', [$this, 'render_events_page']);
     124        $this->page_hooks['firewall'] = add_submenu_page('sentra', __( 'Firewall', 'freelancebo-sentra-control' ), __( 'Firewall', 'freelancebo-sentra-control' ), 'manage_options', 'sentra-firewall', [$this, 'render_firewall_page']);
     125        $this->page_hooks['blocklist'] = add_submenu_page('sentra', __( 'IP Blocklist', 'freelancebo-sentra-control' ), __( 'IP Blocklist', 'freelancebo-sentra-control' ), 'manage_options', 'sentra-blocklist', [$this, 'render_blocklist_page']);
     126        $this->page_hooks['scans'] = add_submenu_page('sentra', __( 'Scans', 'freelancebo-sentra-control' ), __( 'Scans', 'freelancebo-sentra-control' ), 'manage_options', 'sentra-scans', [$this, 'render_scans_page']);
     127        $this->page_hooks['settings'] = add_submenu_page('sentra', __( 'Settings', 'freelancebo-sentra-control' ), __( 'Settings', 'freelancebo-sentra-control' ), 'manage_options', 'sentra-settings', [$this, 'render_settings_page']);
    123128    }
    124129
     
    137142                $url = esc_url_raw($url);
    138143                if (!empty($url) && strpos($url, 'https://') !== 0) {
    139                     add_settings_error('sentra_server_url', 'invalid_url', 'Il Server URL deve usare HTTPS.');
     144                    add_settings_error('sentra_server_url', 'invalid_url', __( 'Server URL must use HTTPS.', 'freelancebo-sentra-control' ));
    140145                    return get_option('sentra_server_url', '');
    141146                }
     
    151156        check_ajax_referer('sentra_test', '_wpnonce');
    152157        if (!current_user_can('manage_options')) {
    153             wp_send_json_error('Non autorizzato');
     158            wp_send_json_error( __( 'Unauthorized', 'freelancebo-sentra-control' ) );
    154159        }
    155160
    156161        if (!$this->api_client->is_configured()) {
    157             wp_send_json_error('Server URL o chiavi API non configurate');
     162            wp_send_json_error( __( 'Server URL or API keys not configured', 'freelancebo-sentra-control' ) );
    158163        }
    159164
     
    168173            $heartbeat = new Sentra_Heartbeat($this->api_client);
    169174            $heartbeat->send_heartbeat();
    170             wp_send_json_success('Connessione riuscita!');
     175            wp_send_json_success( __( 'Connection successful!', 'freelancebo-sentra-control' ) );
    171176        } else {
    172             wp_send_json_error('Risposta inattesa dal server');
     177            wp_send_json_error( __( 'Unexpected response from server', 'freelancebo-sentra-control' ) );
    173178        }
    174179    }
     
    270275    public function ajax_run_scan() {
    271276        check_ajax_referer('sentra_admin', '_nonce');
    272         if (!current_user_can('manage_options')) wp_send_json_error('Non autorizzato');
    273         if (!$this->is_configured()) wp_send_json_error('Plugin non configurato');
     277        if (!current_user_can('manage_options')) wp_send_json_error( __( 'Unauthorized', 'freelancebo-sentra-control' ) );
     278        if (!$this->is_configured()) wp_send_json_error( __( 'Plugin not configured', 'freelancebo-sentra-control' ) );
    274279
    275280        $scan_type = sanitize_text_field(wp_unslash($_POST['scan_type'] ?? 'malware'));
    276281        $valid_types = ['malware', 'integrity', 'vulnerability'];
    277282        if (!in_array($scan_type, $valid_types, true)) {
    278             wp_send_json_error('Tipo scansione non valido');
     283            wp_send_json_error( __( 'Invalid scan type', 'freelancebo-sentra-control' ) );
    279284        }
    280285
     
    285290            $scanner->run_scan();
    286291            wp_send_json_success([
    287                 'message' => 'Scansione malware completata',
     292                'message' => __( 'Malware scan completed', 'freelancebo-sentra-control' ),
    288293                'findings' => intval(get_option('sentra_last_malware_findings', 0)),
    289294            ]);
     
    292297            $integrity->run_scan();
    293298            wp_send_json_success([
    294                 'message' => 'Verifica integrita completata',
     299                'message' => __( 'Integrity check completed', 'freelancebo-sentra-control' ),
    295300                'changes' => intval(get_option('sentra_last_integrity_changes', 0)),
    296301            ]);
     
    299304            $findings = $vuln->run_scan();
    300305            wp_send_json_success([
    301                 'message' => 'Scansione vulnerabilita completata',
     306                'message' => __( 'Vulnerability scan completed', 'freelancebo-sentra-control' ),
    302307                'findings' => count($findings),
    303308            ]);
     
    307312    public function ajax_resolve_finding() {
    308313        check_ajax_referer('sentra_admin', '_nonce');
    309         if (!current_user_can('manage_options')) wp_send_json_error('Non autorizzato');
     314        if (!current_user_can('manage_options')) wp_send_json_error( __( 'Unauthorized', 'freelancebo-sentra-control' ) );
    310315
    311316        $check_id = sanitize_text_field(wp_unslash($_POST['check_id'] ?? ''));
    312317        $action = sanitize_text_field(wp_unslash($_POST['resolve_action'] ?? 'resolve'));
    313318
    314         if (empty($check_id)) wp_send_json_error('ID mancante');
    315         if (!in_array($action, ['resolve', 'unresolve'], true)) wp_send_json_error('Azione non valida');
     319        if (empty($check_id)) wp_send_json_error( __( 'ID missing', 'freelancebo-sentra-control' ) );
     320        if (!in_array($action, ['resolve', 'unresolve'], true)) wp_send_json_error( __( 'Invalid action', 'freelancebo-sentra-control' ) );
    316321
    317322        $resolved = get_option('sentra_resolved_findings', []);
     
    333338    public function ajax_set_auto_scan() {
    334339        check_ajax_referer('sentra_admin', '_nonce');
    335         if (!current_user_can('manage_options')) wp_send_json_error('Non autorizzato');
    336         if (!$this->is_configured()) wp_send_json_error('Plugin non configurato');
     340        if (!current_user_can('manage_options')) wp_send_json_error( __( 'Unauthorized', 'freelancebo-sentra-control' ) );
     341        if (!$this->is_configured()) wp_send_json_error( __( 'Plugin not configured', 'freelancebo-sentra-control' ) );
    337342
    338343        $scan_type = sanitize_text_field(wp_unslash($_POST['auto_scan_type'] ?? ''));
    339344        $valid = ['', 'vulnerability', 'malware', 'integrity'];
    340         if (!in_array($scan_type, $valid, true)) wp_send_json_error('Tipo non valido');
     345        if (!in_array($scan_type, $valid, true)) wp_send_json_error( __( 'Invalid type', 'freelancebo-sentra-control' ) );
    341346
    342347        update_option('sentra_auto_scan_type', $scan_type);
     
    350355        }
    351356
    352         wp_send_json_success(['auto_scan_type' => $scan_type, 'message' => 'Impostazione salvata']);
     357        wp_send_json_success(['auto_scan_type' => $scan_type, 'message' => __( 'Setting saved', 'freelancebo-sentra-control' )]);
    353358    }
    354359
     
    359364    public function ajax_api_proxy() {
    360365        check_ajax_referer('sentra_admin', '_nonce');
    361         if (!current_user_can('manage_options')) wp_send_json_error('Non autorizzato');
     366        if (!current_user_can('manage_options')) wp_send_json_error( __( 'Unauthorized', 'freelancebo-sentra-control' ) );
    362367
    363368        $method = strtoupper(sanitize_text_field(wp_unslash($_POST['method'] ?? 'GET')));
     
    372377        }
    373378
    374         if (empty($path)) wp_send_json_error('Path mancante');
     379        if (empty($path)) wp_send_json_error( __( 'Path missing', 'freelancebo-sentra-control' ) );
    375380
    376381        // Validate HTTP method
    377382        if (!in_array($method, ['GET', 'POST', 'PUT', 'DELETE'], true)) {
    378             wp_send_json_error('Metodo non consentito');
     383            wp_send_json_error( __( 'Method not allowed', 'freelancebo-sentra-control' ) );
    379384        }
    380385
     
    382387        // Also block path traversal sequences
    383388        if (strpos($path, '..') !== false) {
    384             wp_send_json_error('Path non valido');
     389            wp_send_json_error( __( 'Invalid path', 'freelancebo-sentra-control' ) );
    385390        }
    386391
     
    393398        }
    394399        if (!$allowed) {
    395             wp_send_json_error('Path non consentito');
     400            wp_send_json_error( __( 'Path not allowed', 'freelancebo-sentra-control' ) );
    396401        }
    397402
  • freelancebo-sentra-control/trunk/includes/class-sentra-api-client.php

    r3485648 r3485668  
    1818    public function request($method, $path, $body = null) {
    1919        if (empty($this->server_url)) {
    20             return ['error' => 'Server URL non configurato'];
     20            return ['error' => __( 'Server URL not configured', 'freelancebo-sentra-control' )];
    2121        }
    2222        if (strpos($path, '..') !== false) {
    23             return ['error' => 'Path non valido'];
     23            return ['error' => __( 'Invalid path', 'freelancebo-sentra-control' )];
    2424        }
    2525        $url = $this->server_url . $path;
  • freelancebo-sentra-control/trunk/readme.txt

    r3485648 r3485668  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.1.4
     7Stable tag: 2.1.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7474
    7575== Changelog ==
     76
     77= 2.1.5 =
     78* Added full internationalization (i18n) support
     79* Added Italian translation (it_IT)
     80* All user-facing strings are now translatable
     81* Added languages/ directory with .pot and .mo files
     82
     83= 2.1.5 =
     84* Added full internationalization (i18n) support with Italian translation
    7685
    7786= 2.1.4 =
Note: See TracChangeset for help on using the changeset viewer.